public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "Hansen, Dave" <dave.hansen@intel.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"bp@alien8.de" <bp@alien8.de>, "Huang, Kai" <kai.huang@intel.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>
Cc: "nik.borisov@suse.com" <nik.borisov@suse.com>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"Yamahata, Isaku" <isaku.yamahata@intel.com>
Subject: Re: [PATCH v8 0/9] TDX host: metadata reading tweaks and bug fixes
Date: Wed, 13 Nov 2024 22:53:00 +0000	[thread overview]
Message-ID: <e5ebcab0d1104765ced1fafebf737b7c311593a3.camel@intel.com> (raw)
In-Reply-To: <45a8ac0d-9f79-405a-80a4-40f5886c3bde@intel.com>

On Thu, 2024-11-14 at 11:40 +1300, Huang, Kai wrote:
> > So I think it is not part of the "bare minimum". I don't have any objection
> > with
> > it going upstream with rest of this series if it doesn't delay it. But I
> > want to
> > make sure we don't have any more confusion that will cause further delays.
> 
> We have two issues that need to be addressed.  Addressing them could 
> bring the infrastructure that is needed for KVM TDX as well, so this is 
> the "minimal code" given the goal I want to achieve here.

I'm confused by this. "could bring the infrastructure"? What is the "goal I want
to achieve"?

Let me ask it another way, if we drop patches 7 and 8 and pushed them in a later
series. (say after TDX gets upstream for the sake of this question, but I'm not
suggesting a schedule). Then what is the consequence to the goal of booting a TD
on some HW?

I'm not questioning that the patches are in order, or that they should be fixed
urgently. I'm just trying to make sure we are clear to Dave on why this is all
needed.

> 
> > 
> > > 2) Some old modules can clobber host's RBP when existing from the TDX
> > >     guest, and currently they can be initialized successfully.  We don't
> > >     want to use such modules thus we should just fail to initialize them
> > >     to avoid memory/cpu cycle cost of initializing TDX module [2].
> > 
> > I think we need RBP MOD for basic support, or it may cause crashes when we
> > start
> > booting TDs.
> > 
> > Does all that seem correct?
> 
> We will need additional patch to save/restore RBP.  

I think you are talking about the workaround patch that was NAKed and we have
now dropped from the dev branch since we can now rely on NO_RBP_MOD? So we
*don't* need that patch...?

> The more important 
> thing is it's naturally bad, due to the thing that I mentioned in that 
> patch:
> 
> "...clobbering RBP could result in bad things like being unable to 
> unwind the stack if any non-maskable exceptions (NMI, #MC etc) happens 
> in that gap."
> 
> 

Yea I think NO_RBP_MOD is required.

  reply	other threads:[~2024-11-13 22:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 11:57 [PATCH v8 0/9] TDX host: metadata reading tweaks and bug fixes Kai Huang
2024-11-13 11:57 ` [PATCH v8 1/9] x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better Kai Huang
2024-11-13 11:57 ` [PATCH v8 2/9] x86/virt/tdx: Start to track all global metadata in one structure Kai Huang
2024-11-13 11:57 ` [PATCH v8 3/9] x86/virt/tdx: Use auto-generated code to read global metadata Kai Huang
2024-12-13 11:17   ` Huang, Kai
2024-11-13 11:57 ` [PATCH v8 4/9] x86/virt/tdx: Use dedicated struct members for PAMT entry sizes Kai Huang
2024-11-13 11:57 ` [PATCH v8 5/9] x86/virt/tdx: Add missing header file inclusion to local tdx.h Kai Huang
2024-11-13 11:57 ` [PATCH v8 6/9] x86/virt/tdx: Switch to use auto-generated global metadata reading code Kai Huang
2024-11-13 11:57 ` [PATCH v8 7/9] x86/virt/tdx: Trim away tail null CMRs Kai Huang
2024-11-13 11:57 ` [PATCH v8 8/9] x86/virt/tdx: Reduce TDMR's reserved areas by using CMRs to find memory holes Kai Huang
2024-12-04 14:22   ` Huang, Kai
2024-12-05 12:45     ` Huang, Kai
2024-12-05 12:40   ` [PATCH v8 8.1/9] " Kai Huang
2024-12-05 18:10     ` Dave Hansen
2024-12-06  2:45       ` Huang, Kai
2024-12-09  6:57       ` Huang, Kai
2024-12-09  6:50   ` [PATCH v8 8.2/9] " Kai Huang
2024-12-09 22:54     ` Dave Hansen
2024-12-10  2:26       ` Huang, Kai
2024-12-10  2:46         ` Dan Williams
2024-12-10  4:24           ` Huang, Kai
2024-12-10 16:58             ` Dave Hansen
2024-12-11  4:34               ` Huang, Kai
2024-11-13 11:57 ` [PATCH v8 9/9] x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD mitigation Kai Huang
2024-11-13 22:25 ` [PATCH v8 0/9] TDX host: metadata reading tweaks and bug fixes Edgecombe, Rick P
2024-11-13 22:40   ` Huang, Kai
2024-11-13 22:53     ` Edgecombe, Rick P [this message]
2024-11-13 23:35       ` Huang, Kai

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=e5ebcab0d1104765ced1fafebf737b7c311593a3.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=isaku.yamahata@intel.com \
    --cc=kai.huang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nik.borisov@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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