* [PATCH v3 00/26] Mark user creatable devices for secure for virt use case
@ 2026-11-13 18:42 Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
` (25 more replies)
0 siblings, 26 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
This (largish) series undertakes the task of marking devices
secure, if they are intended to be used a virtualization
use case.
NB, this is only tagging leaf types in the QOM tree. This
implicitly means their parents are also secure, as well as
any child devices they are hardcoded to create internally,
but those are not (yet) tagged. Tagging parents and implicit
created devices is future work.
NB, the maintainer CC list was way too huge to include every
individual, so I've trimmed to just the mailing list CCs.
The marking of machine types / accelerators was split off to
https://lists.gnu.org/archive/html/qemu-devel/2026-10/msg07775.html
I used the docs/system/security.txt along with the RHEL builds
of QEMU as an approximation for what should be considered
"virtualization use case". The latter cuts out a huge pile of
devices from the build. IOW, more or less everything that RHEL
builds for x86_64, ppc64, aarch64, s390x gets included. Notably
since RHEL does not yet ship riscv or loongarch, I've possibly
missed some devices that ought to be in scope.
Devices are marked secure *regardless* of their maintainer
status, if they are relevant to virt. Notably all the USB
stuff is included despite USB being orphaned. An exception
is CXL which is arguably relevant to virt, but maintainers
agreed it is too immature to include so far, and we've been
explicitly excluding from CVE triage since the AI flood.
IOW, the "secure" flag as set in this series mostly avoids
saying anything about the support status of the object types.
Over the long term, IMHO, the set of devices we declare as
providing a security boundary needs to be stable. We should
not declare a device out of scope for the virt use case simply
because a maintainer steps aside. The device doesn't become
instantly less secure. It does mean bug fixes may not be
timely enough, and rely on the goodwill of other contributors
or maintainers to step up and fix.
Or to put it another way. "secure = true" does not guarantee
that the device is secure, but it states our intent that we
*want* it to be secure, as opposed to "secure = false" / unset
which indicates we just don't care either way.
The intersection of (secure, orphaned) highlights to QEMU
contributors or corporate sponsors, where they might step
up their effort / investment.
Changed in v3:
- Refactor way virtio devices are marked (patch 1)
- Drop PNV PCI hosts
- Drop remote PCI host
- Drop virtio-{vga,gpu}-{gl,rutabaga}
- Drop QXL, Cirrus
- Drop UHCI, EHCI, OHCI USB controllers
Changed in v2:
- Split off setting of UHCI, OCHI, ECHI to separate
patch since it is debatable whether to include these
- Split off Cirrus and QXL to seaprate patch since it
is debatable whether to include these
- Split off accelerators/machines to a seplarate
(already postd) series.
- Dropped annotations accidentally included on some
parent (abstract) types. This will be dealt with
in the next release cycle
- Really dropped annotations for CXL
- Dropped vmware SCSI device
Daniel P. Berrangé (26):
hw: mark most virtio PCI devices as secure
hw: mark all virtio CCW devices as secure
hw: mark all vhost devices a secure
hw: mark most remaining virtio object types as secure
hw/vfio: mark all VFIO object classes as secure
hw/xen: mark all Xen related object types as being secure
hw/net: mark e1000, e1000e, rtl8139 & sPAPR VLAN as secure
hw/usb: mark commonly used USB devices/hosts as secure
hw/watchdog: mark some watchdog devices as secure
hw/scsi: mark spapr SCSI controller as secure
hw/scsi: mark SCSI disk endpoint devices as secure
hw/ide: mark ICH9 and ide-hd/ide-cd as secure
hw: define most common PCI types as secure
hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts as secure
hw/display: mark bochs, ramfb and VGA as secure
hw/tpm: mark all TPM implementations as secure
hw/misc: mark pvpanic, vmcoreinfo as secure
hw/audio: mark Intel HDA devices & codecs as secure
hw/char: mark common serial / console devices as secure
hw/mem: mark nvdimm, pc-dimm & spapr-nvdimm devices as secure
hw/uefi: mark the EFI vars service as secure
hw/acpi: mark erst, vmclock and vmgenid devices as secure
hw: mark KVM clock and RTC devices as secure
hw: device AMD, Intel and ARM IOMMUs as secure
hw/input: mark PS/2 and PC Keyboard devices as secure
hw/i386: mark vmmouse / vmport as secure
hw/9pfs/virtio-9p-device.c | 1 +
hw/acpi/erst.c | 1 +
hw/acpi/vmclock.c | 1 +
hw/acpi/vmgenid.c | 1 +
hw/arm/smmuv3.c | 2 ++
hw/audio/hda-codec.c | 3 +++
hw/audio/intel-hda.c | 3 +++
hw/audio/virtio-snd.c | 1 +
hw/block/vhost-user-blk.c | 1 +
hw/block/virtio-blk.c | 1 +
hw/block/xen-block.c | 2 ++
hw/char/debugcon.c | 1 +
hw/char/sclpconsole-lm.c | 1 +
hw/char/sclpconsole.c | 1 +
hw/char/serial-isa.c | 1 +
hw/char/serial-pci.c | 1 +
hw/char/serial.c | 1 +
hw/char/spapr_vty.c | 1 +
hw/char/virtio-console.c | 2 ++
hw/char/virtio-serial-bus.c | 2 ++
hw/char/xen_console.c | 1 +
hw/display/bochs-display.c | 1 +
hw/display/ramfb-standalone.c | 1 +
hw/display/vga-pci.c | 2 ++
hw/display/vhost-user-gpu.c | 1 +
hw/display/virtio-gpu-pci-gl.c | 2 +-
hw/display/virtio-gpu.c | 1 +
hw/display/virtio-vga-gl.c | 2 +-
hw/display/virtio-vga-rutabaga.c | 2 +-
hw/i386/amd_iommu.c | 4 +++-
hw/i386/intel_iommu.c | 1 +
hw/i386/kvm/clock.c | 1 +
hw/i386/vmmouse.c | 1 +
hw/i386/vmport.c | 1 +
hw/i386/xen/xen-hvm.c | 1 +
hw/i386/xen/xen_platform.c | 1 +
hw/i386/xen/xen_pvdevice.c | 1 +
hw/ide/ich.c | 1 +
hw/ide/ide-dev.c | 2 ++
hw/ide/piix.c | 2 ++
hw/input/pckbd.c | 3 ++-
hw/input/ps2.c | 6 ++++--
hw/input/virtio-input-hid.c | 4 ++++
hw/input/virtio-input-host.c | 1 +
hw/mem/nvdimm.c | 1 +
hw/mem/pc-dimm.c | 1 +
hw/misc/pvpanic-isa.c | 1 +
hw/misc/pvpanic-mmio.c | 1 +
hw/misc/pvpanic-pci.c | 1 +
hw/misc/vmcoreinfo.c | 1 +
hw/net/e1000.c | 1 +
hw/net/e1000e.c | 1 +
hw/net/rtl8139.c | 1 +
hw/net/spapr_llan.c | 1 +
hw/net/virtio-net.c | 1 +
hw/net/xen_nic.c | 1 +
hw/pci-bridge/gen_pcie_downstream_port.c | 1 +
hw/pci-bridge/gen_pcie_root_port.c | 1 +
hw/pci-bridge/gen_pcie_upstream_port.c | 1 +
hw/pci-bridge/i82801b11.c | 1 +
hw/pci-bridge/ioh3420.c | 1 +
hw/pci-bridge/pci_bridge_dev.c | 2 ++
hw/pci-bridge/pci_expander_bridge.c | 5 +++++
hw/pci-bridge/pcie_pci_bridge.c | 1 +
hw/pci-bridge/xio3130_downstream.c | 1 +
hw/pci-bridge/xio3130_upstream.c | 1 +
hw/pci-host/gpex.c | 2 ++
hw/pci-host/i440fx.c | 2 ++
hw/pci-host/q35.c | 2 ++
hw/pci-host/xen_igd_pt.c | 1 +
hw/pci/pci.c | 4 ++++
hw/ppc/spapr_nvdimm.c | 1 +
hw/ppc/spapr_pci.c | 1 +
hw/ppc/spapr_tpm_proxy.c | 1 +
hw/rtc/mc146818rtc.c | 1 +
hw/s390x/s390-pci-bus.c | 4 ++++
hw/s390x/vhost-scsi-ccw.c | 1 +
hw/s390x/vhost-user-fs-ccw.c | 1 +
hw/s390x/vhost-vsock-ccw.c | 1 +
hw/s390x/virtio-ccw-9p.c | 1 +
hw/s390x/virtio-ccw-balloon.c | 1 +
hw/s390x/virtio-ccw-blk.c | 1 +
hw/s390x/virtio-ccw-crypto.c | 1 +
hw/s390x/virtio-ccw-gpu.c | 1 +
hw/s390x/virtio-ccw-input.c | 3 +++
hw/s390x/virtio-ccw-mem.c | 1 +
hw/s390x/virtio-ccw-net.c | 1 +
hw/s390x/virtio-ccw-rng.c | 1 +
hw/s390x/virtio-ccw-scsi.c | 1 +
hw/s390x/virtio-ccw-serial.c | 1 +
hw/scsi/scsi-disk.c | 3 +++
hw/scsi/scsi-generic.c | 1 +
hw/scsi/spapr_vscsi.c | 1 +
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c | 1 +
hw/scsi/virtio-scsi.c | 1 +
hw/tpm/tpm_crb.c | 1 +
hw/tpm/tpm_spapr.c | 1 +
hw/tpm/tpm_tis_i2c.c | 1 +
hw/tpm/tpm_tis_isa.c | 1 +
hw/tpm/tpm_tis_sysbus.c | 1 +
hw/uefi/var-service-sysbus.c | 2 ++
hw/usb/ccid-card-emulated.c | 1 +
hw/usb/ccid-card-passthru.c | 1 +
hw/usb/dev-hid.c | 3 +++
hw/usb/dev-hub.c | 1 +
hw/usb/dev-smartcard-reader.c | 2 ++
hw/usb/dev-storage-bot.c | 1 +
hw/usb/dev-storage-classic.c | 1 +
hw/usb/hcd-xhci-nec.c | 1 +
hw/usb/hcd-xhci-pci.c | 1 +
hw/usb/hcd-xhci-sysbus.c | 3 ++-
hw/usb/hcd-xhci.c | 1 +
hw/usb/host-libusb.c | 1 +
hw/usb/redirect.c | 1 +
hw/vfio-user/pci.c | 1 +
hw/vfio/ap.c | 1 +
hw/vfio/ccw.c | 1 +
hw/vfio/igd.c | 1 +
hw/vfio/iommufd.c | 2 ++
hw/vfio/pci.c | 2 ++
hw/vfio/spapr.c | 1 +
hw/virtio/vdpa-dev.c | 1 +
hw/virtio/vhost-user-fs.c | 1 +
hw/virtio/vhost-user-gpio.c | 1 +
hw/virtio/vhost-user-i2c.c | 1 +
hw/virtio/vhost-user-input.c | 1 +
hw/virtio/vhost-user-rng.c | 1 +
hw/virtio/vhost-user-rtc.c | 1 +
hw/virtio/vhost-user-scmi.c | 1 +
hw/virtio/vhost-user-snd.c | 1 +
hw/virtio/vhost-user-spi.c | 1 +
hw/virtio/vhost-user-test-device.c | 1 +
hw/virtio/vhost-user-vsock.c | 1 +
hw/virtio/vhost-vsock.c | 1 +
hw/virtio/virtio-balloon.c | 1 +
hw/virtio/virtio-crypto.c | 1 +
hw/virtio/virtio-iommu.c | 2 ++
hw/virtio/virtio-mem.c | 1 +
hw/virtio/virtio-mmio.c | 2 ++
hw/virtio/virtio-nsm.c | 1 +
hw/virtio/virtio-pci.c | 17 ++++++++++++++++-
hw/virtio/virtio-pmem.c | 1 +
hw/virtio/virtio-rng.c | 1 +
hw/virtio/virtio-rtc.c | 1 +
hw/watchdog/sbsa_gwdt.c | 1 +
hw/watchdog/spapr_watchdog.c | 1 +
hw/watchdog/wdt_diag288.c | 1 +
hw/watchdog/wdt_i6300esb.c | 1 +
hw/watchdog/wdt_ib700.c | 1 +
hw/xen/xen-bus.c | 2 ++
hw/xen/xen-legacy-backend.c | 3 +++
hw/xen/xen_pt.c | 1 +
include/hw/virtio/virtio-pci.h | 10 +++++++++-
154 files changed, 227 insertions(+), 10 deletions(-)
--
2.56.1
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH v3 01/26] hw: mark most virtio PCI devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-16 13:05 ` Thomas Huth
2026-11-16 13:08 ` Marc-André Lureau
2026-11-13 18:42 ` [PATCH v3 02/26] hw: mark all virtio CCW " Daniel P. Berrangé
` (24 subsequent siblings)
25 siblings, 2 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are all intended for use in a virtualization scenario and must
provide a security boundary. This can be done for almost all virtio
PCI devices by modifying the common type register helper.
Exceptions are made for the virtio-gpu-gl, virtio-vga-gl,
virtio-vga-rutatbaga and virtio-gpu-rutabaga devices.
Despite being intended for virtualization use cases, the complexity
of support for 3d acceleration is such that QEMU can't offer security
for these devices at this time.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/display/virtio-gpu-pci-gl.c | 2 +-
hw/display/virtio-vga-gl.c | 2 +-
hw/display/virtio-vga-rutabaga.c | 2 +-
hw/virtio/virtio-pci.c | 17 ++++++++++++++++-
include/hw/virtio/virtio-pci.h | 10 +++++++++-
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/hw/display/virtio-gpu-pci-gl.c b/hw/display/virtio-gpu-pci-gl.c
index c8923795dfa..dc67516b377 100644
--- a/hw/display/virtio-gpu-pci-gl.c
+++ b/hw/display/virtio-gpu-pci-gl.c
@@ -51,7 +51,7 @@ module_kconfig(VIRTIO_PCI);
static void virtio_gpu_gl_pci_register_types(void)
{
- virtio_pci_types_register(&virtio_gpu_gl_pci_info);
+ virtio_pci_types_register_insecure(&virtio_gpu_gl_pci_info);
}
type_init(virtio_gpu_gl_pci_register_types)
diff --git a/hw/display/virtio-vga-gl.c b/hw/display/virtio-vga-gl.c
index 178e4c71725..029d288c035 100644
--- a/hw/display/virtio-vga-gl.c
+++ b/hw/display/virtio-vga-gl.c
@@ -42,7 +42,7 @@ module_kconfig(VIRTIO_VGA);
static void virtio_vga_register_types(void)
{
if (have_vga) {
- virtio_pci_types_register(&virtio_vga_gl_info);
+ virtio_pci_types_register_insecure(&virtio_vga_gl_info);
}
}
diff --git a/hw/display/virtio-vga-rutabaga.c b/hw/display/virtio-vga-rutabaga.c
index 1e07ee0b0d3..8ff715f8a35 100644
--- a/hw/display/virtio-vga-rutabaga.c
+++ b/hw/display/virtio-vga-rutabaga.c
@@ -41,7 +41,7 @@ module_kconfig(VIRTIO_VGA);
static void virtio_vga_register_types(void)
{
if (have_vga) {
- virtio_pci_types_register(&virtio_vga_rutabaga_info);
+ virtio_pci_types_register_insecure(&virtio_vga_rutabaga_info);
}
}
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index c73f1f546cb..fe2e545c302 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2510,7 +2510,9 @@ static void virtio_pci_non_transitional_instance_init(Object *obj)
proxy->disable_modern = false;
}
-void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
+static void
+virtio_pci_types_register_internal(const VirtioPCIDeviceTypeInfo *t,
+ bool secure)
{
char *base_name = NULL;
TypeInfo base_type_info = {
@@ -2527,6 +2529,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
.name = t->generic_name,
.parent = base_type_info.name,
.class_init = virtio_pci_generic_class_init,
+ .secure = secure,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
@@ -2562,6 +2565,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
.name = t->non_transitional_name,
.parent = base_type_info.name,
.instance_init = virtio_pci_non_transitional_instance_init,
+ .secure = secure,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
@@ -2576,6 +2580,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
.name = t->transitional_name,
.parent = base_type_info.name,
.instance_init = virtio_pci_transitional_instance_init,
+ .secure = secure,
.interfaces = (const InterfaceInfo[]) {
/*
* Transitional virtio devices work only as Conventional PCI
@@ -2590,6 +2595,16 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
g_free(base_name);
}
+void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
+{
+ virtio_pci_types_register_internal(t, true);
+}
+
+void virtio_pci_types_register_insecure(const VirtioPCIDeviceTypeInfo *t)
+{
+ virtio_pci_types_register_internal(t, false);
+}
+
unsigned virtio_pci_optimal_num_queues(unsigned fixed_queues)
{
/*
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index ee50fb0d551..f033237035a 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -239,8 +239,16 @@ typedef struct VirtioPCIDeviceTypeInfo {
const InterfaceInfo *interfaces;
} VirtioPCIDeviceTypeInfo;
-/* Register virtio-pci type(s). @t must be static. */
+/*
+ * Register virtio-pci type(s).
+ * @t must be static.
+ *
+ * Since they serve the virtualization use case, most virtio
+ * devices are expected to be classed as secure. In the rare
+ * scenario where this is not desired, use the second method.
+ */
void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t);
+void virtio_pci_types_register_insecure(const VirtioPCIDeviceTypeInfo *t);
/**
* virtio_pci_optimal_num_queues:
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 02/26] hw: mark all virtio CCW devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 03/26] hw: mark all vhost devices a secure Daniel P. Berrangé
` (23 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé, Eric Farman, Cornelia Huck
These are all intended for use in a virtualization scenario and must
provide a security boundary.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/s390x/vhost-scsi-ccw.c | 1 +
hw/s390x/vhost-user-fs-ccw.c | 1 +
hw/s390x/vhost-vsock-ccw.c | 1 +
hw/s390x/virtio-ccw-9p.c | 1 +
hw/s390x/virtio-ccw-balloon.c | 1 +
hw/s390x/virtio-ccw-blk.c | 1 +
hw/s390x/virtio-ccw-crypto.c | 1 +
hw/s390x/virtio-ccw-gpu.c | 1 +
hw/s390x/virtio-ccw-input.c | 3 +++
hw/s390x/virtio-ccw-mem.c | 1 +
hw/s390x/virtio-ccw-net.c | 1 +
hw/s390x/virtio-ccw-rng.c | 1 +
hw/s390x/virtio-ccw-scsi.c | 1 +
hw/s390x/virtio-ccw-serial.c | 1 +
14 files changed, 16 insertions(+)
diff --git a/hw/s390x/vhost-scsi-ccw.c b/hw/s390x/vhost-scsi-ccw.c
index 1e68459eb0e..2bd51a80332 100644
--- a/hw/s390x/vhost-scsi-ccw.c
+++ b/hw/s390x/vhost-scsi-ccw.c
@@ -62,6 +62,7 @@ static const TypeInfo vhost_ccw_scsi = {
.instance_size = sizeof(VHostSCSICcw),
.instance_init = vhost_ccw_scsi_instance_init,
.class_init = vhost_ccw_scsi_class_init,
+ .secure = true,
};
static void virtio_ccw_scsi_register(void)
diff --git a/hw/s390x/vhost-user-fs-ccw.c b/hw/s390x/vhost-user-fs-ccw.c
index 35a77e4cb71..6d341dc5e93 100644
--- a/hw/s390x/vhost-user-fs-ccw.c
+++ b/hw/s390x/vhost-user-fs-ccw.c
@@ -64,6 +64,7 @@ static const TypeInfo vhost_user_fs_ccw = {
.instance_size = sizeof(VHostUserFSCcw),
.instance_init = vhost_user_fs_ccw_instance_init,
.class_init = vhost_user_fs_ccw_class_init,
+ .secure = true,
};
static void vhost_user_fs_ccw_register(void)
diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c
index efdfdeec84c..92b6d177e80 100644
--- a/hw/s390x/vhost-vsock-ccw.c
+++ b/hw/s390x/vhost-vsock-ccw.c
@@ -71,6 +71,7 @@ static const TypeInfo vhost_vsock_ccw_info = {
.instance_size = sizeof(VHostVSockCCWState),
.instance_init = vhost_vsock_ccw_instance_init,
.class_init = vhost_vsock_ccw_class_init,
+ .secure = true,
};
static void vhost_vsock_ccw_register(void)
diff --git a/hw/s390x/virtio-ccw-9p.c b/hw/s390x/virtio-ccw-9p.c
index d8612f7cd13..08d3ee577b4 100644
--- a/hw/s390x/virtio-ccw-9p.c
+++ b/hw/s390x/virtio-ccw-9p.c
@@ -64,6 +64,7 @@ static const TypeInfo virtio_ccw_9p_info = {
.instance_size = sizeof(V9fsCCWState),
.instance_init = virtio_ccw_9p_instance_init,
.class_init = virtio_ccw_9p_class_init,
+ .secure = true,
};
static void virtio_ccw_9p_register(void)
diff --git a/hw/s390x/virtio-ccw-balloon.c b/hw/s390x/virtio-ccw-balloon.c
index 4f67310b693..f7f5640cf12 100644
--- a/hw/s390x/virtio-ccw-balloon.c
+++ b/hw/s390x/virtio-ccw-balloon.c
@@ -69,6 +69,7 @@ static const TypeInfo virtio_ccw_balloon = {
.instance_size = sizeof(VirtIOBalloonCcw),
.instance_init = virtio_ccw_balloon_instance_init,
.class_init = virtio_ccw_balloon_class_init,
+ .secure = true,
};
static void virtio_ccw_balloon_register(void)
diff --git a/hw/s390x/virtio-ccw-blk.c b/hw/s390x/virtio-ccw-blk.c
index 939dcaeed38..dd4ac892b20 100644
--- a/hw/s390x/virtio-ccw-blk.c
+++ b/hw/s390x/virtio-ccw-blk.c
@@ -67,6 +67,7 @@ static const TypeInfo virtio_ccw_blk = {
.instance_size = sizeof(VirtIOBlkCcw),
.instance_init = virtio_ccw_blk_instance_init,
.class_init = virtio_ccw_blk_class_init,
+ .secure = true,
};
static void virtio_ccw_blk_register(void)
diff --git a/hw/s390x/virtio-ccw-crypto.c b/hw/s390x/virtio-ccw-crypto.c
index 2c4ee2ca394..9f274562ac1 100644
--- a/hw/s390x/virtio-ccw-crypto.c
+++ b/hw/s390x/virtio-ccw-crypto.c
@@ -67,6 +67,7 @@ static const TypeInfo virtio_ccw_crypto = {
.instance_size = sizeof(VirtIOCryptoCcw),
.instance_init = virtio_ccw_crypto_instance_init,
.class_init = virtio_ccw_crypto_class_init,
+ .secure = true,
};
static void virtio_ccw_crypto_register(void)
diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c
index 4120c6bcb9f..79c302860f7 100644
--- a/hw/s390x/virtio-ccw-gpu.c
+++ b/hw/s390x/virtio-ccw-gpu.c
@@ -66,6 +66,7 @@ static const TypeInfo virtio_ccw_gpu = {
.instance_size = sizeof(VirtIOGPUCcw),
.instance_init = virtio_ccw_gpu_instance_init,
.class_init = virtio_ccw_gpu_class_init,
+ .secure = true,
};
module_obj(TYPE_VIRTIO_GPU_CCW);
module_kconfig(VIRTIO_CCW);
diff --git a/hw/s390x/virtio-ccw-input.c b/hw/s390x/virtio-ccw-input.c
index a9ec60428ca..532f230617d 100644
--- a/hw/s390x/virtio-ccw-input.c
+++ b/hw/s390x/virtio-ccw-input.c
@@ -110,6 +110,7 @@ static const TypeInfo virtio_ccw_keyboard = {
.parent = TYPE_VIRTIO_INPUT_HID_CCW,
.instance_size = sizeof(VirtIOInputHIDCcw),
.instance_init = virtio_ccw_keyboard_instance_init,
+ .secure = true,
};
static const TypeInfo virtio_ccw_mouse = {
@@ -117,6 +118,7 @@ static const TypeInfo virtio_ccw_mouse = {
.parent = TYPE_VIRTIO_INPUT_HID_CCW,
.instance_size = sizeof(VirtIOInputHIDCcw),
.instance_init = virtio_ccw_mouse_instance_init,
+ .secure = true,
};
static const TypeInfo virtio_ccw_tablet = {
@@ -124,6 +126,7 @@ static const TypeInfo virtio_ccw_tablet = {
.parent = TYPE_VIRTIO_INPUT_HID_CCW,
.instance_size = sizeof(VirtIOInputHIDCcw),
.instance_init = virtio_ccw_tablet_instance_init,
+ .secure = true,
};
static void virtio_ccw_input_register(void)
diff --git a/hw/s390x/virtio-ccw-mem.c b/hw/s390x/virtio-ccw-mem.c
index c9d09237c23..252d554a6cb 100644
--- a/hw/s390x/virtio-ccw-mem.c
+++ b/hw/s390x/virtio-ccw-mem.c
@@ -218,6 +218,7 @@ static const TypeInfo virtio_ccw_mem = {
.instance_size = sizeof(VirtIOMEMCcw),
.instance_init = virtio_ccw_mem_instance_init,
.class_init = virtio_ccw_mem_class_init,
+ .secure = true,
};
static void virtio_ccw_mem_register_types(void)
diff --git a/hw/s390x/virtio-ccw-net.c b/hw/s390x/virtio-ccw-net.c
index 30e7055ab2b..d39311a9f01 100644
--- a/hw/s390x/virtio-ccw-net.c
+++ b/hw/s390x/virtio-ccw-net.c
@@ -70,6 +70,7 @@ static const TypeInfo virtio_ccw_net = {
.instance_size = sizeof(VirtIONetCcw),
.instance_init = virtio_ccw_net_instance_init,
.class_init = virtio_ccw_net_class_init,
+ .secure = true,
};
static void virtio_ccw_net_register(void)
diff --git a/hw/s390x/virtio-ccw-rng.c b/hw/s390x/virtio-ccw-rng.c
index 0647621e33d..8b62fd99056 100644
--- a/hw/s390x/virtio-ccw-rng.c
+++ b/hw/s390x/virtio-ccw-rng.c
@@ -66,6 +66,7 @@ static const TypeInfo virtio_ccw_rng = {
.instance_size = sizeof(VirtIORNGCcw),
.instance_init = virtio_ccw_rng_instance_init,
.class_init = virtio_ccw_rng_class_init,
+ .secure = true,
};
static void virtio_ccw_rng_register(void)
diff --git a/hw/s390x/virtio-ccw-scsi.c b/hw/s390x/virtio-ccw-scsi.c
index c181a2b7692..baac329d75c 100644
--- a/hw/s390x/virtio-ccw-scsi.c
+++ b/hw/s390x/virtio-ccw-scsi.c
@@ -76,6 +76,7 @@ static const TypeInfo virtio_ccw_scsi = {
.instance_size = sizeof(VirtIOSCSICcw),
.instance_init = virtio_ccw_scsi_instance_init,
.class_init = virtio_ccw_scsi_class_init,
+ .secure = true,
};
static void virtio_ccw_scsi_register(void)
diff --git a/hw/s390x/virtio-ccw-serial.c b/hw/s390x/virtio-ccw-serial.c
index 7ff07a08412..9a1686a4dc3 100644
--- a/hw/s390x/virtio-ccw-serial.c
+++ b/hw/s390x/virtio-ccw-serial.c
@@ -76,6 +76,7 @@ static const TypeInfo virtio_ccw_serial = {
.instance_size = sizeof(VirtioSerialCcw),
.instance_init = virtio_ccw_serial_instance_init,
.class_init = virtio_ccw_serial_class_init,
+ .secure = true,
};
static void virtio_ccw_serial_register(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 03/26] hw: mark all vhost devices a secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 02/26] hw: mark all virtio CCW " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 04/26] hw: mark most remaining virtio object types as secure Daniel P. Berrangé
` (22 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are all intended for use in a virtualization scenario and must
provide a security boundary.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/block/vhost-user-blk.c | 1 +
hw/display/vhost-user-gpu.c | 1 +
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c | 1 +
hw/virtio/vhost-user-fs.c | 1 +
hw/virtio/vhost-user-gpio.c | 1 +
hw/virtio/vhost-user-i2c.c | 1 +
hw/virtio/vhost-user-input.c | 1 +
hw/virtio/vhost-user-rng.c | 1 +
hw/virtio/vhost-user-rtc.c | 1 +
hw/virtio/vhost-user-scmi.c | 1 +
hw/virtio/vhost-user-snd.c | 1 +
hw/virtio/vhost-user-spi.c | 1 +
hw/virtio/vhost-user-test-device.c | 1 +
hw/virtio/vhost-user-vsock.c | 1 +
hw/virtio/vhost-vsock.c | 1 +
16 files changed, 16 insertions(+)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 1352a0cf578..d1d10427201 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -697,6 +697,7 @@ static const TypeInfo vhost_user_blk_info = {
.instance_size = sizeof(VHostUserBlk),
.instance_init = vhost_user_blk_instance_init,
.class_init = vhost_user_blk_class_init,
+ .secure = true,
};
static void vhost_user_blk_set_inflight_migration(Object *obj, Visitor *v,
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index c09aca04113..32e7d9638f6 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -726,6 +726,7 @@ static const TypeInfo vhost_user_gpu_info = {
.instance_init = vhost_user_gpu_instance_init,
.instance_finalize = vhost_user_gpu_instance_finalize,
.class_init = vhost_user_gpu_class_init,
+ .secure = true,
};
module_obj(TYPE_VHOST_USER_GPU);
module_kconfig(VHOST_USER_GPU);
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 657403cad01..e1f209fabb3 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -400,6 +400,7 @@ static const TypeInfo vhost_scsi_info = {
.instance_size = sizeof(VHostSCSI),
.class_init = vhost_scsi_class_init,
.instance_init = vhost_scsi_instance_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_FW_PATH_PROVIDER },
{ }
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 7687f2804f8..4374a54962b 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -426,6 +426,7 @@ static const TypeInfo vhost_user_scsi_info = {
.instance_size = sizeof(VHostUserSCSI),
.class_init = vhost_user_scsi_class_init,
.instance_init = vhost_user_scsi_instance_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_FW_PATH_PROVIDER },
{ }
diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c
index 0d8842817a1..3a97038ee7b 100644
--- a/hw/virtio/vhost-user-fs.c
+++ b/hw/virtio/vhost-user-fs.c
@@ -448,6 +448,7 @@ static const TypeInfo vuf_info = {
.instance_size = sizeof(VHostUserFS),
.instance_init = vuf_instance_init,
.class_init = vuf_class_init,
+ .secure = true,
};
static void vuf_register_types(void)
diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c
index d473f870778..cec21106e0b 100644
--- a/hw/virtio/vhost-user-gpio.c
+++ b/hw/virtio/vhost-user-gpio.c
@@ -53,6 +53,7 @@ static const TypeInfo vu_gpio_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserGPIO),
.class_init = vu_gpio_class_init,
+ .secure = true,
};
static void vu_gpio_register_types(void)
diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c
index 152b1f67401..17b0b444139 100644
--- a/hw/virtio/vhost-user-i2c.c
+++ b/hw/virtio/vhost-user-i2c.c
@@ -53,6 +53,7 @@ static const TypeInfo vu_i2c_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserI2C),
.class_init = vu_i2c_class_init,
+ .secure = true,
};
static void vu_i2c_register_types(void)
diff --git a/hw/virtio/vhost-user-input.c b/hw/virtio/vhost-user-input.c
index 5cfc5bbb564..a850e3770e0 100644
--- a/hw/virtio/vhost-user-input.c
+++ b/hw/virtio/vhost-user-input.c
@@ -47,6 +47,7 @@ static const TypeInfo vhost_input_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserInput),
.class_init = vhost_input_class_init,
+ .secure = true,
};
static void vhost_input_register_types(void)
diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c
index 106c8f211aa..dc1286559cf 100644
--- a/hw/virtio/vhost-user-rng.c
+++ b/hw/virtio/vhost-user-rng.c
@@ -55,6 +55,7 @@ static const TypeInfo vu_rng_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserRNG),
.class_init = vu_rng_class_init,
+ .secure = true,
};
static void vu_rng_register_types(void)
diff --git a/hw/virtio/vhost-user-rtc.c b/hw/virtio/vhost-user-rtc.c
index 88b0c70b903..2cb949590ec 100644
--- a/hw/virtio/vhost-user-rtc.c
+++ b/hw/virtio/vhost-user-rtc.c
@@ -54,6 +54,7 @@ static const TypeInfo vu_rtc_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserRTC),
.class_init = vu_rtc_class_init,
+ .secure = true,
};
static void vu_rtc_register_types(void)
diff --git a/hw/virtio/vhost-user-scmi.c b/hw/virtio/vhost-user-scmi.c
index 29d37716b3c..ad5c176c1e2 100644
--- a/hw/virtio/vhost-user-scmi.c
+++ b/hw/virtio/vhost-user-scmi.c
@@ -311,6 +311,7 @@ static const TypeInfo vu_scmi_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VHostUserSCMI),
.class_init = vu_scmi_class_init,
+ .secure = true,
};
static void vu_scmi_register_types(void)
diff --git a/hw/virtio/vhost-user-snd.c b/hw/virtio/vhost-user-snd.c
index 7129b77d9c0..3695534aa2c 100644
--- a/hw/virtio/vhost-user-snd.c
+++ b/hw/virtio/vhost-user-snd.c
@@ -72,6 +72,7 @@ static const TypeInfo vu_snd_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserSound),
.class_init = vu_snd_class_init,
+ .secure = true,
};
static void vu_snd_register_types(void)
diff --git a/hw/virtio/vhost-user-spi.c b/hw/virtio/vhost-user-spi.c
index 707f96c2505..58d5fd7b469 100644
--- a/hw/virtio/vhost-user-spi.c
+++ b/hw/virtio/vhost-user-spi.c
@@ -55,6 +55,7 @@ static const TypeInfo vu_spi_info = {
.parent = TYPE_VHOST_USER_BASE,
.instance_size = sizeof(VHostUserSPI),
.class_init = vu_spi_class_init,
+ .secure = true,
};
static void vu_spi_register_types(void)
diff --git a/hw/virtio/vhost-user-test-device.c b/hw/virtio/vhost-user-test-device.c
index a2f963fdf60..73da8af48a8 100644
--- a/hw/virtio/vhost-user-test-device.c
+++ b/hw/virtio/vhost-user-test-device.c
@@ -50,6 +50,7 @@ static const TypeInfo vud_info = {
.name = TYPE_VHOST_USER_TEST_DEVICE,
.parent = TYPE_VHOST_USER_BASE,
.class_init = vud_class_init,
+ .secure = true,
};
static void vu_register_types(void)
diff --git a/hw/virtio/vhost-user-vsock.c b/hw/virtio/vhost-user-vsock.c
index c2cd376e732..e10ceb95cb2 100644
--- a/hw/virtio/vhost-user-vsock.c
+++ b/hw/virtio/vhost-user-vsock.c
@@ -175,6 +175,7 @@ static const TypeInfo vuv_info = {
.parent = TYPE_VHOST_VSOCK_COMMON,
.instance_size = sizeof(VHostUserVSock),
.class_init = vuv_class_init,
+ .secure = true,
};
static void vuv_register_types(void)
diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
index 4ff58a98019..4a307119b90 100644
--- a/hw/virtio/vhost-vsock.c
+++ b/hw/virtio/vhost-vsock.c
@@ -388,6 +388,7 @@ static const TypeInfo vhost_vsock_info = {
.parent = TYPE_VHOST_VSOCK_COMMON,
.instance_size = sizeof(VHostVSock),
.class_init = vhost_vsock_class_init,
+ .secure = true,
};
static void vhost_vsock_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 04/26] hw: mark most remaining virtio object types as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (2 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 03/26] hw: mark all vhost devices a secure Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 05/26] hw/vfio: mark all VFIO object classes " Daniel P. Berrangé
` (21 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are all intended for use in a virtualization scenario and must
provide a security boundary.
Again an exception is made for the virtio-vga-gl-device and
virtio-gpu-rutabaga-device dvices.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/9pfs/virtio-9p-device.c | 1 +
hw/audio/virtio-snd.c | 1 +
hw/block/virtio-blk.c | 1 +
hw/char/virtio-console.c | 2 ++
hw/char/virtio-serial-bus.c | 2 ++
hw/display/virtio-gpu.c | 1 +
hw/input/virtio-input-hid.c | 4 ++++
hw/input/virtio-input-host.c | 1 +
hw/net/virtio-net.c | 1 +
hw/scsi/virtio-scsi.c | 1 +
hw/virtio/vdpa-dev.c | 1 +
hw/virtio/virtio-balloon.c | 1 +
hw/virtio/virtio-crypto.c | 1 +
hw/virtio/virtio-iommu.c | 2 ++
hw/virtio/virtio-mem.c | 1 +
hw/virtio/virtio-mmio.c | 2 ++
hw/virtio/virtio-nsm.c | 1 +
hw/virtio/virtio-pmem.c | 1 +
hw/virtio/virtio-rng.c | 1 +
hw/virtio/virtio-rtc.c | 1 +
20 files changed, 27 insertions(+)
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 2774fc2290a..a4572c851df 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -288,6 +288,7 @@ static const TypeInfo virtio_device_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(V9fsVirtioState),
.class_init = virtio_9p_class_init,
+ .secure = true,
};
static void virtio_9p_register_types(void)
diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
index 1cbc4da7528..750f9b961e7 100644
--- a/hw/audio/virtio-snd.c
+++ b/hw/audio/virtio-snd.c
@@ -1604,6 +1604,7 @@ static const TypeInfo virtio_snd_types[] = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VirtIOSound),
.class_init = virtio_snd_class_init,
+ .secure = true,
}
};
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9b7c84fda6c..d9c3db3e56f 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -2118,6 +2118,7 @@ static const TypeInfo virtio_blk_info = {
.instance_init = virtio_blk_instance_init,
.class_init = virtio_blk_class_init,
.class_size = sizeof(VirtIOBlkClass),
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index db9d8ca797f..cd42cbe7646 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -295,6 +295,7 @@ static const TypeInfo virtconsole_info = {
.name = "virtconsole",
.parent = TYPE_VIRTIO_CONSOLE_SERIAL_PORT,
.class_init = virtconsole_class_init,
+ .secure = true,
};
static const Property virtserialport_properties[] = {
@@ -320,6 +321,7 @@ static const TypeInfo virtserialport_info = {
.parent = TYPE_VIRTIO_SERIAL_PORT,
.instance_size = sizeof(VirtConsole),
.class_init = virtserialport_class_init,
+ .secure = true,
};
static void virtconsole_register_types(void)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 882765ac88a..7fe90571249 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -915,6 +915,7 @@ static const TypeInfo virtser_bus_info = {
.parent = TYPE_BUS,
.instance_size = sizeof(VirtIOSerialBus),
.class_init = virtser_bus_class_init,
+ .secure = true,
};
#ifdef CONFIG_HMP
@@ -1250,6 +1251,7 @@ static const TypeInfo virtio_device_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VirtIOSerial),
.class_init = virtio_serial_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 5d43ffb9918..d248e50abcb 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1995,6 +1995,7 @@ static const TypeInfo virtio_gpu_info = {
.instance_size = sizeof(VirtIOGPU),
.class_size = sizeof(VirtIOGPUClass),
.class_init = virtio_gpu_class_init,
+ .secure = true,
};
module_obj(TYPE_VIRTIO_GPU);
module_kconfig(VIRTIO_GPU);
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 1019d6b2e53..38c338d836c 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -315,6 +315,7 @@ static const TypeInfo virtio_keyboard_info = {
.parent = TYPE_VIRTIO_INPUT_HID,
.instance_size = sizeof(VirtIOInputHID),
.instance_init = virtio_keyboard_init,
+ .secure = true,
};
/* ----------------------------------------------------------------- */
@@ -369,6 +370,7 @@ static const TypeInfo virtio_mouse_info = {
.parent = TYPE_VIRTIO_INPUT_HID,
.instance_size = sizeof(VirtIOInputHID),
.instance_init = virtio_mouse_init,
+ .secure = true,
};
/* ----------------------------------------------------------------- */
@@ -442,6 +444,7 @@ static const TypeInfo virtio_tablet_info = {
.parent = TYPE_VIRTIO_INPUT_HID,
.instance_size = sizeof(VirtIOInputHID),
.instance_init = virtio_tablet_init,
+ .secure = true,
};
/* ----------------------------------------------------------------- */
@@ -527,6 +530,7 @@ static const TypeInfo virtio_multitouch_info = {
.parent = TYPE_VIRTIO_INPUT_HID,
.instance_size = sizeof(VirtIOInputHID),
.instance_init = virtio_multitouch_init,
+ .secure = true,
};
/* ----------------------------------------------------------------- */
diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c
index 633547cc4f7..0d01e00cfcb 100644
--- a/hw/input/virtio-input-host.c
+++ b/hw/input/virtio-input-host.c
@@ -248,6 +248,7 @@ static const TypeInfo virtio_input_host_info = {
.instance_size = sizeof(VirtIOInputHost),
.instance_init = virtio_input_host_init,
.class_init = virtio_input_host_class_init,
+ .secure = true,
};
/* ----------------------------------------------------------------- */
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 54e42cfec9d..36edb768b17 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -4495,6 +4495,7 @@ static const TypeInfo virtio_net_info = {
.instance_size = sizeof(VirtIONet),
.instance_init = virtio_net_instance_init,
.class_init = virtio_net_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index d7e2662aa73..ef5cc7a6ce8 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -1456,6 +1456,7 @@ static const TypeInfo virtio_scsi_info = {
.parent = TYPE_VIRTIO_SCSI_COMMON,
.instance_size = sizeof(VirtIOSCSI),
.class_init = virtio_scsi_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index cd7ce2e3819..a753a2d8dc3 100644
--- a/hw/virtio/vdpa-dev.c
+++ b/hw/virtio/vdpa-dev.c
@@ -412,6 +412,7 @@ static const TypeInfo vhost_vdpa_device_info = {
.instance_size = sizeof(VhostVdpaDevice),
.class_init = vhost_vdpa_device_class_init,
.instance_init = vhost_vdpa_device_instance_init,
+ .secure = true,
};
static void register_vhost_vdpa_device_type(void)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 547173e035f..e47657a4f34 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -1077,6 +1077,7 @@ static const TypeInfo virtio_balloon_info = {
.instance_size = sizeof(VirtIOBalloon),
.instance_init = virtio_balloon_instance_init,
.class_init = virtio_balloon_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c
index 85c7279aae2..8968d9f293e 100644
--- a/hw/virtio/virtio-crypto.c
+++ b/hw/virtio/virtio-crypto.c
@@ -1313,6 +1313,7 @@ static const TypeInfo virtio_crypto_info = {
.instance_size = sizeof(VirtIOCrypto),
.instance_init = virtio_crypto_instance_init,
.class_init = virtio_crypto_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 208815096fc..664d1c0b6b9 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -1749,12 +1749,14 @@ static const TypeInfo virtio_iommu_info = {
.instance_size = sizeof(VirtIOIOMMU),
.instance_init = virtio_iommu_instance_init,
.class_init = virtio_iommu_class_init,
+ .secure = true,
};
static const TypeInfo virtio_iommu_memory_region_info = {
.parent = TYPE_IOMMU_MEMORY_REGION,
.name = TYPE_VIRTIO_IOMMU_MEMORY_REGION,
.class_init = virtio_iommu_memory_region_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
index 546ea18b7c4..b8780982ff1 100644
--- a/hw/virtio/virtio-mem.c
+++ b/hw/virtio/virtio-mem.c
@@ -1673,6 +1673,7 @@ static const TypeInfo virtio_mem_info = {
.instance_finalize = virtio_mem_instance_finalize,
.class_init = virtio_mem_class_init,
.class_size = sizeof(VirtIOMEMClass),
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_RAM_DISCARD_SOURCE },
{ }
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 55ceaeef5fc..f51c8d17b9a 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -779,6 +779,7 @@ static const TypeInfo virtio_mmio_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(VirtIOMMIOProxy),
.class_init = virtio_mmio_class_init,
+ .secure = true,
};
/* virtio-mmio-bus. */
@@ -848,6 +849,7 @@ static const TypeInfo virtio_mmio_bus_info = {
.parent = TYPE_VIRTIO_BUS,
.instance_size = sizeof(VirtioBusState),
.class_init = virtio_mmio_bus_class_init,
+ .secure = true,
};
static void virtio_mmio_register_types(void)
diff --git a/hw/virtio/virtio-nsm.c b/hw/virtio/virtio-nsm.c
index 3bf5e7009a4..099342f3792 100644
--- a/hw/virtio/virtio-nsm.c
+++ b/hw/virtio/virtio-nsm.c
@@ -1727,6 +1727,7 @@ static const TypeInfo virtio_nsm_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VirtIONSM),
.class_init = virtio_nsm_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
index 6f7271c140a..1a414d7ba29 100644
--- a/hw/virtio/virtio-pmem.c
+++ b/hw/virtio/virtio-pmem.c
@@ -196,6 +196,7 @@ static const TypeInfo virtio_pmem_info = {
.class_size = sizeof(VirtIOPMEMClass),
.class_init = virtio_pmem_class_init,
.instance_size = sizeof(VirtIOPMEM),
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index d68d9011953..ba80138179b 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -282,6 +282,7 @@ static const TypeInfo virtio_rng_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VirtIORNG),
.class_init = virtio_rng_class_init,
+ .secure = true,
};
static void virtio_register_types(void)
diff --git a/hw/virtio/virtio-rtc.c b/hw/virtio/virtio-rtc.c
index 0dcbe94758a..633bff8ac2c 100644
--- a/hw/virtio/virtio-rtc.c
+++ b/hw/virtio/virtio-rtc.c
@@ -181,6 +181,7 @@ static const TypeInfo virtio_rtc_info = {
.parent = TYPE_VIRTIO_DEVICE,
.instance_size = sizeof(VirtIORtc),
.class_init = virtio_rtc_class_init,
+ .secure = true,
};
static void virtio_rtc_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 05/26] hw/vfio: mark all VFIO object classes as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (3 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 04/26] hw: mark most remaining virtio object types as secure Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 06/26] hw/xen: mark all Xen related object types as being secure Daniel P. Berrangé
` (20 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé, Cornelia Huck
The VFIO subsystem is about securely passing host PCI devices
to a guest, so all the classes should be presumed to be offering
a security boundary.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com> #s390 types
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/vfio-user/pci.c | 1 +
hw/vfio/ap.c | 1 +
hw/vfio/ccw.c | 1 +
hw/vfio/igd.c | 1 +
hw/vfio/iommufd.c | 2 ++
hw/vfio/pci.c | 2 ++
hw/vfio/spapr.c | 1 +
7 files changed, 9 insertions(+)
diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index c749ff149f8..e3749cdd393 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -489,6 +489,7 @@ static const TypeInfo vfio_user_pci_info = {
.class_init = vfio_user_pci_class_init,
.instance_init = vfio_user_pci_init,
.instance_finalize = vfio_user_pci_finalize,
+ .secure = true,
};
static void register_vfio_user_dev_type(void)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 2926e04ad49..45d67b8ba70 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -356,6 +356,7 @@ static const TypeInfo vfio_ap_info = {
.instance_size = sizeof(VFIOAPDevice),
.instance_init = vfio_ap_instance_init,
.class_init = vfio_ap_class_init,
+ .secure = true,
};
static void vfio_ap_type_init(void)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 8e29a3ae613..6d71e196ee0 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -723,6 +723,7 @@ static const TypeInfo vfio_ccw_info = {
.instance_size = sizeof(VFIOCCWDevice),
.instance_init = vfio_ccw_instance_init,
.class_init = vfio_ccw_class_init,
+ .secure = true,
};
static void register_vfio_ccw_type(void)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 728b60d3d4a..46ad988ee68 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -321,6 +321,7 @@ static const TypeInfo vfio_pci_igd_lpc_bridge_info = {
.name = "vfio-pci-igd-lpc-bridge",
.parent = TYPE_PCI_DEVICE,
.class_init = vfio_pci_igd_lpc_bridge_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 90ddb54f4c3..97f6470643f 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -1061,10 +1061,12 @@ static const TypeInfo types[] = {
.parent = TYPE_VFIO_IOMMU,
.instance_size = sizeof(VFIOIOMMUFDContainer),
.class_init = vfio_iommu_iommufd_class_init,
+ .secure = true,
}, {
.name = TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO,
.parent = TYPE_HOST_IOMMU_DEVICE_IOMMUFD,
.class_init = hiod_iommufd_vfio_class_init,
+ .secure = true,
}
};
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 0da2e143b88..96078660777 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -4115,6 +4115,7 @@ static const TypeInfo vfio_pci_info = {
.class_init = vfio_pci_class_init,
.instance_init = vfio_pci_init,
.instance_finalize = vfio_pci_finalize,
+ .secure = true,
};
static const Property vfio_pci_nohotplug_properties[] = {
@@ -4151,6 +4152,7 @@ static const TypeInfo vfio_pci_nohotplug_info = {
.parent = TYPE_VFIO_PCI,
.instance_size = sizeof(VFIOPCIDevice),
.class_init = vfio_pci_nohotplug_class_init,
+ .secure = true,
};
static void register_vfio_pci_dev_type(void)
diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 42690e4323d..1027c434c07 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -544,6 +544,7 @@ static const TypeInfo types[] = {
.parent = TYPE_VFIO_IOMMU_LEGACY,
.instance_size = sizeof(VFIOSpaprContainer),
.class_init = vfio_iommu_spapr_class_init,
+ .secure = true,
},
};
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 06/26] hw/xen: mark all Xen related object types as being secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (4 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 05/26] hw/vfio: mark all VFIO object classes " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 07/26] hw/net: mark e1000, e1000e, rtl8139 & sPAPR VLAN as secure Daniel P. Berrangé
` (19 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
All Xen paravirtualized devices are intended to provide a host /
guest security barrier, so mark all Xen object types as scure.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/block/xen-block.c | 2 ++
hw/char/xen_console.c | 1 +
hw/i386/xen/xen-hvm.c | 1 +
hw/i386/xen/xen_platform.c | 1 +
hw/i386/xen/xen_pvdevice.c | 1 +
hw/net/xen_nic.c | 1 +
hw/xen/xen-bus.c | 2 ++
hw/xen/xen-legacy-backend.c | 3 +++
hw/xen/xen_pt.c | 1 +
9 files changed, 13 insertions(+)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index ffdb0806573..e04190cd26f 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -742,6 +742,7 @@ static const TypeInfo xen_disk_type_info = {
.parent = TYPE_XEN_BLOCK_DEVICE,
.instance_size = sizeof(XenDiskDevice),
.class_init = xen_disk_class_init,
+ .secure = true,
};
static void xen_cdrom_unrealize(XenBlockDevice *blockdev)
@@ -789,6 +790,7 @@ static const TypeInfo xen_cdrom_type_info = {
.parent = TYPE_XEN_BLOCK_DEVICE,
.instance_size = sizeof(XenCDRomDevice),
.class_init = xen_cdrom_class_init,
+ .secure = true,
};
static void xen_block_register_types(void)
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index bdeb76dc870..df6a708494d 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -513,6 +513,7 @@ static const TypeInfo xen_console_type_info = {
.parent = TYPE_XEN_DEVICE,
.instance_size = sizeof(XenConsole),
.class_init = xen_console_class_init,
+ .secure = true,
};
static void xen_console_register_types(void)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index b2378fe3f05..f7a154b8307 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -792,6 +792,7 @@ static const TypeInfo xen_i8259_type_infos[] = {
.name = TYPE_XEN_I8259_PIC,
.parent = TYPE_DEVICE,
.instance_init = xen_i8259_pic_init,
+ .secure = true,
},
};
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index c8b852be0cc..ec0084d6fb8 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -604,6 +604,7 @@ static const TypeInfo xen_platform_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PCIXenPlatformState),
.class_init = xen_platform_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index fab26a06af1..74636046d0c 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -139,6 +139,7 @@ static const TypeInfo xen_pv_type_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(XenPVDevice),
.class_init = xen_pv_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c
index f4d0b060130..e615303da6a 100644
--- a/hw/net/xen_nic.c
+++ b/hw/net/xen_nic.c
@@ -579,6 +579,7 @@ static const TypeInfo xen_net_type_info = {
.parent = TYPE_XEN_DEVICE,
.instance_size = sizeof(XenNetDev),
.class_init = xen_netdev_class_init,
+ .secure = true,
};
static void xen_net_register_types(void)
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 8def3bb68bc..17bbbe2ea71 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -404,6 +404,7 @@ static const TypeInfo xen_bus_type_info = {
.instance_size = sizeof(XenBus),
.class_size = sizeof(XenBusClass),
.class_init = xen_bus_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
@@ -1141,6 +1142,7 @@ static const TypeInfo xen_bridge_type_info = {
.name = TYPE_XEN_BRIDGE,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(XenBridge),
+ .secure = true,
};
static void xen_register_types(void)
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index 7977b527127..75f8ac7efde 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -648,6 +648,7 @@ static const TypeInfo xendev_type_info = {
.parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.class_init = xendev_class_init,
.instance_size = sizeof(XenLegacyDevice),
+ .secure = true,
};
static void xen_sysbus_class_init(ObjectClass *klass, const void *data)
@@ -661,6 +662,7 @@ static const TypeInfo xensysbus_info = {
.name = TYPE_XENSYSBUS,
.parent = TYPE_BUS,
.class_init = xen_sysbus_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
@@ -670,6 +672,7 @@ static const TypeInfo xensysbus_info = {
static const TypeInfo xensysdev_info = {
.name = TYPE_XENSYSDEV,
.parent = TYPE_SYS_BUS_DEVICE,
+ .secure = true,
};
static void xenbe_register_types(void)
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 0fe9c0aada8..504c5593188 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -1079,6 +1079,7 @@ static const TypeInfo xen_pci_passthrough_info = {
.instance_finalize = xen_pci_passthrough_finalize,
.class_init = xen_pci_passthrough_class_init,
.class_size = sizeof(XenPTDeviceClass),
+ .secure = true,
.instance_init = xen_pci_passthrough_instance_init,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 07/26] hw/net: mark e1000, e1000e, rtl8139 & sPAPR VLAN as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (5 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 06/26] hw/xen: mark all Xen related object types as being secure Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 08/26] hw/usb: mark commonly used USB devices/hosts " Daniel P. Berrangé
` (18 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
Historically most NICs are only interesting for non-virtualization
use cases and have not been written with malicious guests in mind.
As a general rule either virtio-net or xen-net should be used in
all virtualized guests requiring a security boundary.
There are a handful of exceptions resulting from historical usage
in the x86 world, to support virtualized guests lacking virtio
support.
Thus the rtl8139, e1000 & e1000e NICs are declared to provide
a security boundary.
The PPC sPAPR Virtual LAN device is also marked secure.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/net/e1000.c | 1 +
hw/net/e1000e.c | 1 +
hw/net/rtl8139.c | 1 +
hw/net/spapr_llan.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 202ad404013..2f540dbb417 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1759,6 +1759,7 @@ static void e1000_register_types(void)
type_info.parent = TYPE_E1000_BASE;
type_info.class_data = info;
type_info.class_init = e1000_class_init;
+ type_info.secure = true;
type_register_static(&type_info);
}
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 9faf0c74c3d..96737ddb51a 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -721,6 +721,7 @@ static const TypeInfo e1000e_info = {
.instance_size = sizeof(E1000EState),
.class_init = e1000e_class_init,
.instance_init = e1000e_instance_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 16479284eea..38bc16f312f 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3450,6 +3450,7 @@ static const TypeInfo rtl8139_info = {
.instance_size = sizeof(RTL8139State),
.class_init = rtl8139_class_init,
.instance_init = rtl8139_instance_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index a5b8906849c..784e46f57d4 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -891,6 +891,7 @@ static const TypeInfo spapr_vlan_info = {
.class_init = spapr_vlan_class_init,
.instance_init = spapr_vlan_instance_init,
.instance_finalize = spapr_vlan_instance_finalize,
+ .secure = true,
};
static void spapr_vlan_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 08/26] hw/usb: mark commonly used USB devices/hosts as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (6 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 07/26] hw/net: mark e1000, e1000e, rtl8139 & sPAPR VLAN as secure Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 09/26] hw/watchdog: mark some watchdog devices " Daniel P. Berrangé
` (17 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
Modern virtualized guests are expected to be deployed with the
XHCI controller which supports all of USB 1, 2 and 3, so should
be declared secure.
The "NEC" XHCI variant is slightly non-standard, but since it is
a trivial sub-class of the generic XHCI, there's no reason to
exclude it.
The set of devices that are expected to be used is HID (mouse,
tablet, keyboard), host passthrough, CCID (smartcard), hub,
storage and the redirect tunnelling.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/usb/ccid-card-emulated.c | 1 +
hw/usb/ccid-card-passthru.c | 1 +
hw/usb/dev-hid.c | 3 +++
hw/usb/dev-hub.c | 1 +
hw/usb/dev-smartcard-reader.c | 2 ++
hw/usb/dev-storage-bot.c | 1 +
hw/usb/dev-storage-classic.c | 1 +
hw/usb/hcd-xhci-nec.c | 1 +
hw/usb/hcd-xhci-pci.c | 1 +
hw/usb/hcd-xhci-sysbus.c | 3 ++-
hw/usb/hcd-xhci.c | 1 +
hw/usb/host-libusb.c | 1 +
hw/usb/redirect.c | 1 +
13 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 6c8eec39faa..4083cf8f4be 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -612,6 +612,7 @@ static const TypeInfo emulated_card_info = {
.parent = TYPE_CCID_CARD,
.instance_size = sizeof(EmulatedState),
.class_init = emulated_class_initfn,
+ .secure = true,
};
module_obj(TYPE_EMULATED_CCID);
module_kconfig(USB);
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index 3f4052ec82e..b951a544ef7 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -413,6 +413,7 @@ static const TypeInfo passthru_card_info = {
.parent = TYPE_CCID_CARD,
.instance_size = sizeof(PassthruState),
.class_init = passthru_class_initfn,
+ .secure = true,
};
module_obj(TYPE_CCID_PASSTHRU);
module_kconfig(USB);
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index ae19d60203f..f363449f53e 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -815,6 +815,7 @@ static const TypeInfo usb_tablet_info = {
.name = "usb-tablet",
.parent = TYPE_USB_HID,
.class_init = usb_tablet_class_initfn,
+ .secure = true,
};
static const Property usb_mouse_properties[] = {
@@ -837,6 +838,7 @@ static const TypeInfo usb_mouse_info = {
.name = "usb-mouse",
.parent = TYPE_USB_HID,
.class_init = usb_mouse_class_initfn,
+ .secure = true,
};
static const Property usb_keyboard_properties[] = {
@@ -860,6 +862,7 @@ static const TypeInfo usb_keyboard_info = {
.name = "usb-kbd",
.parent = TYPE_USB_HID,
.class_init = usb_keyboard_class_initfn,
+ .secure = true,
};
static void usb_hid_register_types(void)
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index b45d571fa83..7017b4fbc75 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -694,6 +694,7 @@ static const TypeInfo hub_info = {
.parent = TYPE_USB_DEVICE,
.instance_size = sizeof(USBHubState),
.class_init = usb_hub_class_initfn,
+ .secure = true,
};
static void usb_hub_register_types(void)
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 752571043ee..d6d684c27c4 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1405,6 +1405,7 @@ static const TypeInfo ccid_bus_info = {
.name = TYPE_CCID_BUS,
.parent = TYPE_BUS,
.instance_size = sizeof(CCIDBus),
+ .secure = true,
};
void ccid_card_send_apdu_to_guest(CCIDCardState *card,
@@ -1779,6 +1780,7 @@ static const TypeInfo ccid_info = {
.parent = TYPE_USB_DEVICE,
.instance_size = sizeof(USBCCIDState),
.class_init = ccid_class_initfn,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
diff --git a/hw/usb/dev-storage-bot.c b/hw/usb/dev-storage-bot.c
index a7f8d80c17a..b156f1c5c9a 100644
--- a/hw/usb/dev-storage-bot.c
+++ b/hw/usb/dev-storage-bot.c
@@ -52,6 +52,7 @@ static const TypeInfo bot_info = {
.name = "usb-bot",
.parent = TYPE_USB_STORAGE,
.class_init = usb_msd_class_bot_initfn,
+ .secure = true,
};
static void register_types(void)
diff --git a/hw/usb/dev-storage-classic.c b/hw/usb/dev-storage-classic.c
index 353f81dcc05..a244b5c8071 100644
--- a/hw/usb/dev-storage-classic.c
+++ b/hw/usb/dev-storage-classic.c
@@ -134,6 +134,7 @@ static const TypeInfo msd_info = {
.parent = TYPE_USB_STORAGE,
.class_init = usb_msd_class_storage_initfn,
.instance_init = usb_msd_instance_init,
+ .secure = true,
};
static void register_types(void)
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index 46839911f3f..070732be9a6 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -67,6 +67,7 @@ static const TypeInfo nec_xhci_info = {
.instance_size = sizeof(XHCINecState),
.instance_init = nec_xhci_instance_init,
.class_init = nec_xhci_class_init,
+ .secure = true,
};
static void nec_xhci_register_types(void)
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index b124251ae33..a3615b29fbd 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -298,6 +298,7 @@ static const TypeInfo qemu_xhci_info = {
.parent = TYPE_XHCI_PCI,
.class_init = qemu_xhci_class_init,
.instance_init = qemu_xhci_instance_init,
+ .secure = true,
};
static void xhci_register_types(void)
diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index bbdd5fd64ab..8dd50fbbf13 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -112,7 +112,8 @@ static const TypeInfo xhci_sysbus_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(XHCISysbusState),
.class_init = xhci_sysbus_class_init,
- .instance_init = xhci_sysbus_instance_init
+ .instance_init = xhci_sysbus_instance_init,
+ .secure = true,
};
static void xhci_sysbus_register_types(void)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index b5cc1ad2ff5..aac7f6788e0 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3718,6 +3718,7 @@ static const TypeInfo xhci_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(XHCIState),
.class_init = xhci_class_init,
+ .secure = true,
};
static void xhci_register_types(void)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 5a369e2ebf5..9c4980995a4 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1839,6 +1839,7 @@ static const TypeInfo usb_host_dev_info = {
.instance_size = sizeof(USBHostDevice),
.class_init = usb_host_class_initfn,
.instance_init = usb_host_instance_init,
+ .secure = true,
};
module_obj(TYPE_USB_HOST_DEVICE);
module_kconfig(USB);
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index a666b1e8d7d..401c6f5767b 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -2655,6 +2655,7 @@ static const TypeInfo usbredir_dev_info = {
.instance_size = sizeof(USBRedirDevice),
.class_init = usbredir_class_initfn,
.instance_init = usbredir_instance_init,
+ .secure = true,
};
module_obj(TYPE_USB_REDIR);
module_kconfig(USB);
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 09/26] hw/watchdog: mark some watchdog devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (7 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 08/26] hw/usb: mark commonly used USB devices/hosts " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 10/26] hw/scsi: mark spapr SCSI controller " Daniel P. Berrangé
` (16 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé, Cornelia Huck
The ib700, i6300esb, gwdt, spapr and diag288 watchdog devices are marked
as secure since they have traditionally been, or are intended to be,
used in virtualization use cases on x86, arm, ppc and s390x architectures
respectively. Other watchdogs are primarily for emulation.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com> #diag288
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/watchdog/sbsa_gwdt.c | 1 +
hw/watchdog/spapr_watchdog.c | 1 +
hw/watchdog/wdt_diag288.c | 1 +
hw/watchdog/wdt_i6300esb.c | 1 +
hw/watchdog/wdt_ib700.c | 1 +
5 files changed, 5 insertions(+)
diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c
index 1834dc8db83..671eb26365f 100644
--- a/hw/watchdog/sbsa_gwdt.c
+++ b/hw/watchdog/sbsa_gwdt.c
@@ -340,6 +340,7 @@ static const TypeInfo wdt_sbsa_gwdt_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.name = TYPE_WDT_SBSA,
.instance_size = sizeof(SBSA_GWDTState),
+ .secure = true,
};
static void wdt_sbsa_gwdt_register_types(void)
diff --git a/hw/watchdog/spapr_watchdog.c b/hw/watchdog/spapr_watchdog.c
index 5a72896066e..0e45e9b4a6a 100644
--- a/hw/watchdog/spapr_watchdog.c
+++ b/hw/watchdog/spapr_watchdog.c
@@ -269,6 +269,7 @@ static const TypeInfo spapr_wdt_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(SpaprWatchdog),
.class_init = spapr_wdt_class_init,
+ .secure = true,
};
static void spapr_watchdog_register_types(void)
diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
index 1275353e8e5..85e4f56e1db 100644
--- a/hw/watchdog/wdt_diag288.c
+++ b/hw/watchdog/wdt_diag288.c
@@ -129,6 +129,7 @@ static const TypeInfo wdt_diag288_info = {
.name = TYPE_WDT_DIAG288,
.instance_size = sizeof(DIAG288State),
.class_size = sizeof(DIAG288Class),
+ .secure = true,
};
static void wdt_diag288_register_types(void)
diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c
index 3aa01b8d68f..05aa20fab13 100644
--- a/hw/watchdog/wdt_i6300esb.c
+++ b/hw/watchdog/wdt_i6300esb.c
@@ -480,6 +480,7 @@ static const TypeInfo i6300esb_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(I6300State),
.class_init = i6300esb_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/watchdog/wdt_ib700.c b/hw/watchdog/wdt_ib700.c
index 51a26a4cbbc..8bf2b2fbf90 100644
--- a/hw/watchdog/wdt_ib700.c
+++ b/hw/watchdog/wdt_ib700.c
@@ -144,6 +144,7 @@ static const TypeInfo wdt_ib700_info = {
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(IB700State),
.class_init = wdt_ib700_class_init,
+ .secure = true,
};
static void wdt_ib700_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 10/26] hw/scsi: mark spapr SCSI controller as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (8 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 09/26] hw/watchdog: mark some watchdog devices " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 11/26] hw/scsi: mark SCSI disk endpoint devices " Daniel P. Berrangé
` (15 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
The spapr vscsi controller is used by default with spapr machines
in a virtualization use case.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/scsi/spapr_vscsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 7ec780da79e..eedae00273e 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1312,6 +1312,7 @@ static const TypeInfo spapr_vscsi_info = {
.parent = TYPE_VIO_SPAPR_DEVICE,
.instance_size = sizeof(VSCSIState),
.class_init = spapr_vscsi_class_init,
+ .secure = true,
};
static void spapr_vscsi_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 11/26] hw/scsi: mark SCSI disk endpoint devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (9 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 10/26] hw/scsi: mark spapr SCSI controller " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 12/26] hw/ide: mark ICH9 and ide-hd/ide-cd " Daniel P. Berrangé
` (14 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
All these devices can be used together with supported SCSI controllers
in a virtualization use case, so must be treated as secure.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/scsi/scsi-disk.c | 3 +++
hw/scsi/scsi-generic.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index de2b6d85da8..a2df3a4ec46 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -3378,6 +3378,7 @@ static const TypeInfo scsi_hd_info = {
.name = "scsi-hd",
.parent = TYPE_SCSI_DISK_BASE,
.class_init = scsi_hd_class_initfn,
+ .secure = true,
};
static const Property scsi_cd_properties[] = {
@@ -3421,6 +3422,7 @@ static const TypeInfo scsi_cd_info = {
.name = "scsi-cd",
.parent = TYPE_SCSI_DISK_BASE,
.class_init = scsi_cd_class_initfn,
+ .secure = true,
};
#ifdef __linux__
@@ -3463,6 +3465,7 @@ static const TypeInfo scsi_block_info = {
.name = "scsi-block",
.parent = TYPE_SCSI_DISK_BASE,
.class_init = scsi_block_class_initfn,
+ .secure = true,
};
#endif
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index e48fcb926f1..747a0aa61be 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -1259,6 +1259,7 @@ static const TypeInfo scsi_generic_info = {
.parent = TYPE_SCSI_DEVICE,
.instance_size = sizeof(SCSIDevice),
.class_init = scsi_generic_class_initfn,
+ .secure = true,
};
static void scsi_generic_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 12/26] hw/ide: mark ICH9 and ide-hd/ide-cd as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (10 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 11/26] hw/scsi: mark SCSI disk endpoint devices " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 13/26] hw: define most common PCI types " Daniel P. Berrangé
` (13 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These have a long history of usage in virtualization scenarios on
x86, for OS which lack modern virtio drivers for storage, and thus
must be considered secure.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/ide/ich.c | 1 +
hw/ide/ide-dev.c | 2 ++
hw/ide/piix.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/hw/ide/ich.c b/hw/ide/ich.c
index b00987f08d4..c7d50a15c1a 100644
--- a/hw/ide/ich.c
+++ b/hw/ide/ich.c
@@ -198,6 +198,7 @@ static const TypeInfo ich_ahci_info = {
.instance_size = sizeof(AHCIPCIState),
.instance_init = pci_ich9_ahci_init,
.class_init = ich_ahci_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c
index 94b91478928..3e9ca6e340f 100644
--- a/hw/ide/ide-dev.c
+++ b/hw/ide/ide-dev.c
@@ -215,6 +215,7 @@ static const TypeInfo ide_hd_info = {
.parent = TYPE_IDE_DEVICE,
.instance_size = sizeof(IDEDrive),
.class_init = ide_hd_class_init,
+ .secure = true,
};
static const Property ide_cd_properties[] = {
@@ -237,6 +238,7 @@ static const TypeInfo ide_cd_info = {
.parent = TYPE_IDE_DEVICE,
.instance_size = sizeof(IDEDrive),
.class_init = ide_cd_class_init,
+ .secure = true,
};
static void ide_device_class_init(ObjectClass *klass, const void *data)
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index a8472f3e581..9b7b5e98c8c 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -198,6 +198,7 @@ static const TypeInfo piix3_ide_info = {
.name = TYPE_PIIX3_IDE,
.parent = TYPE_PCI_IDE,
.class_init = piix3_ide_class_init,
+ .secure = true,
};
/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */
@@ -221,6 +222,7 @@ static const TypeInfo piix4_ide_info = {
.name = TYPE_PIIX4_IDE,
.parent = TYPE_PCI_IDE,
.class_init = piix4_ide_class_init,
+ .secure = true,
};
static void piix_ide_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 13/26] hw: define most common PCI types as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (11 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 12/26] hw/ide: mark ICH9 and ide-hd/ide-cd " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts " Daniel P. Berrangé
` (12 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
Essentially all PCI infrastructure is in scope for the virtualization
use case, aside from the niche simba bridge and the CXL related pieces.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/pci-bridge/gen_pcie_downstream_port.c | 1 +
hw/pci-bridge/gen_pcie_root_port.c | 1 +
hw/pci-bridge/gen_pcie_upstream_port.c | 1 +
hw/pci-bridge/i82801b11.c | 1 +
hw/pci-bridge/ioh3420.c | 1 +
hw/pci-bridge/pci_bridge_dev.c | 2 ++
hw/pci-bridge/pci_expander_bridge.c | 5 +++++
hw/pci-bridge/pcie_pci_bridge.c | 1 +
hw/pci-bridge/xio3130_downstream.c | 1 +
hw/pci-bridge/xio3130_upstream.c | 1 +
hw/pci/pci.c | 4 ++++
11 files changed, 19 insertions(+)
diff --git a/hw/pci-bridge/gen_pcie_downstream_port.c b/hw/pci-bridge/gen_pcie_downstream_port.c
index d00bbd55f0c..3084a208a85 100644
--- a/hw/pci-bridge/gen_pcie_downstream_port.c
+++ b/hw/pci-bridge/gen_pcie_downstream_port.c
@@ -188,6 +188,7 @@ static const TypeInfo gen_pcie_downstream_port_info = {
.parent = TYPE_PCIE_SLOT,
.instance_size = sizeof(GenPCIEDownstreamPort),
.class_init = gen_pcie_downstream_port_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
index 8cabeadac89..3c0177661c6 100644
--- a/hw/pci-bridge/gen_pcie_root_port.c
+++ b/hw/pci-bridge/gen_pcie_root_port.c
@@ -161,6 +161,7 @@ static const TypeInfo gen_rp_dev_info = {
.parent = TYPE_PCIE_ROOT_PORT,
.instance_size = sizeof(GenPCIERootPort),
.class_init = gen_rp_dev_class_init,
+ .secure = true,
};
static void gen_rp_register_types(void)
diff --git a/hw/pci-bridge/gen_pcie_upstream_port.c b/hw/pci-bridge/gen_pcie_upstream_port.c
index 61ae3a294a9..da3e9e2d637 100644
--- a/hw/pci-bridge/gen_pcie_upstream_port.c
+++ b/hw/pci-bridge/gen_pcie_upstream_port.c
@@ -163,6 +163,7 @@ static const TypeInfo gen_pcie_upstream_port_info = {
.parent = TYPE_PCIE_PORT,
.instance_size = sizeof(GenPCIEUpstreamPort),
.class_init = gen_pcie_upstream_port_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
index 1d73c14c1f8..f702b20bcd5 100644
--- a/hw/pci-bridge/i82801b11.c
+++ b/hw/pci-bridge/i82801b11.c
@@ -107,6 +107,7 @@ static const TypeInfo i82801b11_bridge_info = {
.parent = TYPE_PCI_BRIDGE,
.instance_size = sizeof(I82801b11Bridge),
.class_init = i82801b11_bridge_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index bba640f495b..2c4882c4cf1 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -120,6 +120,7 @@ static const TypeInfo ioh3420_info = {
.name = "ioh3420",
.parent = TYPE_PCIE_ROOT_PORT,
.class_init = ioh3420_class_init,
+ .secure = true,
};
static void ioh3420_register_types(void)
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index bc53bcb69d8..86e8daaa068 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -268,6 +268,7 @@ static const TypeInfo pci_bridge_dev_info = {
.instance_size = sizeof(PCIBridgeDev),
.class_init = pci_bridge_dev_class_init,
.instance_finalize = pci_bridge_dev_instance_finalize,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
@@ -294,6 +295,7 @@ static const TypeInfo pci_bridge_dev_seat_info = {
.parent = TYPE_PCI_BRIDGE_DEV,
.instance_size = sizeof(PCIBridgeDev),
.class_init = pci_bridge_dev_seat_class_init,
+ .secure = true,
};
static void pci_bridge_dev_register(void)
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
index a96b2d228eb..5b07186c91e 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -87,6 +87,7 @@ static const TypeInfo pxb_bus_info = {
.parent = TYPE_PCI_BUS,
.instance_size = sizeof(PXBBus),
.class_init = pxb_bus_class_init,
+ .secure = true,
};
static const TypeInfo pxb_pcie_bus_info = {
@@ -94,6 +95,7 @@ static const TypeInfo pxb_pcie_bus_info = {
.parent = TYPE_PCIE_BUS,
.instance_size = sizeof(PXBBus),
.class_init = pxb_bus_class_init,
+ .secure = true,
};
static const char *pxb_host_root_bus_path(PCIHostState *host_bridge,
@@ -154,6 +156,7 @@ static const TypeInfo pxb_host_info = {
.name = TYPE_PXB_HOST,
.parent = TYPE_PCI_HOST_BRIDGE,
.class_init = pxb_host_class_init,
+ .secure = true,
};
@@ -331,6 +334,7 @@ static const TypeInfo pxb_dev_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PXBDev),
.class_init = pxb_dev_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
@@ -368,6 +372,7 @@ static const TypeInfo pxb_pcie_dev_info = {
.parent = TYPE_PXB_DEV,
.instance_size = sizeof(PXBPCIEDev),
.class_init = pxb_pcie_dev_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c
index e826fb2829f..03b6b1c0f54 100644
--- a/hw/pci-bridge/pcie_pci_bridge.c
+++ b/hw/pci-bridge/pcie_pci_bridge.c
@@ -162,6 +162,7 @@ static const TypeInfo pcie_pci_bridge_info = {
.parent = TYPE_PCI_BRIDGE,
.instance_size = sizeof(PCIEPCIBridge),
.class_init = pcie_pci_bridge_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ INTERFACE_PCIE_DEVICE },
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index 0c3fed3053b..ded948ebd0f 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -175,6 +175,7 @@ static const TypeInfo xio3130_downstream_info = {
.name = TYPE_XIO3130_DOWNSTREAM,
.parent = TYPE_PCIE_SLOT,
.class_init = xio3130_downstream_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c
index 40057b749bf..9d58105f8bd 100644
--- a/hw/pci-bridge/xio3130_upstream.c
+++ b/hw/pci-bridge/xio3130_upstream.c
@@ -144,6 +144,7 @@ static const TypeInfo xio3130_upstream_info = {
.name = "x3130-upstream",
.parent = TYPE_PCIE_PORT,
.class_init = xio3130_upstream_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index d8b117799f3..57072590b11 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -321,6 +321,7 @@ static const TypeInfo pci_bus_info = {
.instance_size = sizeof(PCIBus),
.class_size = sizeof(PCIBusClass),
.class_init = pci_bus_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_FW_CFG_DATA_GENERATOR_INTERFACE },
{ }
@@ -335,11 +336,13 @@ static const TypeInfo cxl_interface_info = {
static const TypeInfo pcie_interface_info = {
.name = INTERFACE_PCIE_DEVICE,
.parent = TYPE_INTERFACE,
+ .secure = true,
};
static const TypeInfo conventional_pci_interface_info = {
.name = INTERFACE_CONVENTIONAL_PCI_DEVICE,
.parent = TYPE_INTERFACE,
+ .secure = true,
};
static void pcie_bus_class_init(ObjectClass *klass, const void *data)
@@ -353,6 +356,7 @@ static const TypeInfo pcie_bus_info = {
.name = TYPE_PCIE_BUS,
.parent = TYPE_PCI_BUS,
.class_init = pcie_bus_class_init,
+ .secure = true,
};
static const TypeInfo cxl_bus_info = {
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (12 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 13/26] hw: define most common PCI types " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-16 13:12 ` Thomas Huth
2026-11-13 18:42 ` [PATCH v3 15/26] hw/display: mark bochs, ramfb and VGA " Daniel P. Berrangé
` (11 subsequent siblings)
25 siblings, 1 reply; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé, Cornelia Huck
Mark the PCI hosts secure if they are used from machine types
that are considered for the virtualization use case.
There is also a special case for the Xen passthrough type.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com> #s390
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/pci-host/gpex.c | 2 ++
hw/pci-host/i440fx.c | 2 ++
hw/pci-host/q35.c | 2 ++
hw/pci-host/xen_igd_pt.c | 1 +
hw/ppc/spapr_pci.c | 1 +
hw/s390x/s390-pci-bus.c | 4 ++++
6 files changed, 12 insertions(+)
diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c
index e66784ce516..38197a89454 100644
--- a/hw/pci-host/gpex.c
+++ b/hw/pci-host/gpex.c
@@ -220,6 +220,7 @@ static const TypeInfo gpex_host_info = {
.instance_size = sizeof(GPEXHost),
.instance_init = gpex_host_initfn,
.class_init = gpex_host_class_init,
+ .secure = true,
};
/****************************************************************************
@@ -259,6 +260,7 @@ static const TypeInfo gpex_root_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(GPEXRootState),
.class_init = gpex_root_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 09513788361..44d059907ff 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -353,6 +353,7 @@ static const TypeInfo i440fx_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PCII440FXState),
.class_init = i440fx_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
@@ -415,6 +416,7 @@ static const TypeInfo i440fx_pcihost_info = {
.instance_size = sizeof(I440FXState),
.instance_init = i440fx_pcihost_initfn,
.class_init = i440fx_pcihost_class_init,
+ .secure = true,
};
static void i440fx_register_types(void)
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index d53441561f5..b50006a5520 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -273,6 +273,7 @@ static const TypeInfo q35_host_info = {
.instance_size = sizeof(Q35PCIHost),
.instance_init = q35_host_initfn,
.class_init = q35_host_class_init,
+ .secure = true,
};
/****************************************************************************
@@ -723,6 +724,7 @@ static const TypeInfo mch_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(MCHPCIState),
.class_init = mch_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/pci-host/xen_igd_pt.c b/hw/pci-host/xen_igd_pt.c
index f6016f2cd53..abc68849b9e 100644
--- a/hw/pci-host/xen_igd_pt.c
+++ b/hw/pci-host/xen_igd_pt.c
@@ -110,6 +110,7 @@ static const TypeInfo igd_passthrough_i440fx_info = {
.parent = TYPE_I440FX_PCI_DEVICE,
.instance_size = sizeof(PCII440FXState),
.class_init = igd_passthrough_i440fx_class_init,
+ .secure = true,
};
static void igd_pt_i440fx_register_types(void)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index f7fc544d35c..ea323fa0989 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2174,6 +2174,7 @@ static const TypeInfo spapr_phb_info = {
.instance_size = sizeof(SpaprPhbState),
.instance_finalize = spapr_phb_finalizefn,
.class_init = spapr_phb_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 1e78dc3b861..742c95aea14 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -1680,6 +1680,7 @@ static const TypeInfo s390_pcihost_info = {
.parent = TYPE_PCI_HOST_BRIDGE,
.instance_size = sizeof(S390pciState),
.class_init = s390_pcihost_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
{ }
@@ -1713,6 +1714,7 @@ static const TypeInfo s390_pcibus_info = {
* if a device is unplugged and plugged back, preventing migration.
*/
.class_init = s390_pcibus_class_init,
+ .secure = true,
};
static uint16_t s390_pci_generate_uid(S390pciState *s)
@@ -2037,12 +2039,14 @@ static const TypeInfo s390_pci_device_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(S390PCIBusDevice),
.class_init = s390_pci_device_class_init,
+ .secure = true,
};
static const TypeInfo s390_pci_iommu_info = {
.name = TYPE_S390_PCI_IOMMU,
.parent = TYPE_OBJECT,
.instance_size = sizeof(S390PCIIOMMU),
+ .secure = true,
};
static void s390_iommu_memory_region_class_init(ObjectClass *klass,
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 15/26] hw/display: mark bochs, ramfb and VGA as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (13 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 16/26] hw/tpm: mark all TPM implementations " Daniel P. Berrangé
` (10 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
Most of the display adapters are emulating old hardware which is not
relevant to virtualization use cases.
The clear exceptions are the generic, simple devices that should be
considered secure: Bochs, RAMFB, VGA (PCI, not MMIO / ISA).
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/display/bochs-display.c | 1 +
hw/display/ramfb-standalone.c | 1 +
hw/display/vga-pci.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index 64e669429c4..5f3ba80f990 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -374,6 +374,7 @@ static const TypeInfo bochs_display_type_info = {
.instance_size = sizeof(BochsDisplayState),
.instance_init = bochs_display_init,
.class_init = bochs_display_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 8e8ba37514a..9427009acc8 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -85,6 +85,7 @@ static const TypeInfo ramfb_info = {
.parent = TYPE_DYNAMIC_SYS_BUS_DEVICE,
.instance_size = sizeof(RAMFBStandaloneState),
.class_init = ramfb_class_initfn,
+ .secure = true,
};
static void ramfb_register_types(void)
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index d089847bdae..8559d7aa8f0 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -407,6 +407,7 @@ static const TypeInfo vga_info = {
.name = "VGA",
.parent = TYPE_PCI_VGA,
.class_init = vga_class_init,
+ .secure = true,
};
static const TypeInfo secondary_info = {
@@ -414,6 +415,7 @@ static const TypeInfo secondary_info = {
.parent = TYPE_PCI_VGA,
.instance_init = pci_secondary_vga_init,
.class_init = secondary_class_init,
+ .secure = true,
};
static void vga_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 16/26] hw/tpm: mark all TPM implementations as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (14 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 15/26] hw/display: mark bochs, ramfb and VGA " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 17/26] hw/misc: mark pvpanic, vmcoreinfo " Daniel P. Berrangé
` (9 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
All of the TPM implementations are in scope of virtualization
usage, so mark them all as secure.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/ppc/spapr_tpm_proxy.c | 1 +
hw/tpm/tpm_crb.c | 1 +
hw/tpm/tpm_spapr.c | 1 +
hw/tpm/tpm_tis_i2c.c | 1 +
hw/tpm/tpm_tis_isa.c | 1 +
hw/tpm/tpm_tis_sysbus.c | 1 +
6 files changed, 6 insertions(+)
diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c
index 19889e80bc1..bb6efec20c9 100644
--- a/hw/ppc/spapr_tpm_proxy.c
+++ b/hw/ppc/spapr_tpm_proxy.c
@@ -166,6 +166,7 @@ static const TypeInfo spapr_tpm_proxy_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(SpaprTpmProxy),
.class_init = spapr_tpm_proxy_class_init,
+ .secure = true,
};
static void spapr_tpm_proxy_register_types(void)
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 78db2205207..ab6121ed9e6 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -558,6 +558,7 @@ static const TypeInfo tpm_crb_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(CRBState),
.class_init = tpm_crb_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_TPM_IF },
{ }
diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
index 19075d1f012..3957c5268b7 100644
--- a/hw/tpm/tpm_spapr.c
+++ b/hw/tpm/tpm_spapr.c
@@ -414,6 +414,7 @@ static const TypeInfo tpm_spapr_info = {
.parent = TYPE_VIO_SPAPR_DEVICE,
.instance_size = sizeof(SpaprTpmState),
.class_init = tpm_spapr_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_TPM_IF },
{ }
diff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c
index b4f258c7bcb..302296affb6 100644
--- a/hw/tpm/tpm_tis_i2c.c
+++ b/hw/tpm/tpm_tis_i2c.c
@@ -551,6 +551,7 @@ static const TypeInfo tpm_tis_i2c_info = {
.name = TYPE_TPM_TIS_I2C,
.parent = TYPE_I2C_SLAVE,
.instance_size = sizeof(TPMStateI2C),
+ .secure = true,
.class_init = tpm_tis_i2c_class_init,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_TPM_IF },
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
index 2b1267133ac..da3a932b033 100644
--- a/hw/tpm/tpm_tis_isa.c
+++ b/hw/tpm/tpm_tis_isa.c
@@ -187,6 +187,7 @@ static const TypeInfo tpm_tis_isa_info = {
.instance_size = sizeof(TPMStateISA),
.instance_init = tpm_tis_isa_initfn,
.class_init = tpm_tis_isa_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_TPM_IF },
{ TYPE_ACPI_DEV_AML_IF },
diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c
index a7b0002d826..0afb52c3be3 100644
--- a/hw/tpm/tpm_tis_sysbus.c
+++ b/hw/tpm/tpm_tis_sysbus.c
@@ -167,6 +167,7 @@ static const TypeInfo tpm_tis_sysbus_info = {
.instance_init = tpm_tis_sysbus_initfn,
.instance_finalize = tpm_tis_sysbus_finalize,
.class_init = tpm_tis_sysbus_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_TPM_IF },
{ }
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 17/26] hw/misc: mark pvpanic, vmcoreinfo as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (15 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 16/26] hw/tpm: mark all TPM implementations " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 18/26] hw/audio: mark Intel HDA devices & codecs " Daniel P. Berrangé
` (8 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These devices are common debug aids for virtualized
guests so must be marked secure.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/misc/pvpanic-isa.c | 1 +
hw/misc/pvpanic-mmio.c | 1 +
hw/misc/pvpanic-pci.c | 1 +
hw/misc/vmcoreinfo.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c
index 85fb7da5e5c..bb0a7ff6f8e 100644
--- a/hw/misc/pvpanic-isa.c
+++ b/hw/misc/pvpanic-isa.c
@@ -121,6 +121,7 @@ static const TypeInfo pvpanic_isa_info = {
.instance_size = sizeof(PVPanicISAState),
.instance_init = pvpanic_isa_initfn,
.class_init = pvpanic_isa_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_ACPI_DEV_AML_IF },
{ },
diff --git a/hw/misc/pvpanic-mmio.c b/hw/misc/pvpanic-mmio.c
index a173a1a9a58..161e8fc59b4 100644
--- a/hw/misc/pvpanic-mmio.c
+++ b/hw/misc/pvpanic-mmio.c
@@ -50,6 +50,7 @@ static const TypeInfo pvpanic_mmio_info = {
.instance_size = sizeof(PVPanicMMIOState),
.instance_init = pvpanic_mmio_initfn,
.class_init = pvpanic_mmio_class_init,
+ .secure = true,
};
static void pvpanic_register_types(void)
diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c
index 5509f70a3e5..7d1f99d564b 100644
--- a/hw/misc/pvpanic-pci.c
+++ b/hw/misc/pvpanic-pci.c
@@ -80,6 +80,7 @@ static const TypeInfo pvpanic_pci_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PVPanicPCIState),
.class_init = pvpanic_pci_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ }
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index 9c2e9005ad3..90f361b05f1 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -101,6 +101,7 @@ static const TypeInfo vmcoreinfo_types[] = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(VMCoreInfoState),
.class_init = vmcoreinfo_device_class_init,
+ .secure = true,
}
};
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 18/26] hw/audio: mark Intel HDA devices & codecs as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (16 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 17/26] hw/misc: mark pvpanic, vmcoreinfo " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 19/26] hw/char: mark common serial / console devices " Daniel P. Berrangé
` (7 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
This is traditionally the primary audio backend for x86 as
virtio-snd is a relatively new invention.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/audio/hda-codec.c | 3 +++
hw/audio/intel-hda.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index 173fe56bea3..ee0d18c4caa 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -873,6 +873,7 @@ static const TypeInfo hda_audio_output_info = {
.name = "hda-output",
.parent = TYPE_HDA_AUDIO,
.class_init = hda_audio_output_class_init,
+ .secure = true,
};
static void hda_audio_duplex_class_init(ObjectClass *klass, const void *data)
@@ -888,6 +889,7 @@ static const TypeInfo hda_audio_duplex_info = {
.name = "hda-duplex",
.parent = TYPE_HDA_AUDIO,
.class_init = hda_audio_duplex_class_init,
+ .secure = true,
};
static void hda_audio_micro_class_init(ObjectClass *klass, const void *data)
@@ -903,6 +905,7 @@ static const TypeInfo hda_audio_micro_info = {
.name = "hda-micro",
.parent = TYPE_HDA_AUDIO,
.class_init = hda_audio_micro_class_init,
+ .secure = true,
};
static void hda_audio_register_types(void)
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 431deb22113..514df06885e 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -45,6 +45,7 @@ static const TypeInfo hda_codec_bus_info = {
.name = TYPE_HDA_BUS,
.parent = TYPE_BUS,
.instance_size = sizeof(HDACodecBus),
+ .secure = true,
};
void hda_codec_bus_init(DeviceState *dev, HDACodecBus *bus, size_t bus_size,
@@ -1275,12 +1276,14 @@ static const TypeInfo intel_hda_info_ich6 = {
.name = "intel-hda",
.parent = TYPE_INTEL_HDA_GENERIC,
.class_init = intel_hda_class_init_ich6,
+ .secure = true,
};
static const TypeInfo intel_hda_info_ich9 = {
.name = "ich9-intel-hda",
.parent = TYPE_INTEL_HDA_GENERIC,
.class_init = intel_hda_class_init_ich9,
+ .secure = true,
};
static void hda_codec_device_class_init(ObjectClass *klass, const void *data)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 19/26] hw/char: mark common serial / console devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (17 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 18/26] hw/audio: mark Intel HDA devices & codecs " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-16 13:19 ` Thomas Huth
2026-11-16 13:36 ` Philippe Mathieu-Daudé
2026-11-13 18:42 ` [PATCH v3 20/26] hw/mem: mark nvdimm, pc-dimm & spapr-nvdimm " Daniel P. Berrangé
` (6 subsequent siblings)
25 siblings, 2 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé, Cornelia Huck
These are needed as a baseline feature for many virtualization use
cases on x86, PPC64 and s390x.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com> #sclpconsole(-lm)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/char/debugcon.c | 1 +
hw/char/sclpconsole-lm.c | 1 +
hw/char/sclpconsole.c | 1 +
hw/char/serial-isa.c | 1 +
hw/char/serial-pci.c | 1 +
hw/char/serial.c | 1 +
hw/char/spapr_vty.c | 1 +
7 files changed, 7 insertions(+)
diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
index a1b370b90be..f38ce7b765e 100644
--- a/hw/char/debugcon.c
+++ b/hw/char/debugcon.c
@@ -134,6 +134,7 @@ static const TypeInfo debugcon_isa_info = {
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(ISADebugconState),
.class_init = debugcon_isa_class_initfn,
+ .secure = true,
};
static void debugcon_register_types(void)
diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index f6ed282f1bc..42616527356 100644
--- a/hw/char/sclpconsole-lm.c
+++ b/hw/char/sclpconsole-lm.c
@@ -363,6 +363,7 @@ static const TypeInfo sclp_console_info = {
.instance_size = sizeof(SCLPConsoleLM),
.class_init = console_class_init,
.class_size = sizeof(SCLPEventClass),
+ .secure = true,
};
static void register_types(void)
diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c
index 12033e1e466..b938cc3c677 100644
--- a/hw/char/sclpconsole.c
+++ b/hw/char/sclpconsole.c
@@ -346,6 +346,7 @@ static const TypeInfo sclp_console_info = {
.instance_size = sizeof(SCLPConsole),
.class_init = console_class_init,
.class_size = sizeof(SCLPEventClass),
+ .secure = true,
};
static void register_types(void)
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index eaa4e843c02..5df87590b73 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -147,6 +147,7 @@ static const TypeInfo serial_isa_info = {
.instance_size = sizeof(ISASerialState),
.instance_init = serial_isa_initfn,
.class_init = serial_isa_class_initfn,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_ACPI_DEV_AML_IF },
{ },
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index d8cacc90859..183091ea41a 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -109,6 +109,7 @@ static const TypeInfo serial_pci_info = {
.instance_size = sizeof(PCISerialState),
.instance_init = serial_pci_init,
.class_init = serial_pci_class_initfn,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 4339562ab00..fefd2cf9fcb 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -984,6 +984,7 @@ static const TypeInfo serial_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(SerialState),
.class_init = serial_class_init,
+ .secure = true,
};
static void serial_register_types(void)
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 1dd9fb155cb..96a4e58ad9d 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -201,6 +201,7 @@ static const TypeInfo spapr_vty_info = {
.parent = TYPE_VIO_SPAPR_DEVICE,
.instance_size = sizeof(SpaprVioVty),
.class_init = spapr_vty_class_init,
+ .secure = true,
};
SpaprVioDevice *spapr_vty_get_default(SpaprVioBus *bus)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 20/26] hw/mem: mark nvdimm, pc-dimm & spapr-nvdimm devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (18 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 19/26] hw/char: mark common serial / console devices " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 21/26] hw/uefi: mark the EFI vars service " Daniel P. Berrangé
` (5 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These devices are used in virutalization scenarios to support memory
hotplug and other uses cases.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/mem/nvdimm.c | 1 +
hw/mem/pc-dimm.c | 1 +
hw/ppc/spapr_nvdimm.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index 08086997d7f..4e98d88de2d 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -277,6 +277,7 @@ static const TypeInfo nvdimm_info = {
.instance_size = sizeof(NVDIMMDevice),
.instance_init = nvdimm_init,
.instance_finalize = nvdimm_finalize,
+ .secure = true,
};
static void nvdimm_register_types(void)
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index e9b872450a2..81ad1fca555 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -303,6 +303,7 @@ static const TypeInfo pc_dimm_info = {
.instance_init = pc_dimm_init,
.class_init = pc_dimm_class_init,
.class_size = sizeof(PCDIMMDeviceClass),
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_MEMORY_DEVICE },
{ }
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index 542ed79497a..ae270168500 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -916,6 +916,7 @@ static TypeInfo spapr_nvdimm_info = {
.class_size = sizeof(SPAPRNVDIMMClass),
.instance_size = sizeof(SpaprNVDIMMDevice),
.instance_init = spapr_nvdimm_init,
+ .secure = true,
};
static void spapr_nvdimm_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 21/26] hw/uefi: mark the EFI vars service as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (19 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 20/26] hw/mem: mark nvdimm, pc-dimm & spapr-nvdimm " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-16 13:20 ` Thomas Huth
2026-11-16 13:37 ` Philippe Mathieu-Daudé
2026-11-13 18:42 ` [PATCH v3 22/26] hw/acpi: mark erst, vmclock and vmgenid devices " Daniel P. Berrangé
` (4 subsequent siblings)
25 siblings, 2 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
This is used to persist EFI variables when NVRAM is not available
or undesirable.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/uefi/var-service-sysbus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/uefi/var-service-sysbus.c b/hw/uefi/var-service-sysbus.c
index e5e0441e16f..656496317b5 100644
--- a/hw/uefi/var-service-sysbus.c
+++ b/hw/uefi/var-service-sysbus.c
@@ -86,6 +86,7 @@ static const TypeInfo uefi_vars_sysbus_info = {
.instance_size = sizeof(uefi_vars_sysbus_state),
.instance_init = uefi_vars_sysbus_init,
.class_init = uefi_vars_sysbus_class_init,
+ .secure = true,
};
module_obj(TYPE_UEFI_VARS_SYSBUS);
@@ -115,6 +116,7 @@ static const TypeInfo uefi_vars_x64_info = {
.name = TYPE_UEFI_VARS_X64,
.parent = TYPE_UEFI_VARS_SYSBUS,
.class_init = uefi_vars_x64_class_init,
+ .secure = true,
};
module_obj(TYPE_UEFI_VARS_X64);
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 22/26] hw/acpi: mark erst, vmclock and vmgenid devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (20 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 21/26] hw/uefi: mark the EFI vars service " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 23/26] hw: mark KVM clock and RTC " Daniel P. Berrangé
` (3 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are all used in virtualization scenarios so must be
declare to provide a security boundary
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/acpi/erst.c | 1 +
hw/acpi/vmclock.c | 1 +
hw/acpi/vmgenid.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c
index b6c1942e308..44560004a53 100644
--- a/hw/acpi/erst.c
+++ b/hw/acpi/erst.c
@@ -1044,6 +1044,7 @@ static const TypeInfo erst_type_info = {
.parent = TYPE_PCI_DEVICE,
.class_init = erst_class_init,
.instance_size = sizeof(ERSTDeviceState),
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ }
diff --git a/hw/acpi/vmclock.c b/hw/acpi/vmclock.c
index d51cab2e20a..b5453546006 100644
--- a/hw/acpi/vmclock.c
+++ b/hw/acpi/vmclock.c
@@ -169,6 +169,7 @@ static const TypeInfo vmclock_device_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(VmclockState),
.class_init = vmclock_device_class_init,
+ .secure = true,
};
static void vmclock_register_types(void)
diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
index 27cc0128d11..67f815d8a1e 100644
--- a/hw/acpi/vmgenid.c
+++ b/hw/acpi/vmgenid.c
@@ -236,6 +236,7 @@ static const TypeInfo vmgenid_device_info = {
.parent = TYPE_DEVICE,
.instance_size = sizeof(VmGenIdState),
.class_init = vmgenid_device_class_init,
+ .secure = true,
};
static void vmgenid_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 23/26] hw: mark KVM clock and RTC devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (21 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 22/26] hw/acpi: mark erst, vmclock and vmgenid devices " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs " Daniel P. Berrangé
` (2 subsequent siblings)
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are core infrastructure in virtualization cases so must
provide a security boundary.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/i386/kvm/clock.c | 1 +
hw/rtc/mc146818rtc.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index e3dad136d31..d3e23013114 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -366,6 +366,7 @@ static const TypeInfo kvmclock_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(KVMClockState),
.class_init = kvmclock_class_init,
+ .secure = true,
};
/* Note: Must be called after VCPU initialization. */
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 835684abce5..887a8b07582 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -1044,6 +1044,7 @@ static const TypeInfo mc146818rtc_info = {
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(MC146818RtcState),
.class_init = rtc_class_initfn,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ TYPE_ACPI_DEV_AML_IF },
{ },
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (22 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 23/26] hw: mark KVM clock and RTC " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-16 13:21 ` Thomas Huth
2026-11-13 18:42 ` [PATCH v3 25/26] hw/input: mark PS/2 and PC Keyboard devices " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 26/26] hw/i386: mark vmmouse / vmport " Daniel P. Berrangé
25 siblings, 1 reply; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are needed in virtualization use cases to support PCI device
assignment use cases so must provide a security boundary.
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/arm/smmuv3.c | 2 ++
hw/i386/amd_iommu.c | 4 +++-
hw/i386/intel_iommu.c | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index ed19536a4dc..2a9721b87e7 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -2272,12 +2272,14 @@ static const TypeInfo smmuv3_type_info = {
.instance_init = smmuv3_instance_init,
.class_size = sizeof(SMMUv3Class),
.class_init = smmuv3_class_init,
+ .secure = true,
};
static const TypeInfo smmuv3_iommu_memory_region_info = {
.parent = TYPE_IOMMU_MEMORY_REGION,
.name = TYPE_SMMUV3_IOMMU_MEMORY_REGION,
.class_init = smmuv3_iommu_memory_region_class_init,
+ .secure = true,
};
static void smmuv3_register_types(void)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 2d5c7b5cdf6..be4b9b28ef6 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -2848,7 +2848,8 @@ static const TypeInfo amdvi_sysbus = {
.name = TYPE_AMD_IOMMU_DEVICE,
.parent = TYPE_X86_IOMMU_DEVICE,
.instance_size = sizeof(AMDVIState),
- .class_init = amdvi_sysbus_class_init
+ .class_init = amdvi_sysbus_class_init,
+ .secure = true,
};
static void amdvi_pci_class_init(ObjectClass *klass, const void *data)
@@ -2870,6 +2871,7 @@ static const TypeInfo amdvi_pci = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(AMDVIPCIState),
.class_init = amdvi_pci_class_init,
+ .secure = true,
.interfaces = (const InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index b7da5d086d3..cea27794184 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -5727,6 +5727,7 @@ static const TypeInfo vtd_info = {
.parent = TYPE_X86_IOMMU_DEVICE,
.instance_size = sizeof(IntelIOMMUState),
.class_init = vtd_class_init,
+ .secure = true,
};
static int vtd_attrs_to_index(IOMMUMemoryRegion *iommu_mr, MemTxAttrs attrs)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 25/26] hw/input: mark PS/2 and PC Keyboard devices as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (23 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 26/26] hw/i386: mark vmmouse / vmport " Daniel P. Berrangé
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These are part of the baseline x86 featureset so required for
virtualization use cases.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/input/pckbd.c | 3 ++-
hw/input/ps2.c | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index b09c3bce933..0250252cd67 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -766,7 +766,8 @@ static const TypeInfo i8042_mmio_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_init = i8042_mmio_init,
.instance_size = sizeof(MMIOKBDState),
- .class_init = i8042_mmio_class_init
+ .class_init = i8042_mmio_class_init,
+ .secure = true,
};
void i8042_isa_mouse_fake_event(ISAKBDState *isa)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 01af4350b3b..9d96dddde66 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -1293,7 +1293,8 @@ static const TypeInfo ps2_kbd_info = {
.name = TYPE_PS2_KBD_DEVICE,
.parent = TYPE_PS2_DEVICE,
.instance_size = sizeof(PS2KbdState),
- .class_init = ps2_kbd_class_init
+ .class_init = ps2_kbd_class_init,
+ .secure = true,
};
static void ps2_mouse_class_init(ObjectClass *klass, const void *data)
@@ -1313,7 +1314,8 @@ static const TypeInfo ps2_mouse_info = {
.name = TYPE_PS2_MOUSE_DEVICE,
.parent = TYPE_PS2_DEVICE,
.instance_size = sizeof(PS2MouseState),
- .class_init = ps2_mouse_class_init
+ .class_init = ps2_mouse_class_init,
+ .secure = true,
};
static void ps2_init(Object *obj)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH v3 26/26] hw/i386: mark vmmouse / vmport as secure
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
` (24 preceding siblings ...)
2026-11-13 18:42 ` [PATCH v3 25/26] hw/input: mark PS/2 and PC Keyboard devices " Daniel P. Berrangé
@ 2026-11-13 18:42 ` Daniel P. Berrangé
25 siblings, 0 replies; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-13 18:42 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Daniel P. Berrangé
These paravirtualized devices are relevant to virtualization
use cases and used by the i440fx/q35 machine boards.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/i386/vmmouse.c | 1 +
hw/i386/vmport.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index e289bce8e2e..612e7f7d3b6 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -390,6 +390,7 @@ static const TypeInfo vmmouse_info = {
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(VMMouseState),
.class_init = vmmouse_class_initfn,
+ .secure = true,
};
static void vmmouse_register_types(void)
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 865e0e70db6..24c4fb27a33 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -301,6 +301,7 @@ static const TypeInfo vmport_info = {
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(VMPortState),
.class_init = vmport_class_initfn,
+ .secure = true,
};
static void vmport_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH v3 01/26] hw: mark most virtio PCI devices as secure
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
@ 2026-11-16 13:05 ` Thomas Huth
2026-11-16 13:08 ` Marc-André Lureau
1 sibling, 0 replies; 37+ messages in thread
From: Thomas Huth @ 2026-11-16 13:05 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Cédric Le Goater
Am 13.11.26 um 19:42 schrieb Daniel P. Berrangé:
> These are all intended for use in a virtualization scenario and must
> provide a security boundary. This can be done for almost all virtio
> PCI devices by modifying the common type register helper.
>
> Exceptions are made for the virtio-gpu-gl, virtio-vga-gl,
> virtio-vga-rutatbaga and virtio-gpu-rutabaga devices.
>
> Despite being intended for virtualization use cases, the complexity
> of support for 3d acceleration is such that QEMU can't offer security
> for these devices at this time.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/display/virtio-gpu-pci-gl.c | 2 +-
> hw/display/virtio-vga-gl.c | 2 +-
> hw/display/virtio-vga-rutabaga.c | 2 +-
> hw/virtio/virtio-pci.c | 17 ++++++++++++++++-
> include/hw/virtio/virtio-pci.h | 10 +++++++++-
> 5 files changed, 28 insertions(+), 5 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 01/26] hw: mark most virtio PCI devices as secure
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
2026-11-16 13:05 ` Thomas Huth
@ 2026-11-16 13:08 ` Marc-André Lureau
1 sibling, 0 replies; 37+ messages in thread
From: Marc-André Lureau @ 2026-11-16 13:08 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: qemu-devel, Thomas Huth, Cédric Le Goater
On Fri, Nov 13, 2026 at 10:43 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> These are all intended for use in a virtualization scenario and must
> provide a security boundary. This can be done for almost all virtio
> PCI devices by modifying the common type register helper.
>
> Exceptions are made for the virtio-gpu-gl, virtio-vga-gl,
> virtio-vga-rutatbaga and virtio-gpu-rutabaga devices.
>
> Despite being intended for virtualization use cases, the complexity
> of support for 3d acceleration is such that QEMU can't offer security
> for these devices at this time.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
thanks
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> hw/display/virtio-gpu-pci-gl.c | 2 +-
> hw/display/virtio-vga-gl.c | 2 +-
> hw/display/virtio-vga-rutabaga.c | 2 +-
> hw/virtio/virtio-pci.c | 17 ++++++++++++++++-
> include/hw/virtio/virtio-pci.h | 10 +++++++++-
> 5 files changed, 28 insertions(+), 5 deletions(-)
>
> diff --git a/hw/display/virtio-gpu-pci-gl.c b/hw/display/virtio-gpu-pci-gl.c
> index c8923795dfa..dc67516b377 100644
> --- a/hw/display/virtio-gpu-pci-gl.c
> +++ b/hw/display/virtio-gpu-pci-gl.c
> @@ -51,7 +51,7 @@ module_kconfig(VIRTIO_PCI);
>
> static void virtio_gpu_gl_pci_register_types(void)
> {
> - virtio_pci_types_register(&virtio_gpu_gl_pci_info);
> + virtio_pci_types_register_insecure(&virtio_gpu_gl_pci_info);
> }
>
> type_init(virtio_gpu_gl_pci_register_types)
> diff --git a/hw/display/virtio-vga-gl.c b/hw/display/virtio-vga-gl.c
> index 178e4c71725..029d288c035 100644
> --- a/hw/display/virtio-vga-gl.c
> +++ b/hw/display/virtio-vga-gl.c
> @@ -42,7 +42,7 @@ module_kconfig(VIRTIO_VGA);
> static void virtio_vga_register_types(void)
> {
> if (have_vga) {
> - virtio_pci_types_register(&virtio_vga_gl_info);
> + virtio_pci_types_register_insecure(&virtio_vga_gl_info);
> }
> }
>
> diff --git a/hw/display/virtio-vga-rutabaga.c b/hw/display/virtio-vga-rutabaga.c
> index 1e07ee0b0d3..8ff715f8a35 100644
> --- a/hw/display/virtio-vga-rutabaga.c
> +++ b/hw/display/virtio-vga-rutabaga.c
> @@ -41,7 +41,7 @@ module_kconfig(VIRTIO_VGA);
> static void virtio_vga_register_types(void)
> {
> if (have_vga) {
> - virtio_pci_types_register(&virtio_vga_rutabaga_info);
> + virtio_pci_types_register_insecure(&virtio_vga_rutabaga_info);
> }
> }
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index c73f1f546cb..fe2e545c302 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2510,7 +2510,9 @@ static void virtio_pci_non_transitional_instance_init(Object *obj)
> proxy->disable_modern = false;
> }
>
> -void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> +static void
> +virtio_pci_types_register_internal(const VirtioPCIDeviceTypeInfo *t,
> + bool secure)
> {
> char *base_name = NULL;
> TypeInfo base_type_info = {
> @@ -2527,6 +2529,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> .name = t->generic_name,
> .parent = base_type_info.name,
> .class_init = virtio_pci_generic_class_init,
> + .secure = secure,
> .interfaces = (const InterfaceInfo[]) {
> { INTERFACE_PCIE_DEVICE },
> { INTERFACE_CONVENTIONAL_PCI_DEVICE },
> @@ -2562,6 +2565,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> .name = t->non_transitional_name,
> .parent = base_type_info.name,
> .instance_init = virtio_pci_non_transitional_instance_init,
> + .secure = secure,
> .interfaces = (const InterfaceInfo[]) {
> { INTERFACE_PCIE_DEVICE },
> { INTERFACE_CONVENTIONAL_PCI_DEVICE },
> @@ -2576,6 +2580,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> .name = t->transitional_name,
> .parent = base_type_info.name,
> .instance_init = virtio_pci_transitional_instance_init,
> + .secure = secure,
> .interfaces = (const InterfaceInfo[]) {
> /*
> * Transitional virtio devices work only as Conventional PCI
> @@ -2590,6 +2595,16 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> g_free(base_name);
> }
>
> +void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
> +{
> + virtio_pci_types_register_internal(t, true);
> +}
> +
> +void virtio_pci_types_register_insecure(const VirtioPCIDeviceTypeInfo *t)
> +{
> + virtio_pci_types_register_internal(t, false);
> +}
> +
> unsigned virtio_pci_optimal_num_queues(unsigned fixed_queues)
> {
> /*
> diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
> index ee50fb0d551..f033237035a 100644
> --- a/include/hw/virtio/virtio-pci.h
> +++ b/include/hw/virtio/virtio-pci.h
> @@ -239,8 +239,16 @@ typedef struct VirtioPCIDeviceTypeInfo {
> const InterfaceInfo *interfaces;
> } VirtioPCIDeviceTypeInfo;
>
> -/* Register virtio-pci type(s). @t must be static. */
> +/*
> + * Register virtio-pci type(s).
> + * @t must be static.
> + *
> + * Since they serve the virtualization use case, most virtio
> + * devices are expected to be classed as secure. In the rare
> + * scenario where this is not desired, use the second method.
> + */
> void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t);
> +void virtio_pci_types_register_insecure(const VirtioPCIDeviceTypeInfo *t);
>
> /**
> * virtio_pci_optimal_num_queues:
> --
> 2.56.1
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts as secure
2026-11-13 18:42 ` [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts " Daniel P. Berrangé
@ 2026-11-16 13:12 ` Thomas Huth
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Huth @ 2026-11-16 13:12 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Cédric Le Goater, Cornelia Huck
Am 13.11.26 um 19:42 schrieb Daniel P. Berrangé:
> Mark the PCI hosts secure if they are used from machine types
> that are considered for the virtualization use case.
>
> There is also a special case for the Xen passthrough type.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Acked-by: Cornelia Huck <cohuck@redhat.com> #s390
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/pci-host/gpex.c | 2 ++
> hw/pci-host/i440fx.c | 2 ++
> hw/pci-host/q35.c | 2 ++
> hw/pci-host/xen_igd_pt.c | 1 +
> hw/ppc/spapr_pci.c | 1 +
> hw/s390x/s390-pci-bus.c | 4 ++++
> 6 files changed, 12 insertions(+)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 19/26] hw/char: mark common serial / console devices as secure
2026-11-13 18:42 ` [PATCH v3 19/26] hw/char: mark common serial / console devices " Daniel P. Berrangé
@ 2026-11-16 13:19 ` Thomas Huth
2026-11-16 13:36 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 37+ messages in thread
From: Thomas Huth @ 2026-11-16 13:19 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Cédric Le Goater, Cornelia Huck
Am 13.11.26 um 19:42 schrieb Daniel P. Berrangé:
> These are needed as a baseline feature for many virtualization use
> cases on x86, PPC64 and s390x.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Acked-by: Cornelia Huck <cohuck@redhat.com> #sclpconsole(-lm)
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/char/debugcon.c | 1 +
> hw/char/sclpconsole-lm.c | 1 +
> hw/char/sclpconsole.c | 1 +
> hw/char/serial-isa.c | 1 +
> hw/char/serial-pci.c | 1 +
> hw/char/serial.c | 1 +
> hw/char/spapr_vty.c | 1 +
> 7 files changed, 7 insertions(+)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 21/26] hw/uefi: mark the EFI vars service as secure
2026-11-13 18:42 ` [PATCH v3 21/26] hw/uefi: mark the EFI vars service " Daniel P. Berrangé
@ 2026-11-16 13:20 ` Thomas Huth
2026-11-16 13:37 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 37+ messages in thread
From: Thomas Huth @ 2026-11-16 13:20 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Cédric Le Goater
Am 13.11.26 um 19:42 schrieb Daniel P. Berrangé:
> This is used to persist EFI variables when NVRAM is not available
> or undesirable.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/uefi/var-service-sysbus.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs as secure
2026-11-13 18:42 ` [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs " Daniel P. Berrangé
@ 2026-11-16 13:21 ` Thomas Huth
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Huth @ 2026-11-16 13:21 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Marc-André Lureau, Cédric Le Goater
Am 13.11.26 um 19:42 schrieb Daniel P. Berrangé:
> These are needed in virtualization use cases to support PCI device
> assignment use cases so must provide a security boundary.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/arm/smmuv3.c | 2 ++
> hw/i386/amd_iommu.c | 4 +++-
> hw/i386/intel_iommu.c | 1 +
> 3 files changed, 6 insertions(+), 1 deletion(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 19/26] hw/char: mark common serial / console devices as secure
2026-11-13 18:42 ` [PATCH v3 19/26] hw/char: mark common serial / console devices " Daniel P. Berrangé
2026-11-16 13:19 ` Thomas Huth
@ 2026-11-16 13:36 ` Philippe Mathieu-Daudé
2026-11-16 18:06 ` Daniel P. Berrangé
1 sibling, 1 reply; 37+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-11-16 13:36 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater,
Cornelia Huck
On 13/11/26 19:42, Daniel P. Berrangé wrote:
> These are needed as a baseline feature for many virtualization use
> cases on x86, PPC64 and s390x.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Acked-by: Cornelia Huck <cohuck@redhat.com> #sclpconsole(-lm)
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/char/debugcon.c | 1 +
> hw/char/sclpconsole-lm.c | 1 +
> hw/char/sclpconsole.c | 1 +
> hw/char/serial-isa.c | 1 +
> hw/char/serial-pci.c | 1 +
> hw/char/serial.c | 1 +
> hw/char/spapr_vty.c | 1 +
> 7 files changed, 7 insertions(+)
>
> diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
> index a1b370b90be..f38ce7b765e 100644
> --- a/hw/char/debugcon.c
> +++ b/hw/char/debugcon.c
> @@ -134,6 +134,7 @@ static const TypeInfo debugcon_isa_info = {
> .parent = TYPE_ISA_DEVICE,
> .instance_size = sizeof(ISADebugconState),
> .class_init = debugcon_isa_class_initfn,
> + .secure = true,
> };
What is the rationale for using the debug console in virtualization?
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 21/26] hw/uefi: mark the EFI vars service as secure
2026-11-13 18:42 ` [PATCH v3 21/26] hw/uefi: mark the EFI vars service " Daniel P. Berrangé
2026-11-16 13:20 ` Thomas Huth
@ 2026-11-16 13:37 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 37+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-11-16 13:37 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Thomas Huth, Marc-André Lureau, Cédric Le Goater
On 13/11/26 19:42, Daniel P. Berrangé wrote:
> This is used to persist EFI variables when NVRAM is not available
> or undesirable.
>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/uefi/var-service-sysbus.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 19/26] hw/char: mark common serial / console devices as secure
2026-11-16 13:36 ` Philippe Mathieu-Daudé
@ 2026-11-16 18:06 ` Daniel P. Berrangé
2026-11-16 21:18 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 37+ messages in thread
From: Daniel P. Berrangé @ 2026-11-16 18:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Thomas Huth, Marc-André Lureau,
Cédric Le Goater, Cornelia Huck
On Mon, Nov 16, 2026 at 02:36:39PM +0100, Philippe Mathieu-Daudé wrote:
> On 13/11/26 19:42, Daniel P. Berrangé wrote:
> > These are needed as a baseline feature for many virtualization use
> > cases on x86, PPC64 and s390x.
> >
> > Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Acked-by: Cornelia Huck <cohuck@redhat.com> #sclpconsole(-lm)
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > hw/char/debugcon.c | 1 +
> > hw/char/sclpconsole-lm.c | 1 +
> > hw/char/sclpconsole.c | 1 +
> > hw/char/serial-isa.c | 1 +
> > hw/char/serial-pci.c | 1 +
> > hw/char/serial.c | 1 +
> > hw/char/spapr_vty.c | 1 +
> > 7 files changed, 7 insertions(+)
> >
> > diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
> > index a1b370b90be..f38ce7b765e 100644
> > --- a/hw/char/debugcon.c
> > +++ b/hw/char/debugcon.c
> > @@ -134,6 +134,7 @@ static const TypeInfo debugcon_isa_info = {
> > .parent = TYPE_ISA_DEVICE,
> > .instance_size = sizeof(ISADebugconState),
> > .class_init = debugcon_isa_class_initfn,
> > + .secure = true,
> > };
>
> What is the rationale for using the debug console in virtualization?
SeaBIOS/EFI are in the virtualization use and the debugcon is how
you get logs out of them to figure out what's gone wrong when they
break. IMHO that makes it worthwhile to include, and as a device,
it is simple enough that it isn't likely to give us a security
burden.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH v3 19/26] hw/char: mark common serial / console devices as secure
2026-11-16 18:06 ` Daniel P. Berrangé
@ 2026-11-16 21:18 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 37+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-11-16 21:18 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Thomas Huth, Marc-André Lureau,
Cédric Le Goater, Cornelia Huck
On 16/11/26 19:06, Daniel P. Berrangé wrote:
> On Mon, Nov 16, 2026 at 02:36:39PM +0100, Philippe Mathieu-Daudé wrote:
>> On 13/11/26 19:42, Daniel P. Berrangé wrote:
>>> These are needed as a baseline feature for many virtualization use
>>> cases on x86, PPC64 and s390x.
>>>
>>> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> Acked-by: Cornelia Huck <cohuck@redhat.com> #sclpconsole(-lm)
>>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>>> ---
>>> hw/char/debugcon.c | 1 +
>>> hw/char/sclpconsole-lm.c | 1 +
>>> hw/char/sclpconsole.c | 1 +
>>> hw/char/serial-isa.c | 1 +
>>> hw/char/serial-pci.c | 1 +
>>> hw/char/serial.c | 1 +
>>> hw/char/spapr_vty.c | 1 +
>>> 7 files changed, 7 insertions(+)
>>>
>>> diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
>>> index a1b370b90be..f38ce7b765e 100644
>>> --- a/hw/char/debugcon.c
>>> +++ b/hw/char/debugcon.c
>>> @@ -134,6 +134,7 @@ static const TypeInfo debugcon_isa_info = {
>>> .parent = TYPE_ISA_DEVICE,
>>> .instance_size = sizeof(ISADebugconState),
>>> .class_init = debugcon_isa_class_initfn,
>>> + .secure = true,
>>> };
>>
>> What is the rationale for using the debug console in virtualization?
>
> SeaBIOS/EFI are in the virtualization use and the debugcon is how
> you get logs out of them to figure out what's gone wrong when they
> break. IMHO that makes it worthwhile to include, and as a device,
> it is simple enough that it isn't likely to give us a security
> burden.
OK, fine then, thanks.
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2026-11-16 21:18 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 18:42 [PATCH v3 00/26] Mark user creatable devices for secure for virt use case Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 01/26] hw: mark most virtio PCI devices as secure Daniel P. Berrangé
2026-11-16 13:05 ` Thomas Huth
2026-11-16 13:08 ` Marc-André Lureau
2026-11-13 18:42 ` [PATCH v3 02/26] hw: mark all virtio CCW " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 03/26] hw: mark all vhost devices a secure Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 04/26] hw: mark most remaining virtio object types as secure Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 05/26] hw/vfio: mark all VFIO object classes " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 06/26] hw/xen: mark all Xen related object types as being secure Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 07/26] hw/net: mark e1000, e1000e, rtl8139 & sPAPR VLAN as secure Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 08/26] hw/usb: mark commonly used USB devices/hosts " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 09/26] hw/watchdog: mark some watchdog devices " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 10/26] hw/scsi: mark spapr SCSI controller " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 11/26] hw/scsi: mark SCSI disk endpoint devices " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 12/26] hw/ide: mark ICH9 and ide-hd/ide-cd " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 13/26] hw: define most common PCI types " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 14/26] hw/pci-host: mark common x86, ppc, arm and s390 PCI hosts " Daniel P. Berrangé
2026-11-16 13:12 ` Thomas Huth
2026-11-13 18:42 ` [PATCH v3 15/26] hw/display: mark bochs, ramfb and VGA " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 16/26] hw/tpm: mark all TPM implementations " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 17/26] hw/misc: mark pvpanic, vmcoreinfo " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 18/26] hw/audio: mark Intel HDA devices & codecs " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 19/26] hw/char: mark common serial / console devices " Daniel P. Berrangé
2026-11-16 13:19 ` Thomas Huth
2026-11-16 13:36 ` Philippe Mathieu-Daudé
2026-11-16 18:06 ` Daniel P. Berrangé
2026-11-16 21:18 ` Philippe Mathieu-Daudé
2026-11-13 18:42 ` [PATCH v3 20/26] hw/mem: mark nvdimm, pc-dimm & spapr-nvdimm " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 21/26] hw/uefi: mark the EFI vars service " Daniel P. Berrangé
2026-11-16 13:20 ` Thomas Huth
2026-11-16 13:37 ` Philippe Mathieu-Daudé
2026-11-13 18:42 ` [PATCH v3 22/26] hw/acpi: mark erst, vmclock and vmgenid devices " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 23/26] hw: mark KVM clock and RTC " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 24/26] hw: device AMD, Intel and ARM IOMMUs " Daniel P. Berrangé
2026-11-16 13:21 ` Thomas Huth
2026-11-13 18:42 ` [PATCH v3 25/26] hw/input: mark PS/2 and PC Keyboard devices " Daniel P. Berrangé
2026-11-13 18:42 ` [PATCH v3 26/26] hw/i386: mark vmmouse / vmport " Daniel P. Berrangé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.