Skip to contentSkip to conversation

hw: mark virtualization related machines & accelerators as secure

PATCH In review Daniel P. Berrangé 4 participants 19 messages Oct 27 – Oct 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 0d56197dace..43b9212edc2 100644
@@ -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
Reviewed-by on v1 1/11
#2 lore raw

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.

---
  hw/arm/virt.c | 1 +
  1 file changed, 1 insertion(+)
#3 lore raw

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
index a49de337497..342aa7a9dd0 100644
@@ -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
index 8edec62a1af..4ac489d2ffa 100644
@@ -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
#4 lore raw

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
index 9c5371af9de..c83c0b6cb19 100644
@@ -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
#5 lore raw

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
index 6d994644865..7fe3202f635 100644
@@ -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
#6 lore raw

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
index d4b501802f6..489ebae4105 100644
@@ -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
#7 lore raw

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
index fda5ecc9ad3..15b16ba99d0 100644
@@ -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
Reviewed-by on v1 6/11
#8 lore raw

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.

---
  hw/s390x/s390-virtio-ccw.c | 1 +
  1 file changed, 1 insertion(+)
#9 lore raw

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
index f05956c1662..6b85eced1bb 100644
@@ -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
index 63c4667ea37..e801325dd6e 100644
@@ -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
index ab90c83a830..d81575b4c9b 100644
@@ -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
index c406821c34c..e0620a096ee 100644
@@ -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
#10 lore raw

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
index 88d01960a01..2e88e150c93 100644
@@ -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
Reviewed-by on v1 8/11
#11 lore raw

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.

---
  hw/nitro/machine.c | 1 +
  1 file changed, 1 insertion(+)
#13 lore raw

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
index db8fba53f33..66bc7f3a83a 100644
@@ -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
#15 lore raw

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
index bb2d02cb221..94f20e1d29a 100644
@@ -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
#16 lore raw

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
index a1e97a9162e..a1489b8019a 100644
@@ -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