Re: [PATCH v8 0/9] TDX host: metadata reading tweaks and bug fixes

From: Huang, Kai
Date: Wed Nov 13 2024 - 17:41:19 EST



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.


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. 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."