Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2493290rwb; Thu, 17 Nov 2022 11:31:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf4hJd2Zyt5Xq9NR4Gqy26m12MY1qkRXhhrDH7QOY9dIW0cY1ajI3F9oXPXBo4Ns3g89zGXg X-Received: by 2002:a17:906:a2d8:b0:7ad:fa6c:5e69 with SMTP id by24-20020a170906a2d800b007adfa6c5e69mr3325918ejb.199.1668713503856; Thu, 17 Nov 2022 11:31:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668713503; cv=none; d=google.com; s=arc-20160816; b=iLMMKIH+2ib5a90b13MOA4ozMHChaxup3Td4Vpy7QZAFOtdkUm261eUM3M06DpJlAC u2/GM93Cl5I8j+xih51dR2OCPLvBYM+7gh0uX942j0nokKKQrgWZOMFAwX9BmcwlHGa6 UK1/R3XsrarNAWZ0OO+/O1kfbciHtsSgxRDE0o/SeLvUT0T85NzJdMXPkA2w+w0byLgX 0wwWeu3F3Dzd0mr96n1q6O993GdNguAYGJcZeiTvWhk/AHxSWSeVH0DKkfYvfEAqP6La sRNUfeGJTDnU9p5pZpOBRdpWEBxVdGoq4lKUv5sT1IfqVXb21gDuJtZnkgOIqWNgXpUj zGaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Kwxlz1AmXAtPcO1rVSt3eussQ6+izoYEkg/AX9BJfYU=; b=ivfv3EpzAi2WIIfazvo7cffea+XzxzybGI7MZdD6iwdb9LcklQf210xKeXZ27j4Wl3 Y87UAaqjC0nsIi3YeRM4HmrFgROlVTep8wDKHZReFk0/+XpLDTeBD4BEFpdlLnD60Kr0 uFvXLzW9hj5LVGEy4urNUsTB9fEWVhZytVOjnvLaLpx4ERajTSvrzYAd61QFiUke78zG g7t63tSatRkOUke4OY/auqNJQK6tCfwBjbw7mijV3rQI5VW5bhcSJvMAqy2HtlNS8sMO 9jk6+cvAq7YkOSJP7iACvS6Vs9V5LGiEsQAGzgd3yoNuzczNjLuQ80UZZD1BiIWzPI8S adIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ksaqo8E4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ee52-20020a056402293400b0045217702054si1338253edb.501.2022.11.17.11.31.14; Thu, 17 Nov 2022 11:31:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ksaqo8E4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240409AbiKQSCd (ORCPT + 92 others); Thu, 17 Nov 2022 13:02:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240305AbiKQSC0 (ORCPT ); Thu, 17 Nov 2022 13:02:26 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8358C7FF2D; Thu, 17 Nov 2022 10:02:23 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id g62so2500726pfb.10; Thu, 17 Nov 2022 10:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Kwxlz1AmXAtPcO1rVSt3eussQ6+izoYEkg/AX9BJfYU=; b=Ksaqo8E43RJMDBliYXRVMKZoWfLY7JfNsyU8BXRXmzpQKOC2mQAX0q/BVeLrQaD91g cdD54MimRT8ad53edx4wp74W+H3O2ZU7KanDMuUuHUrhgvIc4PRNrwCDNUl/hQF4mNjJ nk5m8Y2s1FSFMOW+9Spa23qH5sl2v9x/K4+izVz8ZKvzAeXHnGpy42IMq/advNn1zVg9 HfvwUp+ijIJHZDCOuiPIy7OW/Mc1yNBWrmdyfB1B1r0V8MEMeiMWsBjoloItb+hu4KVm r9fygq/JPRCl5ZsrOfQTEORDPoSYvvXt7Lz/m8KVysR6BgPqaBacp8/AxMQdfDABvUKJ +cOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kwxlz1AmXAtPcO1rVSt3eussQ6+izoYEkg/AX9BJfYU=; b=nbJvdldYHJcFTtSJ/NG5FWVlRrN9zKwGnKZc0lP3HtME0mnWGYHv34/ADVOr/6dcQF yO7mubrBuay0yk/H3Gg5Ft8cBOEUjlORXBcY0tnARBEXmTAqx0apafygYm6T/J0sZpbU rQM4omre8auu5eb9mVDfWI3dGnNsTy6aZjp6vMV6P0JIIM6FP+wmU2ID7wv/ybznBOW/ RtUYPT+JF8VbZiFu0Z45acNLoaIokeeWHZcYmZ6iNhs4GtcJvxGjAZRdLNCXpusbE7EQ uyLgE/RdCjiT28DtJWCsM/tec1plkJJ4Yci9AOtteV5Ot7jCL8eKtuTDGzXQ8f23Cwll chfg== X-Gm-Message-State: ANoB5pmhljgk/0rShvjLMbVpbkyIW46tEGwRlh3mW2QClXLMyOgLcOIN b9IARRgMsMtgd0QTc3dfQXs= X-Received: by 2002:a63:f04d:0:b0:470:5d17:a62e with SMTP id s13-20020a63f04d000000b004705d17a62emr2883764pgj.620.1668708141449; Thu, 17 Nov 2022 10:02:21 -0800 (PST) Received: from localhost ([192.55.54.55]) by smtp.gmail.com with ESMTPSA id b29-20020aa7951d000000b00561382a5a25sm1471555pfp.26.2022.11.17.10.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 10:02:21 -0800 (PST) Date: Thu, 17 Nov 2022 10:02:20 -0800 From: Isaku Yamahata To: "Huang, Kai" Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "pbonzini@redhat.com" , "Shahar, Sagi" , "Aktas, Erdem" , "isaku.yamahata@gmail.com" , "dmatlack@google.com" , "Christopherson,, Sean" Subject: Re: [PATCH v10 034/108] KVM: x86/mmu: Add Suppress VE bit to shadow_mmio_{value, mask} Message-ID: <20221117180220.GJ2350331@ls.amr.corp.intel.com> References: <1c480a48c2697054b1cfe068fa073f4035648f9a.1667110240.git.isaku.yamahata@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 09, 2022 at 11:48:30AM +0000, "Huang, Kai" wrote: > On Sat, 2022-10-29 at 23:22 -0700, isaku.yamahata@intel.com wrote: > > From: Isaku Yamahata > > > > Because TDX will need shadow_mmio_mask to be VMX_SUPPRESS_VE | RWX > > shadow_mmio_value to be 0, make VMX EPT case use same value for TDX > > shadow_mmio_mask.   > > > > TDX need to use different mmio_mask/value doesn't mean they need to be changed > for VMX guest. I think the true purpose here is to still be able to use a > global shadow_mmio_mask for both TDX and VMX guests. So please explicitly call > out. That's right. With this change, per-VM shadow_mmio_{value, mask} can be avoided. The common value can be used for both VMX and TDX. -- Isaku Yamahata