mbox series

[SRU,N:intel,0/8] Support Kexec/Kdump

Message ID 20240626135232.2731811-1-thibault.ferrante@canonical.com
Headers show
Series Support Kexec/Kdump | expand

Message

Thibault Ferrante June 26, 2024, 1:52 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2070356

[ Impact ]

Kexec is currently disabled on linux-intel as it was incompatible with tdx.
These patch make it possible to use it at the same time than TDX

[ Fix ]

A backport of the kexec enablement for tdx on 6.8 has been done by intel.

[ Test Plan ]

Use kexec to do a kdump on hardware support tdx.
It was tested by Intel and me on dedicated hardware.

[ Where problems could occur ]

Regression on TDX/Kexec related features.


Gerd Hoffmann (2):
  UBUNTU: SAUCE: KVM: x86: Don't advertise guest.MAXPHYADDR as
    host.MAXPHYADDR in CPUID
  UBUNTU: SAUCE: KVM: x86: Advertise max mappable GPA in
    CPUID.0x80000008.GuestPhysBits

Kai Huang (5):
  UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
    stop_this_cpu()
  UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
    relocate_kernel()
  UBUNTU: SAUCE: x86/kexec: Reset TDX private memory on platforms with
    TDX erratum
  UBUNTU: SAUCE: x86/virt/tdx: Remove the !KEXEC_CORE dependency
  UBUNTU: SAUCE: x86/virt/tdx: Add TDX memory reset notifier to reset
    other private pages

Thibault Ferrante (1):
  UBUNTU: [Config] intel: Enable KEXEC/KDUMP related config

 arch/x86/Kconfig                     |   1 -
 arch/x86/include/asm/kexec.h         |   2 +-
 arch/x86/include/asm/tdx.h           |  16 +++++
 arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
 arch/x86/kernel/process.c            |  19 +++--
 arch/x86/kernel/relocate_kernel_64.S |  19 +++--
 arch/x86/kvm/cpuid.c                 |  41 ++++++++---
 arch/x86/kvm/mmu.h                   |   2 +
 arch/x86/kvm/mmu/mmu.c               |   5 ++
 arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
 debian.intel/config/annotations      |  30 --------
 11 files changed, 203 insertions(+), 61 deletions(-)

Comments

Philip Cox June 26, 2024, 7:37 p.m. UTC | #1
On Wed, Jun 26, 2024 at 9:53 AM Thibault Ferrante <
thibault.ferrante@canonical.com> wrote:

> BugLink: https://bugs.launchpad.net/bugs/2070356
>
> [ Impact ]
>
> Kexec is currently disabled on linux-intel as it was incompatible with tdx.
> These patch make it possible to use it at the same time than TDX
>
> [ Fix ]
>
> A backport of the kexec enablement for tdx on 6.8 has been done by intel.
>
> [ Test Plan ]
>
> Use kexec to do a kdump on hardware support tdx.
> It was tested by Intel and me on dedicated hardware.
>
> [ Where problems could occur ]
>
> Regression on TDX/Kexec related features.
>
>


--

Acked-by: Philip Cox <philip.cox@canonical.com>




