hw: mark virtualization related machines & accelerators as secure
cover hw: mark virtualization related machines & accelerators as secure
This is the machine type and accelerators patches pulled out of the bigger series and split per target / accelerator:
https://lists.gnu.org/archive/html/qemu-devel/2026-09/msg03555.html
Note this only deals with marking leaf types. All parent types are implicitly also considered secure if any leaf is secure. A future series will explicitly mark parent types too.
Daniel P. Berrangé (11):
hw/arm: mark 'virt' as a secure machine
hw/i386: mark 'microvm', 'i440fx', 'q35' as secure machines hw/loongarch: mark 'virt' as a secure machine hw/ppc: mark 'pseries' as a secure machine hw/riscv: mark 'virt' as a secure machine hw/s390x: mark 's390x-ccw-virtio' as a secure machine
hw: mark xenpv, xenpvh, xenfv as secure machines hw/nitro: mark 'nitro' machine as secure accel/kvm: mark kvm accelerator as secure accel/xen: mark xen accelerator as secure accel/nitro: mark 'nitro' accelerator as secure
accel/kvm/kvm-all.c | 1 + accel/nitro/nitro-accel.c | 1 + accel/xen/xen-all.c | 1 + hw/arm/virt.c | 1 + hw/arm/xen-pvh.c | 1 + hw/i386/microvm.c | 1 + hw/i386/pc_piix.c | 4 ++-- hw/i386/xen/xen-pvh.c | 1 + hw/loongarch/virt.c | 1 + hw/nitro/machine.c | 1 + hw/ppc/spapr.c | 1 + hw/riscv/virt.c | 1 + hw/s390x/s390-virtio-ccw.c | 1 + hw/xenpv/xen_machine_pv.c | 2 +- include/hw/i386/pc.h | 1 + 15 files changed, 16 insertions(+), 3 deletions(-)
Signature · 1 line
2.56.0
PATCH 1/11 hw/arm: mark 'virt' as a secure machine
The 'virt' arm machine is already declared secure in docs/system/security.rst, due too its intended usage in virtualization scenarios.
--- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+)
hw/arm/virt.c +1 -0
@@ -133,6 +133,7 @@ static void arm_virt_compat_default_set(MachineClass *mc) .parent = TYPE_VIRT_MACHINE, \ .class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \ .is_available = target_base_arm, \ + .secure = true, \ }; \ static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ { \
Signature · 1 line
2.56.0
Re: [PATCH 01/11] hw/arm: mark 'virt' as a secure machine
Quoted 9 lines · Daniel P. Berrangé
The 'virt' arm machine is already declared secure in
docs/system/security.rst, due too its intended usage in virtualization scenarios.Reviewed-by Marc-André Lureau <[email protected]>Signed-off-by Daniel P. Berrangé <[email protected]>--- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+)
PATCH 2/11 hw/i386: mark 'microvm', 'i440fx', 'q35' as secure machines
In reply to Daniel P. BerrangéThe 'microvm', 'i440fx', 'q35' i386 machines are already declared secure in docs/system/security.rst, due too their intended usage in virtualization scenarios.
--- hw/i386/microvm.c | 1 + include/hw/i386/pc.h | 1 + 2 files changed, 2 insertions(+)
hw/i386/microvm.c +1 -0
@@ -736,6 +736,7 @@ static const TypeInfo microvm_machine_info = { .instance_init = microvm_machine_initfn, .class_size = sizeof(MicrovmMachineClass), .class_init = microvm_class_init, + .secure = true, .interfaces = (const InterfaceInfo []) { {TYPE_HOTPLUG_HANDLER }, { }
include/hw/i386/pc.h +1 -0
@@ -330,6 +330,7 @@ extern const size_t pc_compat_4_1_len; .name = MACHINE_VER_TYPE_NAME(namestr, __VA_ARGS__), \ .parent = TYPE_PC_MACHINE, \ .class_init = MACHINE_VER_SYM(class_init, namesym, __VA_ARGS__), \ + .secure = true, \ }; \ static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ { \
Signature · 1 line
2.56.0
PATCH 3/11 hw/loongarch: mark 'virt' as a secure machine
In reply to Daniel P. BerrangéThe 'virt' loongarch machine is already declared secure in docs/system/security.rst, due too its intended usage in virtualization scenarios.
--- hw/loongarch/virt.c | 1 + 1 file changed, 1 insertion(+)
hw/loongarch/virt.c +1 -0
@@ -1553,6 +1553,7 @@ static void virt_class_init(ObjectClass *oc, const void *data) .name = MACHINE_VER_TYPE_NAME("virt", __VA_ARGS__), \ .parent = TYPE_LOONGARCH_VIRT_MACHINE, \ .class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \ + .secure = true, \ }; \ static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \ { \
Signature · 1 line
2.56.0
PATCH 4/11 hw/ppc: mark 'pseries' as a secure machine
In reply to Daniel P. BerrangéThe 'pseries' ppc machine is already declared secure in docs/system/security.rst, due too its intended usage in virtualization scenarios.
--- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+)
hw/ppc/spapr.c +1 -0
@@ -4750,6 +4750,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc) .name = MACHINE_VER_TYPE_NAME("pseries", __VA_ARGS__), \ .parent = TYPE_SPAPR_MACHINE, \ .class_init = MACHINE_VER_SYM(class_init, spapr, __VA_ARGS__), \ + .secure = true, \ }; \ static void MACHINE_VER_SYM(register, spapr, __VA_ARGS__)(void) \ { \
Signature · 1 line
2.56.0
PATCH 5/11 hw/riscv: mark 'virt' as a secure machine
In reply to Daniel P. BerrangéThe 'virt' riscv machine is already declared secure in docs/system/security.rst, due too its intended usage in virtualization scenarios.
--- hw/riscv/virt.c | 1 + 1 file changed, 1 insertion(+)
hw/riscv/virt.c +1 -0
@@ -1200,6 +1200,7 @@ static const TypeInfo virt_machine_typeinfo = { .name = MACHINE_TYPE_NAME("virt"), .parent = TYPE_MACHINE, .class_init = virt_machine_class_init, + .secure = true, .instance_init = virt_machine_instance_init, .instance_finalize = virt_machine_instance_finalize, .instance_size = sizeof(RISCVVirtState),
Signature · 1 line
2.56.0
PATCH 6/11 hw/s390x: mark 's390x-ccw-virtio' as a secure machine
In reply to Daniel P. BerrangéThe 's390x-ccw-virtio' s390x machine is already declared secure in docs/system/security.rst, due too its intended usage in virtualization scenarios.
--- hw/s390x/s390-virtio-ccw.c | 1 + 1 file changed, 1 insertion(+)
hw/s390x/s390-virtio-ccw.c +1 -0
@@ -986,6 +986,7 @@ static const TypeInfo ccw_machine_info = { .name = MACHINE_VER_TYPE_NAME("s390-ccw-virtio", __VA_ARGS__), \ .parent = TYPE_S390_CCW_MACHINE, \ .class_init = MACHINE_VER_SYM(class_init, ccw, __VA_ARGS__), \ + .secure = true, \ }; \ static void MACHINE_VER_SYM(register, ccw, __VA_ARGS__)(void) \ { \
Signature · 1 line
2.56.0
Re: [PATCH 06/11] hw/s390x: mark 's390x-ccw-virtio' as a secure machine
Quoted 10 lines · Daniel P. Berrangé
The 's390x-ccw-virtio' s390x machine is already declared secure in
docs/system/security.rst, due too its intended usage in virtualization scenarios.Reviewed-by Marc-André Lureau <[email protected]>Acked-by Cornelia Huck <[email protected]>Signed-off-by Daniel P. Berrangé <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 1 + 1 file changed, 1 insertion(+)
PATCH 7/11 hw: mark xenpv, xenpvh, xenfv as secure machines
In reply to Daniel P. BerrangéThe Xen machines are already declared secure in docs/system/security.rst, due too their intended usage in virtualization scenarios.
--- hw/arm/xen-pvh.c | 1 + hw/i386/pc_piix.c | 4 ++-- hw/i386/xen/xen-pvh.c | 1 + hw/xenpv/xen_machine_pv.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-)
hw/arm/xen-pvh.c +1 -0
@@ -95,6 +95,7 @@ static const TypeInfo xen_arm_machine_type = { .class_init = xen_arm_machine_class_init, .instance_size = sizeof(XenPVHMachineState), .instance_init = xen_arm_instance_init, + .secure = true, };static void xen_arm_machine_register_types (void )
hw/i386/pc_piix.c +2 -2
@@ -667,6 +667,6 @@ static void xenfv_machine_4_2_options(MachineClass *m) m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; } -DEFINE_PC_MACHINE (xenfv_4_2,"xenfv-4.2" , pc_xen_hvm_init, - xenfv_machine_4_2_options); +DEFINE_SECURE_PC_MACHINE (xenfv_4_2,"xenfv-4.2" , pc_xen_hvm_init, + xenfv_machine_4_2_options);#endif
hw/i386/xen/xen-pvh.c +1 -0
@@ -115,6 +115,7 @@ static const TypeInfo xen_pvh_x86_machine_type = { .class_init = xen_pvh_machine_class_init, .instance_init = xen_pvh_instance_init, .instance_size = sizeof(XenPVHx86State), + .secure = true, };static void xen_pvh_machine_register_types (void )
hw/xenpv/xen_machine_pv.c +1 -1
@@ -69,4 +69,4 @@ static void xenpv_machine_init(MachineClass *mc) mc->default_machine_opts ="accel=xen" ; } -DEFINE_MACHINE ("xenpv" , xenpv_machine_init) +DEFINE_SECURE_MACHINE ("xenpv" , xenpv_machine_init)
Signature · 1 line
2.56.0
PATCH 8/11 hw/nitro: mark 'nitro' machine as secure
In reply to Daniel P. BerrangéUnlike the 'nitro-enclave' machine which provides emulation, the 'nitro' machine is used with a real AWS deployment and thus is considered to be secure.
--- hw/nitro/machine.c | 1 + 1 file changed, 1 insertion(+)
hw/nitro/machine.c +1 -0
@@ -261,6 +261,7 @@ static const TypeInfo nitro_machine_info = { .parent = TYPE_MACHINE, .instance_size = sizeof(NitroMachineState), .class_init = nitro_machine_class_init, + .secure = true, };static void nitro_machine_register (void )
Signature · 1 line
2.56.0
Re: [PATCH 08/11] hw/nitro: mark 'nitro' machine as secure
Quoted 8 lines · Daniel P. Berrangé
Unlike the 'nitro-enclave' machine which provides emulation, the 'nitro' machine is used with a real AWS deployment and thus is considered to be secure.
Signed-off-by Daniel P. Berrangé <[email protected]>--- hw/nitro/machine.c | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH 08/11] hw/nitro: mark 'nitro' machine as secure
In reply to Daniel P. BerrangéQuoted 5 lines · Daniel P. Berrangé
Unlike the 'nitro-enclave' machine which provides emulation, the 'nitro' machine is used with a real AWS deployment and thus is considered to be secure.
Signed-off-by Daniel P. Berrangé <[email protected]>
Alex
PATCH 9/11 accel/kvm: mark kvm accelerator as secure
In reply to Daniel P. BerrangéKVM is servicing virtualization use cases which must provide security and actively maintained.
--- accel/kvm/kvm-all.c | 1 + 1 file changed, 1 insertion(+)
accel/kvm/kvm-all.c +1 -0
@@ -4353,6 +4353,7 @@ static const TypeInfo kvm_accel_type = { .instance_finalize = kvm_accel_finalize, .class_init = kvm_accel_class_init, .instance_size = sizeof(KVMState), + .secure = true, };static void kvm_type_init (void )
Signature · 1 line
2.56.0
Re: [PATCH 09/11] accel/kvm: mark kvm accelerator as secure
Quoted 8 lines · Daniel P. Berrangé
KVM is servicing virtualization use cases which must provide security and actively maintained.
Reviewed-by Marc-André Lureau <[email protected]>Signed-off-by Daniel P. Berrangé <[email protected]>--- accel/kvm/kvm-all.c | 1 + 1 file changed, 1 insertion(+)
PATCH 10/11 accel/xen: mark xen accelerator as secure
In reply to Daniel P. BerrangéXen is servicing virtualization use cases which must provide security and actively maintained.
--- accel/xen/xen-all.c | 1 + 1 file changed, 1 insertion(+)
accel/xen/xen-all.c +1 -0
@@ -147,6 +147,7 @@ static const TypeInfo xen_accel_type = { .name = TYPE_XEN_ACCEL, .parent = TYPE_ACCEL, .class_init = xen_accel_class_init, + .secure = true, };static void xen_accel_ops_class_init (ObjectClass *oc,const void *data)
Signature · 1 line
2.56.0
PATCH 11/11 accel/nitro: mark 'nitro' accelerator as secure
In reply to Daniel P. BerrangéThe 'nitro' accelerator is used with a real AWS deployment and thus is considered to be secure.
--- accel/nitro/nitro-accel.c | 1 + 1 file changed, 1 insertion(+)
accel/nitro/nitro-accel.c +1 -0
@@ -251,6 +251,7 @@ static const TypeInfo nitro_accel_type = { .parent = TYPE_ACCEL, .instance_size = sizeof(NitroAccelState), .class_init = nitro_accel_class_init, + .secure = true, };module_obj (TYPE_NITRO_ACCEL );
Signature · 1 line
2.56.0
Re: [PATCH 11/11] accel/nitro: mark 'nitro' accelerator as secure
Quoted 7 lines · Daniel P. Berrangé
The 'nitro' accelerator is used with a real AWS deployment and thus is considered to be secure.
Signed-off-by Daniel P. Berrangé <[email protected]>--- accel/nitro/nitro-accel.c | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH 11/11] accel/nitro: mark 'nitro' accelerator as secure
In reply to Daniel P. BerrangéQuoted 4 lines · Daniel P. Berrangé
The 'nitro' accelerator is used with a real AWS deployment and thus is considered to be secure.
Signed-off-by Daniel P. Berrangé <[email protected]>
Alex