Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Binbin Wu <binbin.wu@linux.intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	pbonzini@redhat.com, rick.p.edgecombe@intel.com,
	xiaoyao.li@intel.com, chao.gao@intel.com, kai.huang@intel.com
Subject: Re: [RFC PATCH v2 0/4] KVM: x86: TDX: Validate directly configurable CPUID bits
Date: Mon, 29 Jun 2026 11:02:35 +0800	[thread overview]
Message-ID: <fc936b39-f6f7-4bc3-a1bb-491ebf88e6e3@linux.intel.com> (raw)
In-Reply-To: <aj1fqZEcApyd4sxi@google.com>

On 6/26/2026 1:04 AM, Sean Christopherson wrote:
> On Mon, Jun 22, 2026, Binbin Wu wrote:
>> On 6/4/2026 10:33 AM, Binbin Wu wrote:
>>> Hi,
>>>
>>> A host state clobbering feature on new TDX modules/platforms can lead
>>> to host state corruption if KVM does not explicitly save and restore
>>> the related MSR(s) during host/guest transitions. If such a feature is
>>> blindly exposed to and used by TDs, it will result in unexpected behavior
>>> on the host.
>>>
>>> The v1 RFC [1] attempted to solve this by introducing a comprehensive
>>> CPUID paranoid verification framework across VMX, SVM, and TDX. However,
>>> as Sean pointed out in [2] and the discussion in the PUCK meeting, this
>>> approach was overly complex and bled too many TDX-specific details into
>>> common KVM code, creating an unnecessary maintenance burden.
>>>
>>> This v2 takes a significantly simpler, TDX-contained approach. It strictly
>>> validates only the TDX directly configurable CPUID bits—those reported by
>>> the TDX module in CPUID_CONFIG fields that the VMM can configure for a TD.
>>> This is sufficient to address the host clobbering issue, as no new host
>>> state clobbering features will be fixed-1. All filtering and validation
>>> logic is entirely isolated within TDX code.
>>>
>>> Feedback is highly appreciated, particularly on whether this contained
>>> approach strikes an acceptable balance regarding complexity.
>>
>> Hi Sean,
>>
>> Do you think this proposal is the direction to go?
> 
> Yeah, the basic gist looks good.
> 

Thanks for confirming this!

      reply	other threads:[~2026-06-29  3:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  2:33 [RFC PATCH v2 0/4] KVM: x86: TDX: Validate directly configurable CPUID bits Binbin Wu
2026-06-04  2:33 ` [RFC PATCH v2 1/4] KVM: x86: TDX: Track supported " Binbin Wu
2026-06-04  2:44   ` sashiko-bot
2026-06-04  5:37     ` Binbin Wu
2026-06-25 17:04   ` Sean Christopherson
2026-06-29  3:02     ` Binbin Wu
2026-06-30  0:37       ` Sean Christopherson
2026-06-30  2:10         ` Binbin Wu
2026-06-04  2:33 ` [RFC PATCH v2 2/4] KVM: x86: TDX: Hide unsupported " Binbin Wu
2026-06-04  2:47   ` sashiko-bot
2026-06-04  2:54     ` Binbin Wu
2026-06-04  2:33 ` [RFC PATCH v2 3/4] KVM: x86: TDX: Validate userspace CPUID input for KVM_TDX_INIT_VM Binbin Wu
2026-06-04  2:49   ` sashiko-bot
2026-06-04  3:13     ` Binbin Wu
2026-06-04  2:33 ` [RFC PATCH v2 4/4] KVM: x86: TDX: Report CORE_CAPABILITIES as supported Binbin Wu
2026-06-04  2:51   ` sashiko-bot
2026-06-04  5:32     ` Binbin Wu
2026-06-04  5:40       ` Binbin Wu
2026-06-04  6:53   ` Xiaoyao Li
2026-06-04  7:20     ` Binbin Wu
2026-06-22  6:32 ` [RFC PATCH v2 0/4] KVM: x86: TDX: Validate directly configurable CPUID bits Binbin Wu
2026-06-25 17:04   ` Sean Christopherson
2026-06-29  3:02     ` Binbin Wu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc936b39-f6f7-4bc3-a1bb-491ebf88e6e3@linux.intel.com \
    --to=binbin.wu@linux.intel.com \
    --cc=chao.gao@intel.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    --cc=xiaoyao.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox