From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C41ADC433DF for ; Tue, 25 Aug 2020 09:22:35 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 990EF2068F for ; Tue, 25 Aug 2020 09:22:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 990EF2068F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6B30088173; Tue, 25 Aug 2020 09:22:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eur++dDldGGC; Tue, 25 Aug 2020 09:22:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 05F5587BB1; Tue, 25 Aug 2020 09:22:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C7456C016F; Tue, 25 Aug 2020 09:22:34 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 71F64C0051 for ; Tue, 25 Aug 2020 09:22:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5BB4687BB1 for ; Tue, 25 Aug 2020 09:22:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 551Un0TEBdAC for ; Tue, 25 Aug 2020 09:22:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by hemlock.osuosl.org (Postfix) with ESMTPS id F287587BA6 for ; Tue, 25 Aug 2020 09:22:31 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 840D829A; Tue, 25 Aug 2020 11:22:27 +0200 (CEST) Date: Tue, 25 Aug 2020 11:22:24 +0200 From: Joerg Roedel To: Borislav Petkov Subject: Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions Message-ID: <20200825092224.GF3319@8bytes.org> References: <20200824085511.7553-1-joro@8bytes.org> <20200824085511.7553-3-joro@8bytes.org> <20200824104451.GA4732@zn.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200824104451.GA4732@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Juergen Gross , Tom Lendacky , Dave Hansen , Mike Stunes , Kees Cook , kvm@vger.kernel.org, Peter Zijlstra , Cfir Cohen , x86@kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , virtualization@lists.linux-foundation.org, Martin Radev , Joerg Roedel , Masami Hiramatsu , Andy Lutomirski , hpa@zytor.com, Erdem Aktas , David Rientjes , Dan Williams , Jiri Slaby X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, Aug 24, 2020 at 12:44:51PM +0200, Borislav Petkov wrote: > On Mon, Aug 24, 2020 at 10:53:57AM +0200, Joerg Roedel wrote: > > static inline void __unused_size_checks(void) > > { > > - BUILD_BUG_ON(sizeof(struct vmcb_save_area) != 0x298); > > + BUILD_BUG_ON(sizeof(struct vmcb_save_area) != 1032); > > BUILD_BUG_ON(sizeof(struct vmcb_control_area) != 256); > > + BUILD_BUG_ON(sizeof(struct ghcb) != 4096); > > Could those naked numbers be proper, meaningfully named defines? I don't think so, if I look at the history of these checks their whole purpose seems to be to alert the developer/maintainer when their size changes and that they might not fit on the stack anymore. But that is taken care of in patch 1. Regards, Joerg _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization