Re: [PATCH v14 01/22] KVM: selftests: Add macros to simplify creating VM shapes for non-default types
From: Ackerley Tng
Date: Tue Sep 08 2026 - 15:01:18 EST
Lisa Wang <wyihan@xxxxxxxxxx> writes:
> From: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> Add VM_TYPE() and __VM_SHAPE() macros to create a vm_shape structure given
> a type (and mode), and use the macros to define VM_SHAPE_{SEV,SEV_ES,SNP}
> shapes for x86's SEV family of VM shapes. Providing common infrastructure
> will avoid having to copy+paste vm_sev_create_with_one_vcpu() for TDX.
>
> Use the new SEV+ shapes and drop vm_sev_create_with_one_vcpu().
>
> Opportunistically move the existing VM_SHAPE() (now __VM_SHAPE()) macro
> below the definitions of VM_MODE_DEFAULT so that all of the SHAPE/TYPE
> macros are bundled together.
>
> No functional change intended.
>
> Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Reviewed-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> [...snip...]
>
Reviewed-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>