>
> Gerd Hoffmann (2):
>   UBUNTU: SAUCE: KVM: x86: Don't advertise guest.MAXPHYADDR as
>     host.MAXPHYADDR in CPUID
>   UBUNTU: SAUCE: KVM: x86: Advertise max mappable GPA in
>     CPUID.0x80000008.GuestPhysBits
>
> Kai Huang (5):
>   UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>     stop_this_cpu()
>   UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>     relocate_kernel()
>   UBUNTU: SAUCE: x86/kexec: Reset TDX private memory on platforms with
>     TDX erratum
>   UBUNTU: SAUCE: x86/virt/tdx: Remove the !KEXEC_CORE dependency
>   UBUNTU: SAUCE: x86/virt/tdx: Add TDX memory reset notifier to reset
>     other private pages
>
> Thibault Ferrante (1):
>   UBUNTU: [Config] intel: Enable KEXEC/KDUMP related config
>
>  arch/x86/Kconfig                     |   1 -
>  arch/x86/include/asm/kexec.h         |   2 +-
>  arch/x86/include/asm/tdx.h           |  16 +++++
>  arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
>  arch/x86/kernel/process.c            |  19 +++--
>  arch/x86/kernel/relocate_kernel_64.S |  19 +++--
>  arch/x86/kvm/cpuid.c                 |  41 ++++++++---
>  arch/x86/kvm/mmu.h                   |   2 +
>  arch/x86/kvm/mmu/mmu.c               |   5 ++
>  arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
>  debian.intel/config/annotations      |  30 --------
>  11 files changed, 203 insertions(+), 61 deletions(-)
>
> --
> 2.43.0
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
John Cabaj June 27, 2024, 8:24 p.m. UTC | #2
On 6/26/24 8:52 AM, Thibault Ferrante wrote:
> BugLink: https://bugs.launchpad.net/bugs/2070356
> 
> [ Impact ]
> 
> Kexec is currently disabled on linux-intel as it was incompatible with tdx.
> These patch make it possible to use it at the same time than TDX
> 
> [ Fix ]
> 
> A backport of the kexec enablement for tdx on 6.8 has been done by intel.
> 
> [ Test Plan ]
> 
> Use kexec to do a kdump on hardware support tdx.
> It was tested by Intel and me on dedicated hardware.
> 
> [ Where problems could occur ]
> 
> Regression on TDX/Kexec related features.
> 
> 
> Gerd Hoffmann (2):
>   UBUNTU: SAUCE: KVM: x86: Don't advertise guest.MAXPHYADDR as
>     host.MAXPHYADDR in CPUID
>   UBUNTU: SAUCE: KVM: x86: Advertise max mappable GPA in
>     CPUID.0x80000008.GuestPhysBits
> 
> Kai Huang (5):
>   UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>     stop_this_cpu()
>   UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>     relocate_kernel()
>   UBUNTU: SAUCE: x86/kexec: Reset TDX private memory on platforms with
>     TDX erratum
>   UBUNTU: SAUCE: x86/virt/tdx: Remove the !KEXEC_CORE dependency
>   UBUNTU: SAUCE: x86/virt/tdx: Add TDX memory reset notifier to reset
>     other private pages
> 
> Thibault Ferrante (1):
>   UBUNTU: [Config] intel: Enable KEXEC/KDUMP related config
> 
>  arch/x86/Kconfig                     |   1 -
>  arch/x86/include/asm/kexec.h         |   2 +-
>  arch/x86/include/asm/tdx.h           |  16 +++++
>  arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
>  arch/x86/kernel/process.c            |  19 +++--
>  arch/x86/kernel/relocate_kernel_64.S |  19 +++--
>  arch/x86/kvm/cpuid.c                 |  41 ++++++++---
>  arch/x86/kvm/mmu.h                   |   2 +
>  arch/x86/kvm/mmu/mmu.c               |   5 ++
>  arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
>  debian.intel/config/annotations      |  30 --------
>  11 files changed, 203 insertions(+), 61 deletions(-)
> 

