Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2759537pxa; Tue, 25 Aug 2020 02:24:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmF6cr/4XV1zadStGxBTd5THbmV9T8zYkdrNkE90MoSpYzaB9S3cDFZP00LAGYfgzJARFi X-Received: by 2002:a50:f312:: with SMTP id p18mr5001644edm.216.1598347483923; Tue, 25 Aug 2020 02:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598347483; cv=none; d=google.com; s=arc-20160816; b=rvNOsilBFNikIka5aPc2PClRdAe6qPwv1ZpW0gK3fU+lNfHIYk1CX+I0J64F9GHCOp QTGGydVEq7yXAoSIXRuqnsi1NeqJujm1aC9YTSL2hBOkbQMRS+9nDIaTy8jg7QgYJEn0 7LuFuxNv736IR7+dvtkbhP1Ii3Q/iB+E+ArqjLPqomrXTqRQ010deMDdu7097dX13Vuo w2Tg5BLuTVtqSpZrRgJQewx+sSqnwNPsMsR0Elyql6XavZBnnhpu4yAdMkNz+6njTVh+ NLiQcrjdnOYNeI/FC1dtgpenTQBJp9i9T8vf+xk8S1lAah65Jk0uaA790IRgWLehV5X7 Zpug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PBDXKw4G5fXATmWS/4bcvZ5MXzbfxUthNLqkzQRttRA=; b=JuAZz8hAvtmIjEwt3jvi773Kd+kHxPgBfQXzPi32nrigLA31+z1BYArrkjBukyuprc VpzrT9y2QIUgzRUDrh/QVzge6JkJrO52O529kBipQ3bR9qUFaX98+sGdemAVkL8kkhMF Jx8vdJr65DOhsOBTdJ2kYt6owZorYiVCJNQTOeXs2VHxDuYFyy3jnbwzE48XDdrEteBz go5lUajZg7wcSzp5y1GTTIvsvuDfCj0C8zmHWzOj0QzbCcx+ojyCkgSV8cSBhVuGJwyA qafUJdUSNqsscjtdq9d9mjcDkiiff7l3gQsZHS0J4Ne9KCXahdG65vEbjolJTSW4yoxS My3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p93si4085879edp.343.2020.08.25.02.24.20; Tue, 25 Aug 2020 02:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbgHYJWa (ORCPT + 99 others); Tue, 25 Aug 2020 05:22:30 -0400 Received: from 8bytes.org ([81.169.241.247]:39304 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbgHYJW3 (ORCPT ); Tue, 25 Aug 2020 05:22:29 -0400 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 Cc: x86@kernel.org, Joerg Roedel , Tom Lendacky , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200824104451.GA4732@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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