[PATCHv2 0/4] x86/tdx: Adjust TD settings on boot

Kirill A. Shutemov posted 4 patches 1 year, 10 months ago
There is a newer version of this series
arch/x86/coco/tdx/tdx.c           | 125 ++++++++++++++++++++++++++----
arch/x86/include/asm/shared/tdx.h |  21 ++++-
2 files changed, 131 insertions(+), 15 deletions(-)
[PATCHv2 0/4] x86/tdx: Adjust TD settings on boot
Posted by Kirill A. Shutemov 1 year, 10 months ago
Adjust TD setting on boot:

  - Disable EPT violation #VE on private memory if TD can
    control it;

  - Enable virtualization of topology-related CPUID leafs
    X2APIC_APICID MSR;

v2:
  - Rebased;
  - Allow write to TDCS_TD_CTLS to fail;
  - Adjust commit messages;

Kirill A. Shutemov (4):
  x86/tdx: Introduce tdg_vm_wr()
  x86/tdx: Rename tdx_parse_tdinfo() to tdx_setup()
  x86/tdx: Handle PENDING_EPT_VIOLATION_V2
  x86/tdx: Enable ENUM_TOPOLOGY

 arch/x86/coco/tdx/tdx.c           | 125 ++++++++++++++++++++++++++----
 arch/x86/include/asm/shared/tdx.h |  21 ++++-
 2 files changed, 131 insertions(+), 15 deletions(-)

-- 
2.43.0
Re: [PATCHv2 0/4] x86/tdx: Adjust TD settings on boot
Posted by Kirill A. Shutemov 1 year, 10 months ago
On Mon, Mar 25, 2024 at 12:46:03PM +0200, Kirill A. Shutemov wrote:
> Adjust TD setting on boot:
> 
>   - Disable EPT violation #VE on private memory if TD can
>     control it;
> 
>   - Enable virtualization of topology-related CPUID leafs
>     X2APIC_APICID MSR;

Any feedback?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Re: [PATCHv2 0/4] x86/tdx: Adjust TD settings on boot
Posted by Edgecombe, Rick P 1 year, 10 months ago
On Wed, 2024-04-10 at 17:37 +0300, Kirill A. Shutemov wrote:
> On Mon, Mar 25, 2024 at 12:46:03PM +0200, Kirill A. Shutemov wrote:
> > Adjust TD setting on boot:
> > 
> >    - Disable EPT violation #VE on private memory if TD can
> >      control it;
> > 
> >    - Enable virtualization of topology-related CPUID leafs
> >      X2APIC_APICID MSR;
> 
> Any feedback?

It is missing a lot of the normal things that come in coverletters like what is
the problem and importance. It might help attract more review.
Re: [PATCHv2 0/4] x86/tdx: Adjust TD settings on boot
Posted by kirill.shutemov@linux.intel.com 1 year, 10 months ago
On Wed, Apr 10, 2024 at 02:41:13PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2024-04-10 at 17:37 +0300, Kirill A. Shutemov wrote:
> > On Mon, Mar 25, 2024 at 12:46:03PM +0200, Kirill A. Shutemov wrote:
> > > Adjust TD setting on boot:
> > > 
> > >    - Disable EPT violation #VE on private memory if TD can
> > >      control it;
> > > 
> > >    - Enable virtualization of topology-related CPUID leafs
> > >      X2APIC_APICID MSR;
> > 
> > Any feedback?
> 
> It is missing a lot of the normal things that come in coverletters like what is
> the problem and importance. It might help attract more review.

What about this:

The patchset adjusts a few TD settings on boot for the optimal functioning
of the system:

  - Disable EPT violation #VE on private memory if TD can control it

    The newer TDX module allows the guest to control whether it wants to
    see #VE on EPT violation on private memory. The Linux kernel does not
    want such #VEs and needs to disable them.

  - Enable virtualization of topology-related CPUID leafs X2APIC_APICID MSR;

    The ENUM_TOPOLOGY feature allows the VMM to provide topology
    information to the guest. Enabling the feature eliminates
    topology-related #VEs: the TDX module virtualizes accesses to the
    CPUID leafs and the MSR.

    It allows TDX guest to run with non-trivial topology configuration.
-- 
  Kiryl Shutsemau / Kirill A. Shutemov