Acked-by: John Cabaj <john.cabaj@canonical.com>
Thibault Ferrante June 28, 2024, 3:46 p.m. UTC | #3
On 26-06-2024 15:52, Thibault Ferrante wrote:
> BugLink: https://bugs.launchpad.net/bugs/2070356
> 
> [ Impact ]
> 
> Kexec is currently disabled on linux-intel as it was incompatible with tdx.
> These patch make it possible to use it at the same time than TDX
> 
> [ Fix ]
> 
> A backport of the kexec enablement for tdx on 6.8 has been done by intel.
> 
> [ Test Plan ]
> 
> Use kexec to do a kdump on hardware support tdx.
> It was tested by Intel and me on dedicated hardware.
> 
> [ Where problems could occur ]
> 
> Regression on TDX/Kexec related features.
> 
> 
> Gerd Hoffmann (2):
>    UBUNTU: SAUCE: KVM: x86: Don't advertise guest.MAXPHYADDR as
>      host.MAXPHYADDR in CPUID
>    UBUNTU: SAUCE: KVM: x86: Advertise max mappable GPA in
>      CPUID.0x80000008.GuestPhysBits
> 
> Kai Huang (5):
>    UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>      stop_this_cpu()
>    UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>      relocate_kernel()
>    UBUNTU: SAUCE: x86/kexec: Reset TDX private memory on platforms with
>      TDX erratum
>    UBUNTU: SAUCE: x86/virt/tdx: Remove the !KEXEC_CORE dependency
>    UBUNTU: SAUCE: x86/virt/tdx: Add TDX memory reset notifier to reset
>      other private pages
> 
> Thibault Ferrante (1):
>    UBUNTU: [Config] intel: Enable KEXEC/KDUMP related config
> 
>   arch/x86/Kconfig                     |   1 -
>   arch/x86/include/asm/kexec.h         |   2 +-
>   arch/x86/include/asm/tdx.h           |  16 +++++
>   arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
>   arch/x86/kernel/process.c            |  19 +++--
>   arch/x86/kernel/relocate_kernel_64.S |  19 +++--
>   arch/x86/kvm/cpuid.c                 |  41 ++++++++---
>   arch/x86/kvm/mmu.h                   |   2 +
>   arch/x86/kvm/mmu/mmu.c               |   5 ++
>   arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
>   debian.intel/config/annotations      |  30 --------
>   11 files changed, 203 insertions(+), 61 deletions(-)
> 

Applied to noble:linux-intel master-next branch.
Thanks

--
Thibault
Thibault Ferrante July 18, 2024, 2:20 p.m. UTC | #4
On 26-06-2024 15:52, Thibault Ferrante wrote:
> BugLink: https://bugs.launchpad.net/bugs/2070356
> 
> [ Impact ]
> 
> Kexec is currently disabled on linux-intel as it was incompatible with tdx.
> These patch make it possible to use it at the same time than TDX
> 
> [ Fix ]
> 
> A backport of the kexec enablement for tdx on 6.8 has been done by intel.
> 
> [ Test Plan ]
> 
> Use kexec to do a kdump on hardware support tdx.
> It was tested by Intel and me on dedicated hardware.
> 
> [ Where problems could occur ]
> 
> Regression on TDX/Kexec related features.
> 
> 
> Gerd Hoffmann (2):
>    UBUNTU: SAUCE: KVM: x86: Don't advertise guest.MAXPHYADDR as
>      host.MAXPHYADDR in CPUID
>    UBUNTU: SAUCE: KVM: x86: Advertise max mappable GPA in
>      CPUID.0x80000008.GuestPhysBits
> 
> Kai Huang (5):
>    UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>      stop_this_cpu()
>    UBUNTU: SAUCE: x86/kexec: do unconditional WBINVD for bare-metal in
>      relocate_kernel()
>    UBUNTU: SAUCE: x86/kexec: Reset TDX private memory on platforms with
>      TDX erratum
>    UBUNTU: SAUCE: x86/virt/tdx: Remove the !KEXEC_CORE dependency
>    UBUNTU: SAUCE: x86/virt/tdx: Add TDX memory reset notifier to reset
>      other private pages
> 
> Thibault Ferrante (1):
>    UBUNTU: [Config] intel: Enable KEXEC/KDUMP related config
> 
>   arch/x86/Kconfig                     |   1 -
>   arch/x86/include/asm/kexec.h         |   2 +-
>   arch/x86/include/asm/tdx.h           |  16 +++++
>   arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
>   arch/x86/kernel/process.c            |  19 +++--
>   arch/x86/kernel/relocate_kernel_64.S |  19 +++--
>   arch/x86/kvm/cpuid.c                 |  41 ++++++++---
>   arch/x86/kvm/mmu.h                   |   2 +
>   arch/x86/kvm/mmu/mmu.c               |   5 ++
>   arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
>   debian.intel/config/annotations      |  30 --------
>   11 files changed, 203 insertions(+), 61 deletions(-)
> 

Applied to noble:linux-intel, thanks !
--
Thibault