2024-01-31 11:56:48

by Huang, Kai

[permalink] [raw]
Subject: [PATCH 0/4] TDX host: kexec() support

Currently kexec() support and TDX host are muturally exclusive in the
Kconfig. This series adds the TDX host kexec support so that they can
work together and can be enabled at the same time in the Kconfig.

This follows Dave's suggestion to add the CC_ATTR_HOST_MEM_INCOHERENT
attribute to unify both Intel and AMD, instead of having Intel/AMD
specific checks around [1].

Hi Tom,

I've tested on my TDX testig machine but I don't have AMD machine to
test. I highly appreciate if you or any AMD guy can help to review
and/or test this series to make sure I didn't break anything.

Thanks a lot!

[1] https://lore.kernel.org/lkml/[email protected]/

Kai Huang (4):
x86/coco: Add a new CC attribute to unify cache flush during kexec
x86/virt/tdx: Advertise the CC_ATTR_HOST_MEM_INCOHERENT for TDX host
x86/kexec(): Reset TDX private memory on platforms with TDX erratum
x86/virt/tdx: Remove the !KEXEC_CORE dependency

arch/x86/Kconfig | 2 +-
arch/x86/coco/core.c | 34 +++++++++-
arch/x86/include/asm/tdx.h | 2 +
arch/x86/kernel/machine_kexec_64.c | 18 ++++-
arch/x86/kernel/process.c | 14 +---
arch/x86/mm/mem_encrypt_identity.c | 11 +++-
arch/x86/virt/vmx/tdx/tdx.c | 101 +++++++++++++++++++++++++++++
include/linux/cc_platform.h | 16 +++++
8 files changed, 183 insertions(+), 15 deletions(-)


base-commit: a6f0b57202b0ee50dc042bae16494008dc6dc992
--
2.34.1



2024-02-01 18:55:30

by Tom Lendacky

[permalink] [raw]
Subject: Re: [PATCH 0/4] TDX host: kexec() support

On 1/31/24 05:31, Huang, Kai wrote:
> Currently kexec() support and TDX host are muturally exclusive in the
> Kconfig. This series adds the TDX host kexec support so that they can
> work together and can be enabled at the same time in the Kconfig.
>
> This follows Dave's suggestion to add the CC_ATTR_HOST_MEM_INCOHERENT
> attribute to unify both Intel and AMD, instead of having Intel/AMD
> specific checks around [1].
>
> Hi Tom,
>
> I've tested on my TDX testig machine but I don't have AMD machine to
> test. I highly appreciate if you or any AMD guy can help to review
> and/or test this series to make sure I didn't break anything.

Hi Kai,

I'm adding Ashish to the thread to take a look at this as he's been
focusing on kexec related things recently.

Thanks,
Tom

>
> Thanks a lot!
>
> [1] https://lore.kernel.org/lkml/[email protected]/
>
> Kai Huang (4):
> x86/coco: Add a new CC attribute to unify cache flush during kexec
> x86/virt/tdx: Advertise the CC_ATTR_HOST_MEM_INCOHERENT for TDX host
> x86/kexec(): Reset TDX private memory on platforms with TDX erratum
> x86/virt/tdx: Remove the !KEXEC_CORE dependency
>
> arch/x86/Kconfig | 2 +-
> arch/x86/coco/core.c | 34 +++++++++-
> arch/x86/include/asm/tdx.h | 2 +
> arch/x86/kernel/machine_kexec_64.c | 18 ++++-
> arch/x86/kernel/process.c | 14 +---
> arch/x86/mm/mem_encrypt_identity.c | 11 +++-
> arch/x86/virt/vmx/tdx/tdx.c | 101 +++++++++++++++++++++++++++++
> include/linux/cc_platform.h | 16 +++++
> 8 files changed, 183 insertions(+), 15 deletions(-)
>
>
> base-commit: a6f0b57202b0ee50dc042bae16494008dc6dc992

2024-02-05 06:52:02

by Huang, Kai

[permalink] [raw]
Subject: Re: [PATCH 0/4] TDX host: kexec() support



On 2/02/2024 2:28 am, Tom Lendacky wrote:
> On 1/31/24 05:31, Huang, Kai wrote:
>> Currently kexec() support and TDX host are muturally exclusive in the
>> Kconfig.  This series adds the TDX host kexec support so that they can
>> work together and can be enabled at the same time in the Kconfig.
>>
>> This follows Dave's suggestion to add the CC_ATTR_HOST_MEM_INCOHERENT
>> attribute to unify both Intel and AMD, instead of having Intel/AMD
>> specific checks around [1].
>>
>> Hi Tom,
>>
>> I've tested on my TDX testig machine but I don't have AMD machine to
>> test.  I highly appreciate if you or any AMD guy can help to review
>> and/or test this series to make sure I didn't break anything.
>
> Hi Kai,
>
> I'm adding Ashish to the thread to take a look at this as he's been
> focusing on kexec related things recently.
>

Thanks Tom.

Hi Ashish,

I appreciate if you can help to review and test the first patch. Thanks!

2024-02-06 19:06:12

by Ashish Kalra

[permalink] [raw]
Subject: Re: [PATCH 0/4] TDX host: kexec() support

On 2/5/2024 12:50 AM, Huang, Kai wrote:

>
>
> On 2/02/2024 2:28 am, Tom Lendacky wrote:
>> On 1/31/24 05:31, Huang, Kai wrote:
>>> Currently kexec() support and TDX host are muturally exclusive in the
>>> Kconfig.  This series adds the TDX host kexec support so that they can
>>> work together and can be enabled at the same time in the Kconfig.
>>>
>>> This follows Dave's suggestion to add the CC_ATTR_HOST_MEM_INCOHERENT
>>> attribute to unify both Intel and AMD, instead of having Intel/AMD
>>> specific checks around [1].
>>>
>>> Hi Tom,
>>>
>>> I've tested on my TDX testig machine but I don't have AMD machine to
>>> test.  I highly appreciate if you or any AMD guy can help to review
>>> and/or test this series to make sure I didn't break anything.
>>
>> Hi Kai,
>>
>> I'm adding Ashish to the thread to take a look at this as he's been
>> focusing on kexec related things recently.
>>
>
> Thanks Tom.
>
> Hi Ashish,
>
> I appreciate if you can help to review and test the first patch. Thanks!

Hello Kai,

Yes, i am currently working on SNP guest kexec support on top of
Kirill's TDX guest kexec patches, i will have a look your patch-set and
test and review it.

Thanks, Ashish


2024-02-07 01:54:13

by Huang, Kai

[permalink] [raw]
Subject: RE: [PATCH 0/4] TDX host: kexec() support

> Hello Kai,
>
> Yes, i am currently working on SNP guest kexec support on top of Kirill's TDX
> guest kexec patches, i will have a look your patch-set and test and review it.
>
> Thanks, Ashish

Hi Ashish,

I appreciate!