[PATCH 0/3] x86/sev: Carve out the SVSM support code

Borislav Petkov posted 3 patches 2 weeks, 1 day ago
arch/x86/boot/startup/sev-startup.c           |   3 +-
arch/x86/coco/sev/Makefile                    |   2 +-
arch/x86/coco/sev/core.c                      | 380 +-----------------
.../sev-internal.h => coco/sev/internal.h}    |  32 ++
arch/x86/coco/sev/noinstr.c                   |   3 +-
arch/x86/coco/sev/svsm.c                      | 362 +++++++++++++++++
arch/x86/coco/sev/vc-handle.c                 |   3 +-
7 files changed, 403 insertions(+), 382 deletions(-)
rename arch/x86/{include/asm/sev-internal.h => coco/sev/internal.h} (75%)
create mode 100644 arch/x86/coco/sev/svsm.c
[PATCH 0/3] x86/sev: Carve out the SVSM support code
Posted by Borislav Petkov 2 weeks, 1 day ago
From: "Borislav Petkov (AMD)" <bp@alien8.de>

Hi,

I've been meaning to do this for a while now but didn't have a good idea how
to do it nicely. Using the internal header makes it almost trivial.

Thx.

Borislav Petkov (AMD) (3):
  x86/sev: Move the internal header
  x86/sev: Add internal header guards
  x86/sev: Carve out the SVSM code into a separate compilation unit

 arch/x86/boot/startup/sev-startup.c           |   3 +-
 arch/x86/coco/sev/Makefile                    |   2 +-
 arch/x86/coco/sev/core.c                      | 380 +-----------------
 .../sev-internal.h => coco/sev/internal.h}    |  32 ++
 arch/x86/coco/sev/noinstr.c                   |   3 +-
 arch/x86/coco/sev/svsm.c                      | 362 +++++++++++++++++
 arch/x86/coco/sev/vc-handle.c                 |   3 +-
 7 files changed, 403 insertions(+), 382 deletions(-)
 rename arch/x86/{include/asm/sev-internal.h => coco/sev/internal.h} (75%)
 create mode 100644 arch/x86/coco/sev/svsm.c

-- 
2.51.0
Re: [PATCH 0/3] x86/sev: Carve out the SVSM support code
Posted by Tom Lendacky 2 weeks, 1 day ago
On 12/4/25 06:48, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> Hi,
> 
> I've been meaning to do this for a while now but didn't have a good idea how
> to do it nicely. Using the internal header makes it almost trivial.

Quick testing doesn't show any issues.

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> 
> Thx.
> 
> Borislav Petkov (AMD) (3):
>   x86/sev: Move the internal header
>   x86/sev: Add internal header guards
>   x86/sev: Carve out the SVSM code into a separate compilation unit
> 
>  arch/x86/boot/startup/sev-startup.c           |   3 +-
>  arch/x86/coco/sev/Makefile                    |   2 +-
>  arch/x86/coco/sev/core.c                      | 380 +-----------------
>  .../sev-internal.h => coco/sev/internal.h}    |  32 ++
>  arch/x86/coco/sev/noinstr.c                   |   3 +-
>  arch/x86/coco/sev/svsm.c                      | 362 +++++++++++++++++
>  arch/x86/coco/sev/vc-handle.c                 |   3 +-
>  7 files changed, 403 insertions(+), 382 deletions(-)
>  rename arch/x86/{include/asm/sev-internal.h => coco/sev/internal.h} (75%)
>  create mode 100644 arch/x86/coco/sev/svsm.c
>
Re: [PATCH 0/3] x86/sev: Carve out the SVSM support code
Posted by Borislav Petkov 2 weeks, 1 day ago
On Thu, Dec 04, 2025 at 08:53:01AM -0600, Tom Lendacky wrote:
> Quick testing doesn't show any issues.
> 
> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>

Much appreciated, thanks!

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette