Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp543897pxa; Thu, 27 Aug 2020 09:04:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHBgHFByjDvYc3Udy/c45HQ9N1fXoSgXTDCV4Mhr8/vO7w6CzuBQYlyfCUAPX9aCD0qSof X-Received: by 2002:a17:906:fcb0:: with SMTP id qw16mr8584550ejb.249.1598544280997; Thu, 27 Aug 2020 09:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598544280; cv=none; d=google.com; s=arc-20160816; b=KUlbvMRjhqVH1uwAojgvcLG0le+rZ+isYlhLUkoxc4IQaW4xGX1wuypVzWZLATV/gJ BuIcJ0ieycfKYyTq+WDftmyq+PQ59HTHulfmMlCSwa3O4pJalEzlRguXB5xLAQuNR+af CHk1WcmKblAWRztPlcSjxB/RbwpZrbU4c48Qek5eHjKRLIqI8tZt1nMkWEUSb/IQD6jV 8f92Y4ec/Nz+viucAqnofvgHJ8Ea3guRs+1OmDq4kNKlclCICLSiCRpGBScrrHkkhcRP o/F5DapJ+x5npkCJ7dJCKwogeehZtl7DQwhb9EHGZ1DkoX+doBDgaJlqDOXfZua0PEYz DMUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=8moOsqRnYIhz4ZttMW9zwcBUEs7klx/rrFKF2mMjY8s=; b=OdXQcA8RkAF1ClEk5z1bN31exdy4dGa8KTNqH71CuPqIZQ4AS2iKn86AyDeYB+y9Te MZjmtdvQo8NFY080h5dqAJIm5LinHYR1EOY6xc8/sNLROm90kn4nx0RfpBc49/3Yl+KA +b5SGqNVDJ6u52ZtUgV/WALo8NPuGH0xRZrsRp2Sz1Uh29BVFrZ9AhzvXGYUC+H7sSv7 cOByYG7IS4FfTmbdoVXSDPAsoYsaRboe/DW+pVPMQQsRoJfj78O25+Q13i1xjJzyv/LK 7SfMQ23i8xaUx1XPGcEjT1SJW6vbnU8iiVgEFGERW1NDZmReP3ild5J7xaSrTe8jBAnu XTsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OYZTMqQJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si1642541ejf.666.2020.08.27.09.04.16; Thu, 27 Aug 2020 09:04:40 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OYZTMqQJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbgH0QBT (ORCPT + 99 others); Thu, 27 Aug 2020 12:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbgH0QBR (ORCPT ); Thu, 27 Aug 2020 12:01:17 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2D53C061264; Thu, 27 Aug 2020 09:01:17 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id b14so6335526qkn.4; Thu, 27 Aug 2020 09:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8moOsqRnYIhz4ZttMW9zwcBUEs7klx/rrFKF2mMjY8s=; b=OYZTMqQJaSZueJVUNgDzpIsruyaBu+TLAQQdPAiItmnBT0Q8V/rihSpvpJcEUthbc6 geBvAlOovV3Ci6jklaFysg/H+C1ATiiH390HryGB1FmK5IsI24tgmgWVdrvtIDp5oHa0 0cIgc//70fiGXQuSM9otGWtsqS6fz9ddgNnBdeiTirTQ88KlzI7WT9xedMHnfLGGwRKR UpXpnXkqjhNvJIbfTJgefsYcbCModlIQaGKvZE/VT56UQJiPEHYQPHqdxSvDxVRlKuyY yqKywcMW9HlFYFN/P1EL0KZLOdiLEFvpy09wpXWlqUeMc0747ziToJPe79hIWxO3BYqF caTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=8moOsqRnYIhz4ZttMW9zwcBUEs7klx/rrFKF2mMjY8s=; b=icR02EI1yyEH1Fy0Wlt3nyS0JHiDUDoa7GM4kP0KkDC/VW0avo+dG+i0bDbRCyLlGm YjwBaiQ6ZX8/v9uHRy9KQWttdHBGJfw+K4oHIx/LFTGu2hSINcDKixy4sEDuVfRsXIKi leYPmmPp5DPjhBtruwfc21vAnKJSrMPXtCUTow+lVKuz/JKUou9wLWGJlUMczDsdVCwg LUe4YA5lY6xM6kXdG89x9wpwtc5/MQPPu/X78EFUuyIrEZq7vge/N8E/LLIchJd1uF23 M0wyeztEnco0CcLBJINj1KplbD96rxlsPnXHdoU4CXX6X0No1xNGtY99b48EZZPigHDW rmQA== X-Gm-Message-State: AOAM531uoAINV3wvoKZmb9kdujJs6bledqLteJvf2deSIaBLs6wOKPi8 BeDtN3Hyzt9Vedo2S3YR0r4= X-Received: by 2002:a37:9ad4:: with SMTP id c203mr4792839qke.420.1598544076808; Thu, 27 Aug 2020 09:01:16 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 19sm2087813qkj.123.2020.08.27.09.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 09:01:16 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Thu, 27 Aug 2020 12:01:13 -0400 To: Borislav Petkov Cc: Joerg Roedel , 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: <20200827160113.GA721088@rani.riverdale.lan> References: <20200824085511.7553-1-joro@8bytes.org> <20200824085511.7553-3-joro@8bytes.org> <20200824104451.GA4732@zn.tnic> <20200825092224.GF3319@8bytes.org> <20200825110446.GC12107@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200825110446.GC12107@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 01:04:46PM +0200, Borislav Petkov wrote: > On Tue, Aug 25, 2020 at 11:22:24AM +0200, Joerg Roedel wrote: > > 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. > > Why? What's wrong with: > > BUILD_BUG_ON(sizeof(struct vmcb_save_area) != VMCB_SAVE_AREA_SIZE); > BUILD_BUG_ON(sizeof(struct vmcb_control_area) != VMCB_CONTROL_AREA_SIZE); > BUILD_BUG_ON(sizeof(struct ghcb) != PAGE_SIZE); > > ? > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette Wouldn't we rather just remove the checks?