Misc fixes patches
Subsystems (2)
The following changes since commit 56afd82bd4db9688f1c1c9d0e2ea163b8cde3283:
Merge tag 'qemu-sparc-20261101' of https://github.com/mcayland/qemu into staging (2026-11-01 08:37:48 -0800)
are available in the Git repository at:
https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request
for you to fetch changes up to b95f1036d5f8b35d8d5b4c18d33bb6564fcbf2e5:
accel/nitro: mark 'nitro' accelerator as secure (2026-11-02 17:05:33 +0000)
----------------------------------------------------------------
* Mark virtualization related machine types as secure
* Mark KVM, Xen and Nitro accelerators as secure
* Use getexecpath on OpenBSD
----------------------------------------------------------------
Brad Smith (1):
util/cutils: Use getexecpath() on OpenBSD for qemu_init_exec_dir()
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 + meson.build | 8 ++++++++ util/cutils.c | 6 ++++++ 17 files changed, 30 insertions(+), 3 deletions(-)
Signature · 1 line
2.56.0
[PULL 08/12] hw: mark xenpv, xenpvh, xenfv as secure machines
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
[PULL 02/12] hw/arm: mark 'virt' as a secure machine
In reply to 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(+)
hw/arm/virt.c +1 -0
@@ -132,6 +132,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
[PULL 11/12] 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
[PULL 12/12] 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
[PULL 07/12] 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
[PULL 05/12] 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
@@ -4751,6 +4751,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
[PULL 04/12] 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
[PULL 09/12] 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
[PULL 01/12] util/cutils: Use getexecpath() on OpenBSD for qemu_init_exec_dir()
In reply to Daniel P. BerrangéFrom: Brad Smith <[email protected]>
util/cutils: Use getexecpath() on OpenBSD for qemu_init_exec_dir()
OpenBSD has introduced a function getexecpath() to be able to retrieve the executable name and path.
--- meson.build | 8 ++++++++ util/cutils.c | 6 ++++++ 2 files changed, 14 insertions(+)
meson.build +8 -0
@@ -3040,6 +3040,14 @@ config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(osdep_prefix + ''' return hwcap; }''')) +config_host_data.set('CONFIG_GETEXECPATH', cc.links(osdep_prefix + ''' + #include <limits.h> + #include <unistd.h> + int main(void) { + char buf[PATH_MAX]; + getexecpath(buf, sizeof(buf)); + }''')) + config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles(''' #include <linux/usbdevice_fs.h>
util/cutils.c +6 -0
@@ -1097,6 +1097,12 @@ void qemu_init_exec_dir(const char *argv0) p = buf; } } +#elif defined(__OpenBSD__) && defined(CONFIG_GETEXECPATH) + { +if (getexecpath (buf,sizeof (buf)) ==0 ) { + p = buf; + } + }#elif defined(__APPLE__) {char fpath[PATH_MAX ];
Signature · 1 line
2.56.0
[PULL 06/12] 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
@@ -1201,6 +1201,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
[PULL 10/12] 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
[PULL 03/12] 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
Richard Henderson
AppliedQuoted 8 lines · Daniel P. Berrangé
The following changes since commit
56afd82bd4db9688f1c1c9d0e2ea163b8cde3283:Merge tag 'qemu-sparc-20261101' ofhttps://github.com/mcayland/qemu into staging (2026-11-01 08:37:48 -0800)are available in the Git repository at:
https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request
Quoted 8 lines
for you to fetch changes up to
b95f1036d5f8b35d8d5b4c18d33bb6564fcbf2e5:accel/nitro: mark 'nitro' accelerator as secure (2026-11-02 17:05:33 +0000)----------------------------------------------------------------
* Mark virtualization related machine types as secure
* Mark KVM, Xen and Nitro accelerators as secure
* Use getexecpath on OpenBSD
Applied, thanks.
r~