Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp544725pxv; Thu, 8 Jul 2021 08:21:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+V1C1OJLw6qW9cDyNmsQN5lWUUPdHX7y/OZqHqsjLpA6vYrKq4S0ESsnYr1Tst5ZiwKrD X-Received: by 2002:a50:ed82:: with SMTP id h2mr39248626edr.165.1625757707134; Thu, 08 Jul 2021 08:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625757707; cv=none; d=google.com; s=arc-20160816; b=mz0YrLh13VQehFN/jmXlMXa1dlyhrc3YP0gL6cPp2qTRccwg4IyT4AcW2X/CDouyHV GqQUv14eoRxUyKov5kVqKG/b1Eg+VjbZ2QMD0CZijkdq/HY9RUqidCYutsDeVmc/Jxc2 OgkASnbDLP8IkpaLs0hlCEEYxxjk3WmIjDkepmKKsKYoyws8+w7OFuwVuYlBwgSzT7Df cjl0sTUODM6zktveh6VzGF0Tv9ERC2DF3PlO50SYUNMotufGSiaTfBF3MBYeFP3Cl1fl OYH+P4/pNeWENHDWO5IQj98JPS8jSqZWcXaXwCOn7fN4c6nL/NMfCnbdoDJO2kvm0Kh8 4yIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Oa1n/03ttdi3Zf5gHmQjIpSy/crMGDJ29NI1GoGfvEg=; b=COgnZT6PsEOxvoSfan5hRSmOBZAwpAIr4RiwxCmjeBMzBvXj8d5l/1rhAXNHjqFbay OSDjzHFk3E5JUgXQz57acakjAbLFj3k41SznWAX/uM7sq1mv93qNdmroMamcBTVEKbZq Pp756tlvzy8R1pbe+4ddaX6qS6U1HQCyTqqMMXrywjuB49ZTXpELhJzkLte0jUeUn60X y9a/48T5cDBhamDEJ0t6LyJKGk3SXmYF/lxiHqyVI2608FgJFGSY1BdDwiTpl+0jcUrg u8DIhANwQCEHzIS0QYLKBjF+FYKxujZDAYXjpYdoySkk6Gg4eVkIboonqaMu7qm7roxF ebJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V5amZpP3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si4003169edi.63.2021.07.08.08.21.24; Thu, 08 Jul 2021 08:21:47 -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=pass header.i=@gmail.com header.s=20161025 header.b=V5amZpP3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231947AbhGHPW5 (ORCPT + 99 others); Thu, 8 Jul 2021 11:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbhGHPW4 (ORCPT ); Thu, 8 Jul 2021 11:22:56 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8BE2C061574; Thu, 8 Jul 2021 08:20:14 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id y4so5707620pfi.9; Thu, 08 Jul 2021 08:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Oa1n/03ttdi3Zf5gHmQjIpSy/crMGDJ29NI1GoGfvEg=; b=V5amZpP3ONMVJggcdh2j+5YpI3lV2lc9De0dnPy6kSqUgUMXtpBLZx6oid6aMklJ5N WtCINBljJl7ZXHVWCPK0UmPAdmjaxsrGzcvTH6iQDacbxNsYwE03lyoOrZ6iEl7mltcF X6zpNM7RXTbKzFEmvf/izet8wS3XpXzj6FuVFYZMdBtPdSxIZLziBZ31KOBzf0LX3j82 ILB5s8bUgkxJdXCd8IspfKo2kGhyhrSU65ZJPsURrXhViij29Qd5EEcZRw+cwQEW1jDE wc/NrLB67VyMnnrN04RZ2uTfG998Gs8R/roCehGIFmUR5uyCLBviNcWG8LyKAYqDz6jA WcHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Oa1n/03ttdi3Zf5gHmQjIpSy/crMGDJ29NI1GoGfvEg=; b=es2ASJ+u3R47FmgydJ7YSqWHy0ppUhNasfIUFre/8wUTDLv432qVwSawSFRb90MOce ++rRSg+FIKoWTgESov83PH7Yy0mnZ/gx5vgaw6Jo1RmswEuWpl/m3ha8UzCq7Immlry6 kdYlBf6sTmIPBwMv1pn73w76XYc1CZIS4uMLR4hnDzReELtiZC+s8e1byPyfMP4aRPFX +9UiyPc+uyoWatBzB7H54VQMeq3xh7kisDB+6Sm24FuyuWkT/6wmgIwQjOUfCj7szhGL bF2ARWO4Vv5PJAcJok3ZFqm+b7dwHOw8Bs74kgAhvJsjqdf5J9mCHvpS+JIGJd/1RmI+ wEMg== X-Gm-Message-State: AOAM5337Sg8i+913w61aHF23LHMacbqMW+q5k5dmlnY0bae/K3SaVGXJ lx0K7qcB3qsRrs0ZT/j1HaM= X-Received: by 2002:a65:450c:: with SMTP id n12mr28900567pgq.98.1625757614264; Thu, 08 Jul 2021 08:20:14 -0700 (PDT) Received: from localhost ([2601:647:4600:1ed4:adaa:7ff5:893e:b91]) by smtp.gmail.com with ESMTPSA id 133sm3530456pfx.39.2021.07.08.08.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 08:20:13 -0700 (PDT) Date: Thu, 8 Jul 2021 08:20:12 -0700 From: Isaku Yamahata To: Paolo Bonzini Cc: isaku.yamahata@intel.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, isaku.yamahata@gmail.com, Sean Christopherson Subject: Re: [RFC PATCH v2 43/69] KVM: x86/mmu: Allow non-zero init value for shadow PTE Message-ID: <20210708152012.GA278847@private.email.ne.jp> References: <2a12f8867229459dba2da233bf7762cb1ac2722c.1625186503.git.isaku.yamahata@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 06, 2021 at 04:56:07PM +0200, Paolo Bonzini wrote: > On 03/07/21 00:04, isaku.yamahata@intel.com wrote: > > From: Sean Christopherson > > > > TDX will run with EPT violation #VEs enabled, which means KVM needs to > > set the "suppress #VE" bit in unused PTEs to avoid unintentionally > > reflecting not-present EPT violations into the guest. > > > > Signed-off-by: Sean Christopherson > > Signed-off-by: Isaku Yamahata > > --- > > arch/x86/kvm/mmu.h | 1 + > > arch/x86/kvm/mmu/mmu.c | 50 +++++++++++++++++++++++++++++++++++------ > > arch/x86/kvm/mmu/spte.c | 10 +++++++++ > > arch/x86/kvm/mmu/spte.h | 2 ++ > > 4 files changed, 56 insertions(+), 7 deletions(-) > > Please ensure that this also works for tdp_mmu.c (if anything, consider > supporting TDX only for TDP MMU; it's quite likely that mmu.c support for > EPT/NPT will go away). It's on my TODO list. Will address it. -- Isaku Yamahata