* [PULL 00/31] virtio,pci,pc: features, fixes, tests
@ 2025-06-01 15:24 Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 01/31] virtio: check for validity of indirect descriptors Michael S. Tsirkin
` (33 more replies)
0 siblings, 34 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
are available in the Git repository at:
https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
----------------------------------------------------------------
virtio,pci,pc: features, fixes, tests
vhost will now no longer set a call notifier if unused
loongarch gained acpi tests based on bios-tables-test
some core pci work for SVM support in vtd
vhost vdpa init has been optimized for response time to QMP
A couple more fixes
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
----------------------------------------------------------------
Bernhard Beschow (1):
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
Bibo Mao (8):
uefi-test-tools:: Add LoongArch64 support
tests/data/uefi-boot-images: Add ISO image for LoongArch system
tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
tests/acpi: Add empty ACPI data files for LoongArch
tests/qtest/bios-tables-test: Add basic testing for LoongArch
rebuild-expected-aml.sh: Add support for LoongArch
tests/acpi: Fill acpi table data for LoongArch
tests/acpi: Remove stale allowed tables
CLEMENT MATHIEU--DRIF (11):
pcie: Add helper to declare PASID capability for a pcie device
pcie: Helper functions to check if PASID is enabled
pcie: Helper function to check if ATS is enabled
pcie: Add a helper to declare the PRI capability for a pcie device
pcie: Helper functions to check to check if PRI is enabled
pci: Cache the bus mastering status in the device
pci: Add an API to get IOMMU's min page size and virtual address width
memory: Store user data pointer in the IOMMU notifiers
pci: Add a pci-level initialization function for IOMMU notifiers
pci: Add a pci-level API for ATS
pci: Add a PCI-level API for PRI
Eugenio Pérez (7):
vdpa: check for iova tree initialized at net_client_start
vdpa: reorder vhost_vdpa_set_backend_cap
vdpa: set backend capabilities at vhost_vdpa_init
vdpa: add listener_registered
vdpa: reorder listener assignment
vdpa: move iova_tree allocation to net_vhost_vdpa_init
vdpa: move memory listener register to vhost_vdpa_init
Huaitong Han (1):
vhost: Don't set vring call if guest notifier is unused
Sairaj Kodilkar (1):
hw/i386/amd_iommu: Fix device setup failure when PT is on.
Vasant Hegde (1):
hw/i386/amd_iommu: Fix xtsup when vcpus < 255
Yuri Benditovich (1):
virtio: check for validity of indirect descriptors
include/hw/pci/pci.h | 316 +++++++++++++++++++++
include/hw/pci/pci_device.h | 1 +
include/hw/pci/pcie.h | 13 +-
include/hw/pci/pcie_regs.h | 8 +
include/hw/virtio/vhost-vdpa.h | 22 +-
include/system/memory.h | 1 +
hw/i386/amd_iommu.c | 20 +-
hw/i386/pc_piix.c | 5 +
hw/pci/pci.c | 206 +++++++++++++-
hw/pci/pcie.c | 78 +++++
hw/virtio/vhost-vdpa.c | 107 ++++---
hw/virtio/virtio-pci.c | 7 +-
hw/virtio/virtio.c | 11 +
net/vhost-vdpa.c | 34 +--
tests/qtest/bios-tables-test.c | 99 ++++++-
tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
tests/data/acpi/loongarch64/virt/SLIT | 0
tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
tests/data/acpi/rebuild-expected-aml.sh | 4 +-
.../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
tests/qtest/meson.build | 1 +
tests/uefi-test-tools/Makefile | 5 +-
.../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
tests/uefi-test-tools/uefi-test-build.config | 10 +
38 files changed, 846 insertions(+), 108 deletions(-)
create mode 100644 tests/data/acpi/loongarch64/virt/APIC
create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
create mode 100644 tests/data/acpi/loongarch64/virt/FACP
create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
^ permalink raw reply [flat|nested] 41+ messages in thread
* [PULL 01/31] virtio: check for validity of indirect descriptors
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 02/31] hw/i386/amd_iommu: Fix device setup failure when PT is on Michael S. Tsirkin
` (32 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Yuri Benditovich
From: Yuri Benditovich <yuri.benditovich@daynix.com>
virtio processes indirect descriptors even if the respected
feature VIRTIO_RING_F_INDIRECT_DESC was not negotiated.
If qemu is used with reduced set of features to emulate the
hardware device that does not support indirect descriptors,
the will probably trigger problematic flows on the hardware
setup but do not reveal the mistake on qemu.
Add LOG_GUEST_ERROR for such case. This will issue logs with
'-d guest_errors' in the command line
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Message-Id: <20250515063237.808293-1-yuri.benditovich@daynix.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
hw/virtio/virtio.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 2e98cecf64..5534251e01 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -205,6 +205,15 @@ static const char *virtio_id_to_name(uint16_t device_id)
return name;
}
+static void virtio_check_indirect_feature(VirtIODevice *vdev)
+{
+ if (!virtio_vdev_has_feature(vdev, VIRTIO_RING_F_INDIRECT_DESC)) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "Device %s: indirect_desc was not negotiated!\n",
+ vdev->name);
+ }
+}
+
/* Called within call_rcu(). */
static void virtio_free_region_cache(VRingMemoryRegionCaches *caches)
{
@@ -1733,6 +1742,7 @@ static void *virtqueue_split_pop(VirtQueue *vq, size_t sz)
virtio_error(vdev, "Invalid size for indirect buffer table");
goto done;
}
+ virtio_check_indirect_feature(vdev);
/* loop over the indirect descriptor table */
len = address_space_cache_init(&indirect_desc_cache, vdev->dma_as,
@@ -1870,6 +1880,7 @@ static void *virtqueue_packed_pop(VirtQueue *vq, size_t sz)
virtio_error(vdev, "Invalid size for indirect buffer table");
goto done;
}
+ virtio_check_indirect_feature(vdev);
/* loop over the indirect descriptor table */
len = address_space_cache_init(&indirect_desc_cache, vdev->dma_as,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 02/31] hw/i386/amd_iommu: Fix device setup failure when PT is on.
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 01/31] virtio: check for validity of indirect descriptors Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 03/31] hw/i386/amd_iommu: Fix xtsup when vcpus < 255 Michael S. Tsirkin
` (31 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Sairaj Kodilkar, Vasant Hegde, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, Marcel Apfelbaum
From: Sairaj Kodilkar <sarunkod@amd.com>
Commit c1f46999ef506 ("amd_iommu: Add support for pass though mode")
introduces the support for "pt" flag by enabling nodma memory when
"pt=off". This allowed VFIO devices to successfully register notifiers
by using nodma region.
But, This also broke things when guest is booted with the iommu=nopt
because, devices bypass the IOMMU and use untranslated addresses (IOVA) to
perform DMA reads/writes to the nodma memory region, ultimately resulting in
a failure to setup the devices in the guest.
Fix the above issue by always enabling the amdvi_dev_as->iommu memory region.
But this will once again cause VFIO devices to fail while registering the
notifiers with AMD IOMMU memory region.
Fixes: c1f46999ef506 ("amd_iommu: Add support for pass though mode")
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Message-Id: <20250516100535.4980-2-sarunkod@amd.com>
Fixes: c1f46999ef506 ("amd_iommu: Add support for pass though mode")
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
---
hw/i386/amd_iommu.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 0775c8f3bb..17379db52a 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1426,7 +1426,6 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
AMDVIState *s = opaque;
AMDVIAddressSpace **iommu_as, *amdvi_dev_as;
int bus_num = pci_bus_num(bus);
- X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
iommu_as = s->address_spaces[bus_num];
@@ -1486,15 +1485,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
AMDVI_INT_ADDR_FIRST,
&amdvi_dev_as->iommu_ir, 1);
- if (!x86_iommu->pt_supported) {
- memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
- memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
- true);
- } else {
- memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu),
- false);
- memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, true);
- }
+ memory_region_set_enabled(&amdvi_dev_as->iommu_nodma, false);
+ memory_region_set_enabled(MEMORY_REGION(&amdvi_dev_as->iommu), true);
}
return &iommu_as[devfn]->as;
}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 03/31] hw/i386/amd_iommu: Fix xtsup when vcpus < 255
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 01/31] virtio: check for validity of indirect descriptors Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 02/31] hw/i386/amd_iommu: Fix device setup failure when PT is on Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 04/31] pcie: Add helper to declare PASID capability for a pcie device Michael S. Tsirkin
` (30 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Vasant Hegde, Alejandro Jimenez,
Philippe Mathieu-Daudé, Joao Martins, Sairaj Kodilkar,
Paolo Bonzini, Richard Henderson, Eduardo Habkost,
Marcel Apfelbaum
From: Vasant Hegde <vasant.hegde@amd.com>
If vCPUs > 255 then x86 common code (x86_cpus_init()) call kvm_enable_x2apic().
But if vCPUs <= 255 then the common code won't calls kvm_enable_x2apic().
This is because commit 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM
checks on XTSup feature") removed the call to kvm_enable_x2apic when xtsup
is "on", which break things when guest is booted with x2apic mode and
there are <= 255 vCPUs.
Fix this by adding back kvm_enable_x2apic() call when xtsup=on.
Fixes: 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature")
Reported-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Tested-by: Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Message-Id: <20250516100535.4980-3-sarunkod@amd.com>
Fixes: 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature")
Reported-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Tested-by: Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
---
hw/i386/amd_iommu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 17379db52a..963aa2450c 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1715,6 +1715,14 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
exit(EXIT_FAILURE);
}
+ if (s->xtsup) {
+ if (kvm_irqchip_is_split() && !kvm_enable_x2apic()) {
+ error_report("AMD IOMMU xtsup=on requires x2APIC support on "
+ "the KVM side");
+ exit(EXIT_FAILURE);
+ }
+ }
+
pci_setup_iommu(bus, &amdvi_iommu_ops, s);
amdvi_init(s);
}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 04/31] pcie: Add helper to declare PASID capability for a pcie device
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (2 preceding siblings ...)
2025-06-01 15:24 ` [PULL 03/31] hw/i386/amd_iommu: Fix xtsup when vcpus < 255 Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 05/31] pcie: Helper functions to check if PASID is enabled Michael S. Tsirkin
` (29 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-2-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie.h | 6 +++++-
include/hw/pci/pcie_regs.h | 5 +++++
hw/pci/pcie.c | 25 +++++++++++++++++++++++++
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index 70a5de09de..fe82e0a915 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -70,8 +70,9 @@ struct PCIExpressDevice {
uint16_t aer_cap;
PCIEAERLog aer_log;
- /* Offset of ATS capability in config space */
+ /* Offset of ATS and PASID capabilities in config space */
uint16_t ats_cap;
+ uint16_t pasid_cap;
/* ACS */
uint16_t acs_cap;
@@ -150,4 +151,7 @@ void pcie_cap_slot_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp);
void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp);
+
+void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
+ bool exec_perm, bool priv_mod);
#endif /* QEMU_PCIE_H */
diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h
index 9d3b6868dc..4d9cf4a29c 100644
--- a/include/hw/pci/pcie_regs.h
+++ b/include/hw/pci/pcie_regs.h
@@ -86,6 +86,11 @@ typedef enum PCIExpLinkWidth {
#define PCI_ARI_VER 1
#define PCI_ARI_SIZEOF 8
+/* PASID */
+#define PCI_PASID_VER 1
+#define PCI_EXT_CAP_PASID_MAX_WIDTH 20
+#define PCI_PASID_CAP_WIDTH_SHIFT 8
+
/* AER */
#define PCI_ERR_VER 2
#define PCI_ERR_SIZEOF 0x48
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1b12db6fa2..4f935ff420 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -1214,3 +1214,28 @@ void pcie_acs_reset(PCIDevice *dev)
pci_set_word(dev->config + dev->exp.acs_cap + PCI_ACS_CTRL, 0);
}
}
+
+/* PASID */
+void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
+ bool exec_perm, bool priv_mod)
+{
+ static const uint16_t control_reg_rw_mask = 0x07;
+ uint16_t capability_reg;
+
+ assert(pasid_width <= PCI_EXT_CAP_PASID_MAX_WIDTH);
+
+ pcie_add_capability(dev, PCI_EXT_CAP_ID_PASID, PCI_PASID_VER, offset,
+ PCI_EXT_CAP_PASID_SIZEOF);
+
+ capability_reg = ((uint16_t)pasid_width) << PCI_PASID_CAP_WIDTH_SHIFT;
+ capability_reg |= exec_perm ? PCI_PASID_CAP_EXEC : 0;
+ capability_reg |= priv_mod ? PCI_PASID_CAP_PRIV : 0;
+ pci_set_word(dev->config + offset + PCI_PASID_CAP, capability_reg);
+
+ /* Everything is disabled by default */
+ pci_set_word(dev->config + offset + PCI_PASID_CTRL, 0);
+
+ pci_set_word(dev->wmask + offset + PCI_PASID_CTRL, control_reg_rw_mask);
+
+ dev->exp.pasid_cap = offset;
+}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 05/31] pcie: Helper functions to check if PASID is enabled
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (3 preceding siblings ...)
2025-06-01 15:24 ` [PULL 04/31] pcie: Add helper to declare PASID capability for a pcie device Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 06/31] pcie: Helper function to check if ATS " Michael S. Tsirkin
` (28 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
pasid_enabled checks whether the capability is
present or not. If so, we read the configuration space to get
the status of the feature (enabled or not).
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-3-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie.h | 2 ++
hw/pci/pcie.c | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index fe82e0a915..dff98ff2c6 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -154,4 +154,6 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
bool exec_perm, bool priv_mod);
+
+bool pcie_pasid_enabled(const PCIDevice *dev);
#endif /* QEMU_PCIE_H */
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 4f935ff420..db9756d861 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -1239,3 +1239,12 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
dev->exp.pasid_cap = offset;
}
+
+bool pcie_pasid_enabled(const PCIDevice *dev)
+{
+ if (!pci_is_express(dev) || !dev->exp.pasid_cap) {
+ return false;
+ }
+ return (pci_get_word(dev->config + dev->exp.pasid_cap + PCI_PASID_CTRL) &
+ PCI_PASID_CTRL_ENABLE) != 0;
+}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 06/31] pcie: Helper function to check if ATS is enabled
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (4 preceding siblings ...)
2025-06-01 15:24 ` [PULL 05/31] pcie: Helper functions to check if PASID is enabled Michael S. Tsirkin
@ 2025-06-01 15:24 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 07/31] pcie: Add a helper to declare the PRI capability for a pcie device Michael S. Tsirkin
` (27 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:24 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
ats_enabled checks whether the capability is
present or not. If so, we read the configuration space to get
the status of the feature (enabled or not).
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-4-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie.h | 1 +
hw/pci/pcie.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index dff98ff2c6..497d0bc2d2 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -156,4 +156,5 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
bool exec_perm, bool priv_mod);
bool pcie_pasid_enabled(const PCIDevice *dev);
+bool pcie_ats_enabled(const PCIDevice *dev);
#endif /* QEMU_PCIE_H */
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index db9756d861..36de709801 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -1248,3 +1248,12 @@ bool pcie_pasid_enabled(const PCIDevice *dev)
return (pci_get_word(dev->config + dev->exp.pasid_cap + PCI_PASID_CTRL) &
PCI_PASID_CTRL_ENABLE) != 0;
}
+
+bool pcie_ats_enabled(const PCIDevice *dev)
+{
+ if (!pci_is_express(dev) || !dev->exp.ats_cap) {
+ return false;
+ }
+ return (pci_get_word(dev->config + dev->exp.ats_cap + PCI_ATS_CTRL) &
+ PCI_ATS_CTRL_ENABLE) != 0;
+}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 07/31] pcie: Add a helper to declare the PRI capability for a pcie device
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (5 preceding siblings ...)
2025-06-01 15:24 ` [PULL 06/31] pcie: Helper function to check if ATS " Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 08/31] pcie: Helper functions to check to check if PRI is enabled Michael S. Tsirkin
` (26 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-5-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie.h | 5 ++++-
include/hw/pci/pcie_regs.h | 3 +++
hw/pci/pcie.c | 26 ++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index 497d0bc2d2..17f06cd5d6 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -70,9 +70,10 @@ struct PCIExpressDevice {
uint16_t aer_cap;
PCIEAERLog aer_log;
- /* Offset of ATS and PASID capabilities in config space */
+ /* Offset of ATS, PRI and PASID capabilities in config space */
uint16_t ats_cap;
uint16_t pasid_cap;
+ uint16_t pri_cap;
/* ACS */
uint16_t acs_cap;
@@ -154,6 +155,8 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
bool exec_perm, bool priv_mod);
+void pcie_pri_init(PCIDevice *dev, uint16_t offset, uint32_t outstanding_pr_cap,
+ bool prg_response_pasid_req);
bool pcie_pasid_enabled(const PCIDevice *dev);
bool pcie_ats_enabled(const PCIDevice *dev);
diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h
index 4d9cf4a29c..33a22229fe 100644
--- a/include/hw/pci/pcie_regs.h
+++ b/include/hw/pci/pcie_regs.h
@@ -91,6 +91,9 @@ typedef enum PCIExpLinkWidth {
#define PCI_EXT_CAP_PASID_MAX_WIDTH 20
#define PCI_PASID_CAP_WIDTH_SHIFT 8
+/* PRI */
+#define PCI_PRI_VER 1
+
/* AER */
#define PCI_ERR_VER 2
#define PCI_ERR_SIZEOF 0x48
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 36de709801..542172b3fa 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -1240,6 +1240,32 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
dev->exp.pasid_cap = offset;
}
+/* PRI */
+void pcie_pri_init(PCIDevice *dev, uint16_t offset, uint32_t outstanding_pr_cap,
+ bool prg_response_pasid_req)
+{
+ static const uint16_t control_reg_rw_mask = 0x3;
+ static const uint16_t status_reg_rw1_mask = 0x3;
+ static const uint32_t pr_alloc_reg_rw_mask = 0xffffffff;
+ uint16_t status_reg;
+
+ status_reg = prg_response_pasid_req ? PCI_PRI_STATUS_PASID : 0;
+ status_reg |= PCI_PRI_STATUS_STOPPED; /* Stopped by default */
+
+ pcie_add_capability(dev, PCI_EXT_CAP_ID_PRI, PCI_PRI_VER, offset,
+ PCI_EXT_CAP_PRI_SIZEOF);
+ /* Disabled by default */
+
+ pci_set_word(dev->config + offset + PCI_PRI_STATUS, status_reg);
+ pci_set_long(dev->config + offset + PCI_PRI_MAX_REQ, outstanding_pr_cap);
+
+ pci_set_word(dev->wmask + offset + PCI_PRI_CTRL, control_reg_rw_mask);
+ pci_set_word(dev->w1cmask + offset + PCI_PRI_STATUS, status_reg_rw1_mask);
+ pci_set_long(dev->wmask + offset + PCI_PRI_ALLOC_REQ, pr_alloc_reg_rw_mask);
+
+ dev->exp.pri_cap = offset;
+}
+
bool pcie_pasid_enabled(const PCIDevice *dev)
{
if (!pci_is_express(dev) || !dev->exp.pasid_cap) {
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 08/31] pcie: Helper functions to check to check if PRI is enabled
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (6 preceding siblings ...)
2025-06-01 15:25 ` [PULL 07/31] pcie: Add a helper to declare the PRI capability for a pcie device Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 09/31] pci: Cache the bus mastering status in the device Michael S. Tsirkin
` (25 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
pri_enabled can be used to check whether the capability is present and
enabled on a PCIe device
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-6-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie.h | 1 +
hw/pci/pcie.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index 17f06cd5d6..ff6ce08e13 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -158,6 +158,7 @@ void pcie_pasid_init(PCIDevice *dev, uint16_t offset, uint8_t pasid_width,
void pcie_pri_init(PCIDevice *dev, uint16_t offset, uint32_t outstanding_pr_cap,
bool prg_response_pasid_req);
+bool pcie_pri_enabled(const PCIDevice *dev);
bool pcie_pasid_enabled(const PCIDevice *dev);
bool pcie_ats_enabled(const PCIDevice *dev);
#endif /* QEMU_PCIE_H */
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 542172b3fa..eaeb68894e 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -1266,6 +1266,15 @@ void pcie_pri_init(PCIDevice *dev, uint16_t offset, uint32_t outstanding_pr_cap,
dev->exp.pri_cap = offset;
}
+bool pcie_pri_enabled(const PCIDevice *dev)
+{
+ if (!pci_is_express(dev) || !dev->exp.pri_cap) {
+ return false;
+ }
+ return (pci_get_word(dev->config + dev->exp.pri_cap + PCI_PRI_CTRL) &
+ PCI_PRI_CTRL_ENABLE) != 0;
+}
+
bool pcie_pasid_enabled(const PCIDevice *dev)
{
if (!pci_is_express(dev) || !dev->exp.pasid_cap) {
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 09/31] pci: Cache the bus mastering status in the device
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (7 preceding siblings ...)
2025-06-01 15:25 ` [PULL 08/31] pcie: Helper functions to check to check if PRI is enabled Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 10/31] pci: Add an API to get IOMMU's min page size and virtual address width Michael S. Tsirkin
` (24 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
The cached is_master value is necessary to know if a device is
allowed to issue ATS/PRI requests or not as these operations do not go
through the master_enable memory region.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-7-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci_device.h | 1 +
hw/pci/pci.c | 23 +++++++++++++----------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h
index e41d95b0b0..eee0338568 100644
--- a/include/hw/pci/pci_device.h
+++ b/include/hw/pci/pci_device.h
@@ -90,6 +90,7 @@ struct PCIDevice {
char name[64];
PCIIORegion io_regions[PCI_NUM_REGIONS];
AddressSpace bus_master_as;
+ bool is_master;
MemoryRegion bus_master_container_region;
MemoryRegion bus_master_enable_region;
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index f5ab510697..1114ba8529 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -128,6 +128,12 @@ static GSequence *pci_acpi_index_list(void)
return used_acpi_index_list;
}
+static void pci_set_master(PCIDevice *d, bool enable)
+{
+ memory_region_set_enabled(&d->bus_master_enable_region, enable);
+ d->is_master = enable; /* cache the status */
+}
+
static void pci_init_bus_master(PCIDevice *pci_dev)
{
AddressSpace *dma_as = pci_device_iommu_address_space(pci_dev);
@@ -135,7 +141,7 @@ static void pci_init_bus_master(PCIDevice *pci_dev)
memory_region_init_alias(&pci_dev->bus_master_enable_region,
OBJECT(pci_dev), "bus master",
dma_as->root, 0, memory_region_size(dma_as->root));
- memory_region_set_enabled(&pci_dev->bus_master_enable_region, false);
+ pci_set_master(pci_dev, false);
memory_region_add_subregion(&pci_dev->bus_master_container_region, 0,
&pci_dev->bus_master_enable_region);
}
@@ -804,9 +810,8 @@ static int get_pci_config_device(QEMUFile *f, void *pv, size_t size,
pci_bridge_update_mappings(PCI_BRIDGE(s));
}
- memory_region_set_enabled(&s->bus_master_enable_region,
- pci_get_word(s->config + PCI_COMMAND)
- & PCI_COMMAND_MASTER);
+ pci_set_master(s, pci_get_word(s->config + PCI_COMMAND)
+ & PCI_COMMAND_MASTER);
g_free(config);
return 0;
@@ -1787,9 +1792,8 @@ void pci_default_write_config(PCIDevice *d, uint32_t addr, uint32_t val_in, int
if (ranges_overlap(addr, l, PCI_COMMAND, 2)) {
pci_update_irq_disabled(d, was_irq_disabled);
- memory_region_set_enabled(&d->bus_master_enable_region,
- (pci_get_word(d->config + PCI_COMMAND)
- & PCI_COMMAND_MASTER) && d->enabled);
+ pci_set_master(d, (pci_get_word(d->config + PCI_COMMAND) &
+ PCI_COMMAND_MASTER) && d->enabled);
}
msi_write_config(d, addr, val_in, l);
@@ -3100,9 +3104,8 @@ void pci_set_enabled(PCIDevice *d, bool state)
d->enabled = state;
pci_update_mappings(d);
- memory_region_set_enabled(&d->bus_master_enable_region,
- (pci_get_word(d->config + PCI_COMMAND)
- & PCI_COMMAND_MASTER) && d->enabled);
+ pci_set_master(d, (pci_get_word(d->config + PCI_COMMAND)
+ & PCI_COMMAND_MASTER) && d->enabled);
if (qdev_is_realized(&d->qdev)) {
pci_device_reset(d);
}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 10/31] pci: Add an API to get IOMMU's min page size and virtual address width
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (8 preceding siblings ...)
2025-06-01 15:25 ` [PULL 09/31] pci: Cache the bus mastering status in the device Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 11/31] memory: Store user data pointer in the IOMMU notifiers Michael S. Tsirkin
` (23 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
This kind of information is needed by devices implementing ATS in order
to initialize their translation cache.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-8-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci.h | 26 ++++++++++++++++++++++++++
hw/pci/pci.c | 17 +++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index c2fe6caa2c..d67ffe12db 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -429,6 +429,19 @@ typedef struct PCIIOMMUOps {
* @devfn: device and function number of the PCI device.
*/
void (*unset_iommu_device)(PCIBus *bus, void *opaque, int devfn);
+ /**
+ * @get_iotlb_info: get properties required to initialize a device IOTLB.
+ *
+ * Callback required if devices are allowed to cache translations.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @addr_width: the address width of the IOMMU (output parameter).
+ *
+ * @min_page_size: the page size of the IOMMU (output parameter).
+ */
+ void (*get_iotlb_info)(void *opaque, uint8_t *addr_width,
+ uint32_t *min_page_size);
} PCIIOMMUOps;
AddressSpace *pci_device_iommu_address_space(PCIDevice *dev);
@@ -436,6 +449,19 @@ bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod,
Error **errp);
void pci_device_unset_iommu_device(PCIDevice *dev);
+/**
+ * pci_iommu_get_iotlb_info: get properties required to initialize a
+ * device IOTLB.
+ *
+ * Returns 0 on success, or a negative errno otherwise.
+ *
+ * @dev: the device that wants to get the information.
+ * @addr_width: the address width of the IOMMU (output parameter).
+ * @min_page_size: the page size of the IOMMU (output parameter).
+ */
+int pci_iommu_get_iotlb_info(PCIDevice *dev, uint8_t *addr_width,
+ uint32_t *min_page_size);
+
/**
* pci_setup_iommu: Initialize specific IOMMU handlers for a PCIBus
*
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 1114ba8529..fc4954ac81 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2970,6 +2970,23 @@ void pci_device_unset_iommu_device(PCIDevice *dev)
}
}
+int pci_iommu_get_iotlb_info(PCIDevice *dev, uint8_t *addr_width,
+ uint32_t *min_page_size)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->get_iotlb_info) {
+ iommu_bus->iommu_ops->get_iotlb_info(iommu_bus->iommu_opaque,
+ addr_width, min_page_size);
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
void pci_setup_iommu(PCIBus *bus, const PCIIOMMUOps *ops, void *opaque)
{
/*
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 11/31] memory: Store user data pointer in the IOMMU notifiers
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (9 preceding siblings ...)
2025-06-01 15:25 ` [PULL 10/31] pci: Add an API to get IOMMU's min page size and virtual address width Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 12/31] pci: Add a pci-level initialization function for " Michael S. Tsirkin
` (22 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Paolo Bonzini, Peter Xu,
David Hildenbrand, Philippe Mathieu-Daudé
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
This will help developers of ATS-capable devices to track a state.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-9-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/system/memory.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/system/memory.h b/include/system/memory.h
index fbbf4cf911..fc35a0dcad 100644
--- a/include/system/memory.h
+++ b/include/system/memory.h
@@ -183,6 +183,7 @@ struct IOMMUNotifier {
hwaddr start;
hwaddr end;
int iommu_idx;
+ void *opaque;
QLIST_ENTRY(IOMMUNotifier) node;
};
typedef struct IOMMUNotifier IOMMUNotifier;
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 12/31] pci: Add a pci-level initialization function for IOMMU notifiers
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (10 preceding siblings ...)
2025-06-01 15:25 ` [PULL 11/31] memory: Store user data pointer in the IOMMU notifiers Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 13/31] pci: Add a pci-level API for ATS Michael S. Tsirkin
` (21 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
This is meant to be used by ATS-capable devices.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-10-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci.h | 33 +++++++++++++++++++++++++++++++++
hw/pci/pci.c | 17 +++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index d67ffe12db..f3016fd76f 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -442,6 +442,26 @@ typedef struct PCIIOMMUOps {
*/
void (*get_iotlb_info)(void *opaque, uint8_t *addr_width,
uint32_t *min_page_size);
+ /**
+ * @init_iotlb_notifier: initialize an IOMMU notifier.
+ *
+ * Optional callback.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @n: the notifier to be initialized.
+ *
+ * @fn: the callback to be installed.
+ *
+ * @user_opaque: a user pointer that can be used to track a state.
+ */
+ void (*init_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
+ IOMMUNotifier *n, IOMMUNotify fn,
+ void *user_opaque);
} PCIIOMMUOps;
AddressSpace *pci_device_iommu_address_space(PCIDevice *dev);
@@ -462,6 +482,19 @@ void pci_device_unset_iommu_device(PCIDevice *dev);
int pci_iommu_get_iotlb_info(PCIDevice *dev, uint8_t *addr_width,
uint32_t *min_page_size);
+/**
+ * pci_iommu_init_iotlb_notifier: initialize an IOMMU notifier.
+ *
+ * This function is used by devices before registering an IOTLB notifier.
+ *
+ * @dev: the device.
+ * @n: the notifier to be initialized.
+ * @fn: the callback to be installed.
+ * @opaque: a user pointer that can be used to track a state.
+ */
+int pci_iommu_init_iotlb_notifier(PCIDevice *dev, IOMMUNotifier *n,
+ IOMMUNotify fn, void *opaque);
+
/**
* pci_setup_iommu: Initialize specific IOMMU handlers for a PCIBus
*
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index fc4954ac81..dfa5a0259e 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2939,6 +2939,23 @@ AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
return &address_space_memory;
}
+int pci_iommu_init_iotlb_notifier(PCIDevice *dev, IOMMUNotifier *n,
+ IOMMUNotify fn, void *opaque)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->init_iotlb_notifier) {
+ iommu_bus->iommu_ops->init_iotlb_notifier(bus, iommu_bus->iommu_opaque,
+ devfn, n, fn, opaque);
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod,
Error **errp)
{
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 13/31] pci: Add a pci-level API for ATS
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (11 preceding siblings ...)
2025-06-01 15:25 ` [PULL 12/31] pci: Add a pci-level initialization function for " Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 14/31] pci: Add a PCI-level API for PRI Michael S. Tsirkin
` (20 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Ethan Milon,
Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Devices implementing ATS can send translation requests using
pci_ats_request_translation. The invalidation events are sent
back to the device using the iommu notifier managed with
pci_iommu_register_iotlb_notifier / pci_iommu_unregister_iotlb_notifier.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Co-authored-by: Ethan Milon <ethan.milon@eviden.com>
Message-Id: <20250520071823.764266-11-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci.h | 126 +++++++++++++++++++++++++++++++++++++++++++
hw/pci/pci.c | 81 ++++++++++++++++++++++++++++
2 files changed, 207 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index f3016fd76f..5d72607ed5 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -462,6 +462,80 @@ typedef struct PCIIOMMUOps {
void (*init_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
IOMMUNotifier *n, IOMMUNotify fn,
void *user_opaque);
+ /**
+ * @register_iotlb_notifier: setup an IOTLB invalidation notifier.
+ *
+ * Callback required if devices are allowed to cache translations.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to watch.
+ *
+ * @n: the notifier to register.
+ */
+ void (*register_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid, IOMMUNotifier *n);
+ /**
+ * @unregister_iotlb_notifier: remove an IOTLB invalidation notifier.
+ *
+ * Callback required if devices are allowed to cache translations.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to stop watching.
+ *
+ * @n: the notifier to unregister.
+ */
+ void (*unregister_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid, IOMMUNotifier *n);
+ /**
+ * @ats_request_translation: issue an ATS request.
+ *
+ * Callback required if devices are allowed to use the address
+ * translation service.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to use for the request.
+ *
+ * @priv_req: privileged mode bit (PASID TLP).
+ *
+ * @exec_req: execute request bit (PASID TLP).
+ *
+ * @addr: start address of the memory range to be translated.
+ *
+ * @length: length of the memory range in bytes.
+ *
+ * @no_write: request a read-only translation (if supported).
+ *
+ * @result: buffer in which the TLB entries will be stored.
+ *
+ * @result_length: result buffer length.
+ *
+ * @err_count: number of untranslated subregions.
+ *
+ * Returns: the number of translations stored in the result buffer, or
+ * -ENOMEM if the buffer is not large enough.
+ */
+ ssize_t (*ats_request_translation)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid, bool priv_req,
+ bool exec_req, hwaddr addr,
+ size_t length, bool no_write,
+ IOMMUTLBEntry *result,
+ size_t result_length,
+ uint32_t *err_count);
} PCIIOMMUOps;
AddressSpace *pci_device_iommu_address_space(PCIDevice *dev);
@@ -495,6 +569,58 @@ int pci_iommu_get_iotlb_info(PCIDevice *dev, uint8_t *addr_width,
int pci_iommu_init_iotlb_notifier(PCIDevice *dev, IOMMUNotifier *n,
IOMMUNotify fn, void *opaque);
+/**
+ * pci_ats_request_translation: perform an ATS request.
+ *
+ * Returns the number of translations stored in @result in case of success,
+ * a negative error code otherwise.
+ * -ENOMEM is returned when the result buffer is not large enough to store
+ * all the translations.
+ *
+ * @dev: the ATS-capable PCI device.
+ * @pasid: the pasid of the address space in which the translation will be done.
+ * @priv_req: privileged mode bit (PASID TLP).
+ * @exec_req: execute request bit (PASID TLP).
+ * @addr: start address of the memory range to be translated.
+ * @length: length of the memory range in bytes.
+ * @no_write: request a read-only translation (if supported).
+ * @result: buffer in which the TLB entries will be stored.
+ * @result_length: result buffer length.
+ * @err_count: number of untranslated subregions.
+ */
+ssize_t pci_ats_request_translation(PCIDevice *dev, uint32_t pasid,
+ bool priv_req, bool exec_req,
+ hwaddr addr, size_t length,
+ bool no_write, IOMMUTLBEntry *result,
+ size_t result_length,
+ uint32_t *err_count);
+
+/**
+ * pci_iommu_register_iotlb_notifier: register a notifier for changes to
+ * IOMMU translation entries in a specific address space.
+ *
+ * Returns 0 on success, or a negative errno otherwise.
+ *
+ * @dev: the device that wants to get notified.
+ * @pasid: the pasid of the address space to track.
+ * @n: the notifier to register.
+ */
+int pci_iommu_register_iotlb_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUNotifier *n);
+
+/**
+ * pci_iommu_unregister_iotlb_notifier: unregister a notifier that has been
+ * registerd with pci_iommu_register_iotlb_notifier.
+ *
+ * Returns 0 on success, or a negative errno otherwise.
+ *
+ * @dev: the device that wants to stop notifications.
+ * @pasid: the pasid of the address space to stop tracking.
+ * @n: the notifier to unregister.
+ */
+int pci_iommu_unregister_iotlb_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUNotifier *n);
+
/**
* pci_setup_iommu: Initialize specific IOMMU handlers for a PCIBus
*
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index dfa5a0259e..0c63cb4bbe 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2987,6 +2987,87 @@ void pci_device_unset_iommu_device(PCIDevice *dev)
}
}
+ssize_t pci_ats_request_translation(PCIDevice *dev, uint32_t pasid,
+ bool priv_req, bool exec_req,
+ hwaddr addr, size_t length,
+ bool no_write, IOMMUTLBEntry *result,
+ size_t result_length,
+ uint32_t *err_count)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ if (!dev->is_master ||
+ ((pasid != PCI_NO_PASID) && !pcie_pasid_enabled(dev))) {
+ return -EPERM;
+ }
+
+ if (result_length == 0) {
+ return -ENOSPC;
+ }
+
+ if (!pcie_ats_enabled(dev)) {
+ return -EPERM;
+ }
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->ats_request_translation) {
+ return iommu_bus->iommu_ops->ats_request_translation(bus,
+ iommu_bus->iommu_opaque,
+ devfn, pasid, priv_req,
+ exec_req, addr, length,
+ no_write, result,
+ result_length, err_count);
+ }
+
+ return -ENODEV;
+}
+
+int pci_iommu_register_iotlb_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUNotifier *n)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ if ((pasid != PCI_NO_PASID) && !pcie_pasid_enabled(dev)) {
+ return -EPERM;
+ }
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->register_iotlb_notifier) {
+ iommu_bus->iommu_ops->register_iotlb_notifier(bus,
+ iommu_bus->iommu_opaque, devfn,
+ pasid, n);
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
+int pci_iommu_unregister_iotlb_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUNotifier *n)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ if ((pasid != PCI_NO_PASID) && !pcie_pasid_enabled(dev)) {
+ return -EPERM;
+ }
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->unregister_iotlb_notifier) {
+ iommu_bus->iommu_ops->unregister_iotlb_notifier(bus,
+ iommu_bus->iommu_opaque,
+ devfn, pasid, n);
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
int pci_iommu_get_iotlb_info(PCIDevice *dev, uint8_t *addr_width,
uint32_t *min_page_size)
{
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 14/31] pci: Add a PCI-level API for PRI
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (12 preceding siblings ...)
2025-06-01 15:25 ` [PULL 13/31] pci: Add a pci-level API for ATS Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 15/31] uefi-test-tools:: Add LoongArch64 support Michael S. Tsirkin
` (19 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, CLEMENT MATHIEU--DRIF, Ethan Milon,
Marcel Apfelbaum
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
A device can send a PRI request to the IOMMU using pci_pri_request_page.
The PRI response is sent back using the notifier managed with
pci_pri_register_notifier and pci_pri_unregister_notifier.
Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Co-authored-by: Ethan Milon <ethan.milon@eviden.com>
Message-Id: <20250520071823.764266-12-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci.h | 130 +++++++++++++++++++++++++++++++++++++++++++
hw/pci/pci.c | 66 ++++++++++++++++++++++
2 files changed, 196 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 5d72607ed5..a6854dad2b 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -375,6 +375,28 @@ void pci_bus_get_w64_range(PCIBus *bus, Range *range);
void pci_device_deassert_intx(PCIDevice *dev);
+/* Page Request Interface */
+typedef enum {
+ IOMMU_PRI_RESP_SUCCESS,
+ IOMMU_PRI_RESP_INVALID_REQUEST,
+ IOMMU_PRI_RESP_FAILURE,
+} IOMMUPRIResponseCode;
+
+typedef struct IOMMUPRIResponse {
+ IOMMUPRIResponseCode response_code;
+ uint16_t prgi;
+} IOMMUPRIResponse;
+
+struct IOMMUPRINotifier;
+
+typedef void (*IOMMUPRINotify)(struct IOMMUPRINotifier *notifier,
+ IOMMUPRIResponse *response);
+
+typedef struct IOMMUPRINotifier {
+ IOMMUPRINotify notify;
+} IOMMUPRINotifier;
+
+#define PCI_PRI_PRGI_MASK 0x1ffU
/**
* struct PCIIOMMUOps: callbacks structure for specific IOMMU handlers
@@ -536,6 +558,72 @@ typedef struct PCIIOMMUOps {
IOMMUTLBEntry *result,
size_t result_length,
uint32_t *err_count);
+ /**
+ * @pri_register_notifier: setup the PRI completion callback.
+ *
+ * Callback required if devices are allowed to use the page request
+ * interface.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to track.
+ *
+ * @notifier: the notifier to register.
+ */
+ void (*pri_register_notifier)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid, IOMMUPRINotifier *notifier);
+ /**
+ * @pri_unregister_notifier: remove the PRI completion callback.
+ *
+ * Callback required if devices are allowed to use the page request
+ * interface.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to stop tracking.
+ */
+ void (*pri_unregister_notifier)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid);
+ /**
+ * @pri_request_page: issue a PRI request.
+ *
+ * Callback required if devices are allowed to use the page request
+ * interface.
+ *
+ * @bus: the #PCIBus of the PCI device.
+ *
+ * @opaque: the data passed to pci_setup_iommu().
+ *
+ * @devfn: device and function number of the PCI device.
+ *
+ * @pasid: the pasid of the address space to use for the request.
+ *
+ * @priv_req: privileged mode bit (PASID TLP).
+ *
+ * @exec_req: execute request bit (PASID TLP).
+ *
+ * @addr: untranslated address of the requested page.
+ *
+ * @lpig: last page in group.
+ *
+ * @prgi: page request group index.
+ *
+ * @is_read: request read access.
+ *
+ * @is_write: request write access.
+ */
+ int (*pri_request_page)(PCIBus *bus, void *opaque, int devfn,
+ uint32_t pasid, bool priv_req, bool exec_req,
+ hwaddr addr, bool lpig, uint16_t prgi, bool is_read,
+ bool is_write);
} PCIIOMMUOps;
AddressSpace *pci_device_iommu_address_space(PCIDevice *dev);
@@ -595,6 +683,48 @@ ssize_t pci_ats_request_translation(PCIDevice *dev, uint32_t pasid,
size_t result_length,
uint32_t *err_count);
+/**
+ * pci_pri_request_page: perform a PRI request.
+ *
+ * Returns 0 if the PRI request has been sent to the guest OS,
+ * an error code otherwise.
+ *
+ * @dev: the PRI-capable PCI device.
+ * @pasid: the pasid of the address space in which the translation will be done.
+ * @priv_req: privileged mode bit (PASID TLP).
+ * @exec_req: execute request bit (PASID TLP).
+ * @addr: untranslated address of the requested page.
+ * @lpig: last page in group.
+ * @prgi: page request group index.
+ * @is_read: request read access.
+ * @is_write: request write access.
+ */
+int pci_pri_request_page(PCIDevice *dev, uint32_t pasid, bool priv_req,
+ bool exec_req, hwaddr addr, bool lpig,
+ uint16_t prgi, bool is_read, bool is_write);
+
+/**
+ * pci_pri_register_notifier: register the PRI callback for a given address
+ * space.
+ *
+ * Returns 0 on success, an error code otherwise.
+ *
+ * @dev: the PRI-capable PCI device.
+ * @pasid: the pasid of the address space to track.
+ * @notifier: the notifier to register.
+ */
+int pci_pri_register_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUPRINotifier *notifier);
+
+/**
+ * pci_pri_unregister_notifier: remove the PRI callback from a given address
+ * space.
+ *
+ * @dev: the PRI-capable PCI device.
+ * @pasid: the pasid of the address space to stop tracking.
+ */
+void pci_pri_unregister_notifier(PCIDevice *dev, uint32_t pasid);
+
/**
* pci_iommu_register_iotlb_notifier: register a notifier for changes to
* IOMMU translation entries in a specific address space.
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 0c63cb4bbe..c6b5768f3a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2987,6 +2987,72 @@ void pci_device_unset_iommu_device(PCIDevice *dev)
}
}
+int pci_pri_request_page(PCIDevice *dev, uint32_t pasid, bool priv_req,
+ bool exec_req, hwaddr addr, bool lpig,
+ uint16_t prgi, bool is_read, bool is_write)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ if (!dev->is_master ||
+ ((pasid != PCI_NO_PASID) && !pcie_pasid_enabled(dev))) {
+ return -EPERM;
+ }
+
+ if (!pcie_pri_enabled(dev)) {
+ return -EPERM;
+ }
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->pri_request_page) {
+ return iommu_bus->iommu_ops->pri_request_page(bus,
+ iommu_bus->iommu_opaque,
+ devfn, pasid, priv_req,
+ exec_req, addr, lpig, prgi,
+ is_read, is_write);
+ }
+
+ return -ENODEV;
+}
+
+int pci_pri_register_notifier(PCIDevice *dev, uint32_t pasid,
+ IOMMUPRINotifier *notifier)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ if (!dev->is_master ||
+ ((pasid != PCI_NO_PASID) && !pcie_pasid_enabled(dev))) {
+ return -EPERM;
+ }
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->pri_register_notifier) {
+ iommu_bus->iommu_ops->pri_register_notifier(bus,
+ iommu_bus->iommu_opaque,
+ devfn, pasid, notifier);
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
+void pci_pri_unregister_notifier(PCIDevice *dev, uint32_t pasid)
+{
+ PCIBus *bus;
+ PCIBus *iommu_bus;
+ int devfn;
+
+ pci_device_get_iommu_bus_devfn(dev, &bus, &iommu_bus, &devfn);
+ if (iommu_bus && iommu_bus->iommu_ops->pri_unregister_notifier) {
+ iommu_bus->iommu_ops->pri_unregister_notifier(bus,
+ iommu_bus->iommu_opaque,
+ devfn, pasid);
+ }
+}
+
ssize_t pci_ats_request_translation(PCIDevice *dev, uint32_t pasid,
bool priv_req, bool exec_req,
hwaddr addr, size_t length,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 15/31] uefi-test-tools:: Add LoongArch64 support
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (13 preceding siblings ...)
2025-06-01 15:25 ` [PULL 14/31] pci: Add a PCI-level API for PRI Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 16/31] tests/data/uefi-boot-images: Add ISO image for LoongArch system Michael S. Tsirkin
` (18 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Bibo Mao, Gerd Hoffmann,
Philippe Mathieu-Daudé
From: Bibo Mao <maobibo@loongson.cn>
Add support to build bios-tables-test iso image for LoongArch system.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20250520130158.767083-2-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/uefi-test-tools/Makefile | 5 +++--
.../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +++++-
tests/uefi-test-tools/uefi-test-build.config | 10 ++++++++++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/tests/uefi-test-tools/Makefile b/tests/uefi-test-tools/Makefile
index f4eaebd8ff..8ee6fb3571 100644
--- a/tests/uefi-test-tools/Makefile
+++ b/tests/uefi-test-tools/Makefile
@@ -12,7 +12,7 @@
edk2_dir := ../../roms/edk2
images_dir := ../data/uefi-boot-images
-emulation_targets := arm aarch64 i386 x86_64 riscv64
+emulation_targets := arm aarch64 i386 x86_64 riscv64 loongarch64
uefi_binaries := bios-tables-test
intermediate_suffixes := .efi .fat .iso.raw
@@ -56,7 +56,8 @@ Build/%.iso.raw: Build/%.fat
# stripped from, the argument.
map_arm_to_uefi = $(subst arm,ARM,$(1))
map_aarch64_to_uefi = $(subst aarch64,AA64,$(call map_arm_to_uefi,$(1)))
-map_riscv64_to_uefi = $(subst riscv64,RISCV64,$(call map_aarch64_to_uefi,$(1)))
+map_loongarch64_to_uefi = $(subst loongarch64,LOONGARCH64,$(call map_aarch64_to_uefi,$(1)))
+map_riscv64_to_uefi = $(subst riscv64,RISCV64,$(call map_loongarch64_to_uefi,$(1)))
map_i386_to_uefi = $(subst i386,IA32,$(call map_riscv64_to_uefi,$(1)))
map_x86_64_to_uefi = $(subst x86_64,X64,$(call map_i386_to_uefi,$(1)))
map_to_uefi = $(subst .,,$(call map_x86_64_to_uefi,$(1)))
diff --git a/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc b/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
index 0902fd3c73..facf8df1fa 100644
--- a/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
+++ b/tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc
@@ -19,7 +19,7 @@
PLATFORM_VERSION = 0.1
PLATFORM_NAME = UefiTestTools
SKUID_IDENTIFIER = DEFAULT
- SUPPORTED_ARCHITECTURES = ARM|AARCH64|IA32|X64|RISCV64
+ SUPPORTED_ARCHITECTURES = ARM|AARCH64|IA32|X64|RISCV64|LOONGARCH64
BUILD_TARGETS = DEBUG
[BuildOptions.IA32]
@@ -65,6 +65,10 @@
[LibraryClasses.RISCV64]
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+[LibraryClasses.LOONGARCH64]
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+ StackCheckLib|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf
+
[PcdsFixedAtBuild]
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
diff --git a/tests/uefi-test-tools/uefi-test-build.config b/tests/uefi-test-tools/uefi-test-build.config
index a4c61fc97a..8bf4826634 100644
--- a/tests/uefi-test-tools/uefi-test-build.config
+++ b/tests/uefi-test-tools/uefi-test-build.config
@@ -21,6 +21,16 @@ dest = ./Build
arch = AARCH64
cpy1 = AARCH64/BiosTablesTest.efi bios-tables-test.aarch64.efi
+####################################################################################
+# loongarch64
+
+[build.loongarch64]
+conf = UefiTestToolsPkg/UefiTestToolsPkg.dsc
+plat = UefiTestTools
+dest = ./Build
+arch = LOONGARCH64
+cpy1 = LOONGARCH64/BiosTablesTest.efi bios-tables-test.loongarch64.efi
+
####################################################################################
# riscv64
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 16/31] tests/data/uefi-boot-images: Add ISO image for LoongArch system
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (14 preceding siblings ...)
2025-06-01 15:25 ` [PULL 15/31] uefi-test-tools:: Add LoongArch64 support Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 17/31] tests/qtest/bios-tables-test: Use MiB macro rather hardcode value Michael S. Tsirkin
` (17 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao, Gerd Hoffmann
From: Bibo Mao <maobibo@loongson.cn>
To test ACPI tables, edk2 needs to be booted with a disk image having
EFI partition. This image is created using UefiTestToolsPkg.
The image is generated with the following command:
make -f tests/uefi-test-tools/Makefile
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20250520130158.767083-3-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
.../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
diff --git a/tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2 b/tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
new file mode 100644
index 0000000000000000000000000000000000000000..18daee0c52fcc703a0645dbcdc598aa1f101d96b
GIT binary patch
literal 12800
zcmeHtbx<7dw(a2V0}KRrXMkYAWpEoHKnNtby9Rf64elC9fM6j&u)&=WEO>Btg3hhq
zA?H=SbL+f&{(A4$eP?}Ly?X7ncGcI_RlB;Y8Y-uF2LJ$&0RKBM{w7fa|6av;x<LJ-
z5&vR@znlLBkO2UI(|?iqH~ydEuSfK6{C^3A|FtjyXaEENA^;J9^q<a8Rb&9tf0`8k
z#{URBO?vb{jQc<0p8k#h8j^pDVE&zz|LBFkcmC0vf7kzrCm##%AM5`r{`6D+tNDM#
zpMLg#tpBU{(=YVT@_+oef94zg&A=*o%3<sNVf#NE^3VGIyTH`Vg9i*YGdnrGz>3r8
z#K|!XzV|yF;FIh^0b&XoA=BYotgafZ2BSMi(UkN`h7yJ#hcb6{A`}UM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[PULL 17/31] tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (15 preceding siblings ...)
2025-06-01 15:25 ` [PULL 16/31] tests/data/uefi-boot-images: Add ISO image for LoongArch system Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 18/31] tests/acpi: Add empty ACPI data files for LoongArch Michael S. Tsirkin
` (16 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao, Igor Mammedov, Ani Sinha
From: Bibo Mao <maobibo@loongson.cn>
Replace 1024 * 1024 with MiB macro.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130158.767083-4-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 0a333ec435..0b2bdf9d0d 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1622,7 +1622,7 @@ static void test_acpi_aarch64_virt_tcg_memhp(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 256ULL * 1024 * 1024,
+ .scan_len = 256ULL * MiB,
};
data.variant = ".memhp";
@@ -1717,7 +1717,7 @@ static void test_acpi_riscv64_virt_tcg_numamem(void)
.uefi_fl2 = "pc-bios/edk2-riscv-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.riscv64.iso.qcow2",
.ram_start = 0x80000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
data.variant = ".numamem";
@@ -1743,7 +1743,7 @@ static void test_acpi_aarch64_virt_tcg_numamem(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
data.variant = ".numamem";
@@ -1765,7 +1765,7 @@ static void test_acpi_aarch64_virt_tcg_pxb(void)
.uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
/*
* While using -cdrom, the cdrom would auto plugged into pxb-pcie,
@@ -1841,7 +1841,7 @@ static void test_acpi_aarch64_virt_tcg_acpi_hmat(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
data.variant = ".acpihmatvirt";
@@ -2095,7 +2095,7 @@ static void test_acpi_riscv64_virt_tcg(void)
.uefi_fl2 = "pc-bios/edk2-riscv-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.riscv64.iso.qcow2",
.ram_start = 0x80000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
/*
@@ -2117,7 +2117,7 @@ static void test_acpi_aarch64_virt_tcg(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
data.smbios_cpu_max_speed = 2900;
@@ -2138,7 +2138,7 @@ static void test_acpi_aarch64_virt_tcg_topology(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
test_acpi_one("-cpu cortex-a57 "
@@ -2223,7 +2223,7 @@ static void test_acpi_aarch64_virt_viot(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
test_acpi_one("-cpu cortex-a57 "
@@ -2407,7 +2407,7 @@ static void test_acpi_aarch64_virt_oem_fields(void)
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
- .scan_len = 128ULL * 1024 * 1024,
+ .scan_len = 128ULL * MiB,
};
char *args;
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 18/31] tests/acpi: Add empty ACPI data files for LoongArch
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (16 preceding siblings ...)
2025-06-01 15:25 ` [PULL 17/31] tests/qtest/bios-tables-test: Use MiB macro rather hardcode value Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 19/31] tests/qtest/bios-tables-test: Add basic testing " Michael S. Tsirkin
` (15 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao, Igor Mammedov, Ani Sinha
From: Bibo Mao <maobibo@loongson.cn>
Add empty acpi table for LoongArch virt machine, it is only empty
file and there is no data in these files.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130158.767083-5-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test-allowed-diff.h | 8 ++++++++
tests/data/acpi/loongarch64/virt/APIC | 0
tests/data/acpi/loongarch64/virt/DSDT | 0
tests/data/acpi/loongarch64/virt/FACP | 0
tests/data/acpi/loongarch64/virt/MCFG | 0
tests/data/acpi/loongarch64/virt/PPTT | 0
tests/data/acpi/loongarch64/virt/SLIT | 0
tests/data/acpi/loongarch64/virt/SPCR | 0
tests/data/acpi/loongarch64/virt/SRAT | 0
9 files changed, 8 insertions(+)
create mode 100644 tests/data/acpi/loongarch64/virt/APIC
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
create mode 100644 tests/data/acpi/loongarch64/virt/FACP
create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..bad1380eec 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,9 @@
/* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/loongarch64/virt/APIC",
+"tests/data/acpi/loongarch64/virt/DSDT",
+"tests/data/acpi/loongarch64/virt/FACP",
+"tests/data/acpi/loongarch64/virt/MCFG",
+"tests/data/acpi/loongarch64/virt/PPTT",
+"tests/data/acpi/loongarch64/virt/SLIT",
+"tests/data/acpi/loongarch64/virt/SPCR",
+"tests/data/acpi/loongarch64/virt/SRAT",
diff --git a/tests/data/acpi/loongarch64/virt/APIC b/tests/data/acpi/loongarch64/virt/APIC
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/DSDT b/tests/data/acpi/loongarch64/virt/DSDT
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/FACP b/tests/data/acpi/loongarch64/virt/FACP
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/MCFG b/tests/data/acpi/loongarch64/virt/MCFG
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/PPTT b/tests/data/acpi/loongarch64/virt/PPTT
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/SLIT b/tests/data/acpi/loongarch64/virt/SLIT
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/SPCR b/tests/data/acpi/loongarch64/virt/SPCR
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/loongarch64/virt/SRAT b/tests/data/acpi/loongarch64/virt/SRAT
new file mode 100644
index 0000000000..e69de29bb2
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 19/31] tests/qtest/bios-tables-test: Add basic testing for LoongArch
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (17 preceding siblings ...)
2025-06-01 15:25 ` [PULL 18/31] tests/acpi: Add empty ACPI data files for LoongArch Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 20/31] rebuild-expected-aml.sh: Add support " Michael S. Tsirkin
` (14 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Bibo Mao, Igor Mammedov, Ani Sinha, Fabiano Rosas,
Laurent Vivier, Paolo Bonzini
From: Bibo Mao <maobibo@loongson.cn>
Add basic ACPI table test case for LoongArch, including cpu topology,
numa memory, memory hotplug and oem-id test cases.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130158.767083-6-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test.c | 79 ++++++++++++++++++++++++++++++++++
tests/qtest/meson.build | 1 +
2 files changed, 80 insertions(+)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 0b2bdf9d0d..d057cd90db 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -2420,6 +2420,74 @@ static void test_acpi_aarch64_virt_oem_fields(void)
g_free(args);
}
+#define LOONGARCH64_INIT_TEST_DATA(data) \
+ test_data data = { \
+ .machine = "virt", \
+ .arch = "loongarch64", \
+ .tcg_only = true, \
+ .uefi_fl1 = "pc-bios/edk2-loongarch64-code.fd", \
+ .uefi_fl2 = "pc-bios/edk2-loongarch64-vars.fd", \
+ .cd = "tests/data/uefi-boot-images/" \
+ "bios-tables-test.loongarch64.iso.qcow2", \
+ .ram_start = 0, \
+ .scan_len = 128ULL * MiB, \
+ }
+
+static void test_acpi_loongarch64_virt(void)
+{
+ LOONGARCH64_INIT_TEST_DATA(data);
+
+ test_acpi_one("-cpu la464 ", &data);
+ free_test_data(&data);
+}
+
+static void test_acpi_loongarch64_virt_topology(void)
+{
+ LOONGARCH64_INIT_TEST_DATA(data);
+
+ data.variant = ".topology";
+ test_acpi_one("-cpu la464 -smp sockets=1,cores=4,threads=2", &data);
+ free_test_data(&data);
+}
+
+static void test_acpi_loongarch64_virt_numamem(void)
+{
+ LOONGARCH64_INIT_TEST_DATA(data);
+
+ data.variant = ".numamem";
+ test_acpi_one(" -cpu la464 -m 128"
+ " -object memory-backend-ram,id=ram0,size=64M"
+ " -object memory-backend-ram,id=ram1,size=64M"
+ " -numa node,memdev=ram0 -numa node,memdev=ram1"
+ " -numa dist,src=0,dst=1,val=21",
+ &data);
+ free_test_data(&data);
+}
+
+static void test_acpi_loongarch64_virt_memhp(void)
+{
+ LOONGARCH64_INIT_TEST_DATA(data);
+
+ data.variant = ".memhp";
+ test_acpi_one(" -cpu la464 -m 128,slots=2,maxmem=256M"
+ " -object memory-backend-ram,id=ram0,size=128M",
+ &data);
+ free_test_data(&data);
+}
+
+static void test_acpi_loongarch64_virt_oem_fields(void)
+{
+ LOONGARCH64_INIT_TEST_DATA(data);
+ char *args;
+
+ args = test_acpi_create_args(&data, "-cpu la464 "OEM_TEST_ARGS);
+ data.qts = qtest_init(args);
+ test_acpi_load_tables(&data);
+ test_oem_fields(&data);
+ qtest_quit(data.qts);
+ free_test_data(&data);
+ g_free(args);
+}
int main(int argc, char *argv[])
{
@@ -2593,6 +2661,17 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/virt/numamem",
test_acpi_riscv64_virt_tcg_numamem);
}
+ } else if (strcmp(arch, "loongarch64") == 0) {
+ if (has_tcg) {
+ qtest_add_func("acpi/virt", test_acpi_loongarch64_virt);
+ qtest_add_func("acpi/virt/topology",
+ test_acpi_loongarch64_virt_topology);
+ qtest_add_func("acpi/virt/numamem",
+ test_acpi_loongarch64_virt_numamem);
+ qtest_add_func("acpi/virt/memhp", test_acpi_loongarch64_virt_memhp);
+ qtest_add_func("acpi/virt/oem-fields",
+ test_acpi_loongarch64_virt_oem_fields);
+ }
}
ret = g_test_run();
boot_sector_cleanup(disk);
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 43e5a86699..395ccc0d4c 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -148,6 +148,7 @@ qtests_hppa = \
qtests_loongarch64 = qtests_filter + \
(config_all_devices.has_key('CONFIG_LOONGARCH_VIRT') ? ['numa-test'] : []) + \
+ (unpack_edk2_blobs ? ['bios-tables-test'] : []) + \
['boot-serial-test',
'cpu-plug-test']
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 20/31] rebuild-expected-aml.sh: Add support for LoongArch
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (18 preceding siblings ...)
2025-06-01 15:25 ` [PULL 19/31] tests/qtest/bios-tables-test: Add basic testing " Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 21/31] tests/acpi: Fill acpi table data " Michael S. Tsirkin
` (13 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao, Igor Mammedov, Ani Sinha
From: Bibo Mao <maobibo@loongson.cn>
Update the list of supported architectures to include LoongArch.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130158.767083-7-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/data/acpi/rebuild-expected-aml.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
index c1092fb8ba..cbf9ffe0dd 100755
--- a/tests/data/acpi/rebuild-expected-aml.sh
+++ b/tests/data/acpi/rebuild-expected-aml.sh
@@ -12,7 +12,7 @@
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
-qemu_arches="x86_64 aarch64 riscv64"
+qemu_arches="x86_64 aarch64 riscv64 loongarch64"
if [ ! -e "tests/qtest/bios-tables-test" ]; then
echo "Test: bios-tables-test is required! Run make check before this script."
@@ -37,7 +37,7 @@ if [ -z "$qemu_bins" ]; then
echo "Only the following architectures are currently supported: $qemu_arches"
echo "None of these configured!"
echo "To fix, run configure \
- --target-list=x86_64-softmmu,aarch64-softmmu,riscv64-softmmu"
+ --target-list=x86_64-softmmu,aarch64-softmmu,riscv64-softmmu,loongarch64-softmmu"
exit 1;
fi
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 21/31] tests/acpi: Fill acpi table data for LoongArch
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (19 preceding siblings ...)
2025-06-01 15:25 ` [PULL 20/31] rebuild-expected-aml.sh: Add support " Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 22/31] tests/acpi: Remove stale allowed tables Michael S. Tsirkin
` (12 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao
From: Bibo Mao <maobibo@loongson.cn>
The acpi table data is filled for LoongArch virt machine with the
following command:
tests/data/acpi/rebuild-expected-aml.sh
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130806.767181-1-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
16 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
diff --git a/tests/data/acpi/loongarch64/virt/APIC b/tests/data/acpi/loongarch64/virt/APIC
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3477789f422cad54f16734b3ec9ad1ff5135165d 100644
GIT binary patch
literal 108
zcmZ<^@N~{$U|?YU>g4b25v<@85#X$#prF9Wz`y`vgJ=){(SrOi9+)e_%gD^||35@t
fRG5*0;e$Si<G{ecaDah<K}-;&TmURD01^fOGLQ@b
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/APIC.topology b/tests/data/acpi/loongarch64/virt/APIC.topology
new file mode 100644
index 0000000000000000000000000000000000000000..e14bbf758464b146665bb0e46d193fe2b57b5db6
GIT binary patch
literal 213
zcmXwzu?@mN3`L&_kSa<}kksCQ6-cguibym}z?>|RJ=h@82cM-U``N$nIN$RE*n4{9
z+ta7loZa0G(5$XfPi?WH@<M8D2Z#t)fC$|KBJ===&?6v1Yd}cPja97c|B?P=@V!W`
Ozy}zTQ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Ty4?rpZv%EVT-JG|15Ph?Fjne4*y*{fv(t59^YO(;n;Y&Q
zhQdwg;*@on+qFwaU6aDqn%2%H>fd>^*+adtQV;b!{sZDx<I2wF(YjY8v1+yDW9oi%
zc@Q(Ap}SkJ6v*YVXau|5hz9gZ`-lU3e>s6GHTo9N-VTmQitJeJigbue7$m1rY3I{i
z!q*7?yP;&ARjZvw0Jy$&Ls5gV@TG#QDV%bAWUy`T&*Hn_<*8d}A{fZtFD=%?_glT$
xTGh1Dh0$3JUqiv;4FGchz;**kaI~e8;J=!el6hZ}%U#8@;032Jp5RFU_&)^=Bs~BC
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/DSDT.memhp b/tests/data/acpi/loongarch64/virt/DSDT.memhp
new file mode 100644
index 0000000000000000000000000000000000000000..f19eae7d00f9c0eefc9e92de2c8a24863bf309d6
GIT binary patch
literal 5862
zcmcJT-)|dP701uDon$<A9NU@ZN1HYSi`Z&WVVrEctW=~rcP6pZxy~@-Hi4-$Zd@-(
zv$R9ntOyk%4N`YE;(@M}l@Kr9;{6{GLfVyh;%(nR@X+M}9(YH*VRYt)<C8=IX~7T4
zz2}~D?)P)<o$Kq-9lidy2>|x%g%w_L)P*&RtE#Fp0Khi>&vV&x7Cd+VW}2@EP4X&L
zeblO1+EuLtl6R}BgXD2uW|GHkr*K_<^WbX$Squ$6pR><rvGFny{_lSxkN1Zm%@zP)
z7bH)2^x}M?FfQknKlc9gn+HD=2hV@|%TJbn#fmemIGxDCU;Z&P+I;(AbL+}m+pPyb
z*l9gz?jF-vIz=O@J40in?Pc-|jr<F0)T26@SjV|jG|GvyMMmOYrp^$l|1U+(pC&SS
zw#Z1_%b_zw8edGLyI)P2nl`W%xwhEfik9sZa&qSVVPMRPCc=$LZOX9c*ba+Q4eXeH
zDkhOs-##T(XzQn1MpXj~+fRiHJ1EOOC0A&pxd!Tglq*SdIj7_bZT(yeZHre2s#Vs$
ziH~gb7?-tqkUYm&0?AugsP*gU)a}Bo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m4!FGNU@V(0*lGE!vD5Tn{l)de^}GI0gTQrY;*vF)-*ihSRg=P1
zYtGI(#=m*E-okie*^J}m<bMdZ#qFK-lXWjke8s6}PpSLK?LowFq5GT13gpX)K?}Ov
zA2jIY`UwT@el3MNHT?b#FEQF1(OVuRizkiL#VrhyC(89gMwajvgfC~69G){71b~gr
z`%-WUDe)I^d<}^g9v__WS~86nmvBCOPs}wQP3P{H7R~sQX4dQ#O)FiE#=^T=bR_|R
k8316rQAqTDj)p`poR2~-h9UX<9ekm6)hmvq<RJj~H(1$&OaK4?
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/DSDT.numamem b/tests/data/acpi/loongarch64/virt/DSDT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..9b462869cd4911714e7c2a22025c465afa2a7d52
GIT binary patch
literal 4647
zcmb`L&u<&Y702K3hqN3nDUw?2hb@^K<lq8DlBEbYG2jL!XIBy>lG<=7E6o~MN;Ff;
z3ha$-6;O<#vI01^&_iv)z4XGm%0CeVNPwJj%PmEFaC+#a_oBxw9(R}CX9-Gyl!xWc
z<9y$IKW}CiGt@1;eW3ur-mR{QWlOETZwggaRR#cfkKZ}L9joft2dgQu*3cwpxu$2#
zrm0=jN+3DwH60{JhzgS&(X#TF`K8031IQ>Hetuv-6!GRo%>N#Jf*y~@AjPTxum_T(
zTY8}!%TMy0@>lO~U)=hA<M7FsfBI_WFRU=f3bQd8{_*c*ru)(D?#>$@-s#=?c(-?}
zyZ4I6(g_~X-6<XeZ!hAfcoaX;qaM_;j&)o(!6T2IZZa_UB5{gI{r_pQe3Hrd=_Uhn
zFOsL2G=7>%`=FMnYg%L}3T<(;6wQ{E&+_!+F<{IL2Ev6&W6GFgwJa8-imaGXDkhOs
z@12m!kBw5TpsUElj#A;oMs2lD$mPdqu1Nh~=8Dr?)(N@%*eF-EZ;D!^S{3abd}M>i
zxT2Loax7yBB&S+!j_PQ&TlpfNGeJNNdZ2;^D(KLI-@rC>p$9N}?#)(v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pNoCX5vgFN+M~LNs*Aeo(-kae+{v3cb=+?Sth7-<>em
zeRpBSG=H;+W|K-@v=@IB8}R-OcqlYY+g6s7!fIDi_Ui#Q(xGe5b8kdLmQi=1Gnnc}
zgXq-d6CL{kiPl$-I!Ysf&i}W>EGjovv}5^{rD>cC=>(gSXc`-Zm?sHirCx}6E_7XX
z{kbvOzs_8^?y`;xn=bU8FY-V1JM3APxzKUD(GiDi(ST^^gUM&nh+b)TKObbD^f$TJ
z?{Uv%*FSe(?J!VDb#MyZ?j!WK3A>vv>%7tdrx!aIEA<}i_FUH4?Ygk_{PMG{P50BG
za0|LPWnJcW?b31Aq;R#SwY!D-OV74?s5e&Xp`OQoMBHjz-Q7A~_lhLethRhY-H$I1
zVn#G{cl(tBxjYt)V3(WGfL>`Ib6_7d6Sz{NZvpM?;FzSyj@7P6N4SJRavGI(KFuY3
zjo`l<O4eDk+GzxU8{0P}$9%s5iW-cFuNGWW;l$&EgKhg@7T*Xj&)z~4!Ep9LX|W!@
z<?7AWnx>U5j!ta&G727Y0GI;+wiif(11^;W|Jb~g%=?mD?i!v5FFJ+s1Wy9Me*tZa
BB|QKD
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/DSDT.topology b/tests/data/acpi/loongarch64/virt/DSDT.topology
new file mode 100644
index 0000000000000000000000000000000000000000..8bbcd7dabc8b66f5e921807adca01bcc6a11c835
GIT binary patch
literal 5352
zcmb`L-*4O2701sdDT%uJVM%8EBe7!@duV~78)enW3UolEOWKwr*_tTF+Zc?p6?Jx8
zBwSJt@QPuM2V||WhowUH(ibgr|A}Eh3-oDkecP};q<t7L^nKW)h9i;^k1TitIz3SL
z9^Lc3-_Ow{c}c@En*Y=Q*iLy%tXui=59=bI&*vEcU>m<Pf;(2(u}^Qu#a2yMo%M>5
zs&Cfy6}<qevt2Pjb%ZD})e#LV`xbxm?AriIOdWi_WM3{}<E7+%4?q5h526rfWdJw^
z)iEq1SCq2TJfr=s|Mx#V_-*a%*`G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O
zuySnw;J%jkS2x}p@d6fHWbn$5efxACZ)x7l_@+?k!e83<X<@Y*+@`CWjV)a-tPEc{
q;N8@}O98+F0I*{}#b4hv#ed~EN?G($GMT&hN@K;z#S|U^fd2pyQ@K3=
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/FACP b/tests/data/acpi/loongarch64/virt/FACP
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..04d8d4c26fa2be24af40cd7a72959ec6b12790e5 100644
GIT binary patch
literal 268
zcmZ>BbPnKQWME+Ra`Jcf2v%^42yj+VP*7lGU|;~TK{QnXivR-y2Lpo~1D^oMTqmj;
RP9)%9V32{@4`Rzg*#Io}2LS*8
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/MCFG b/tests/data/acpi/loongarch64/virt/MCFG
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5f93b05abe1669fe4239edbba8aaf4fe666f5b95 100644
GIT binary patch
literal 60
tcmeZuc5}C3U|?XJ<K*w`5v<@85#X$#prF9Wz`y`vgJ>k60A<&MXaFUp2LS*8
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/PPTT b/tests/data/acpi/loongarch64/virt/PPTT
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7a1258ecf123555b24462c98ccbb76b4ac1d0c2b 100644
GIT binary patch
literal 76
zcmWFt2nq3FU|?Wc;pFe^5v<@85#X$#prF9Wz`y`vgJ=d31_m&V3`7_hxEL51RFK2~
DqXGv3
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/PPTT.topology b/tests/data/acpi/loongarch64/virt/PPTT.topology
new file mode 100644
index 0000000000000000000000000000000000000000..4017e2927c15c08c7e1a7e4d7eb10f416b63d69e
GIT binary patch
literal 296
zcmZ{dyA6Oa3`8IQjw%DVpkM@Q($EnJ3U;7nFa~1?WFW{w!p+%Fcjpl1xlJHl`_T`R
z^h@v}A_<_oDh@8S<L;yRuo~!o*xO;UmT7ha(wKL=EHg|;|9*WtkQ<-&DJu+%S=*<+
L11OCzvg%<cc6to~
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SLIT.numamem b/tests/data/acpi/loongarch64/virt/SLIT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..67f00813af7b2356fe74eed943ab8dcf2291578b
GIT binary patch
literal 48
ucmWIc@eDCwU|?W;;pFe^5v<@85#X$#prF9Wz`y`vgJ>oO2;dSG<pKcYv<CqI
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SPCR b/tests/data/acpi/loongarch64/virt/SPCR
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3cc9bbcfb8051e632592d9db0fe3dba0af53ed8d 100644
GIT binary patch
literal 80
zcmXYnu@QhU48&w87=xe1Zs_olhIQE_o0v;L&Fk;fGOh%c$Im#L{LYXh1BQ>C2<z7O
O?>MkwuvS(5#pDG+#ti`g
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SRAT b/tests/data/acpi/loongarch64/virt/SRAT
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ff234ce45cbdd32f57fc0668aba135992e5ca887 100644
GIT binary patch
literal 104
zcmWFzatz5}U|?We=j89~5v<@85#X$#prF9Wz`y`vgJ=+j0|8V%qXt|C1~_00WPJc=
C#|Hrb
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SRAT.memhp b/tests/data/acpi/loongarch64/virt/SRAT.memhp
new file mode 100644
index 0000000000000000000000000000000000000000..525321890138de509ceaf9723f0a4565048e823f
GIT binary patch
literal 144
zcmWFzatxWkz`(%h<>c?|5v<@85#X$#prF9Wz`y`vgJ=+j0|8V%qXt|C1~_00WPM2L
PVDd1Uff=TOfq?-4Y8D3p
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SRAT.numamem b/tests/data/acpi/loongarch64/virt/SRAT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..2972a9abdcface5b943078d61b4946da80176ea2
GIT binary patch
literal 144
zcmWFzatxWkz`(#5?&R<65v<@85#X$#prF9Wz`y`vgJ=+j0|8V%qXt|C23TMWWPOYp
Ma2`w^Mx&?$0B=JF0RR91
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/loongarch64/virt/SRAT.topology b/tests/data/acpi/loongarch64/virt/SRAT.topology
new file mode 100644
index 0000000000000000000000000000000000000000..75e0703ae0d3348919e2b583d1b4f4b8bb3ef65d
GIT binary patch
literal 216
zcmWFzatyh_z`($`+R5M9BUr&HBEVTeK|z6$fq?<U2GJl42Lc#;Ml^XQG(IyLp9PK2
XipFO{<Fh0488zT8fdLK}16dsa_U{M*
literal 0
HcmV?d00001
--
MST
^ permalink raw reply [flat|nested] 41+ messages in thread
* [PULL 22/31] tests/acpi: Remove stale allowed tables
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (20 preceding siblings ...)
2025-06-01 15:25 ` [PULL 21/31] tests/acpi: Fill acpi table data " Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 23/31] vhost: Don't set vring call if guest notifier is unused Michael S. Tsirkin
` (11 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Bibo Mao, Igor Mammedov, Ani Sinha
From: Bibo Mao <maobibo@loongson.cn>
Remove stale allowed tables for LoongArch virt machine.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250520130806.767181-2-maobibo@loongson.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test-allowed-diff.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index bad1380eec..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,9 +1 @@
/* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/loongarch64/virt/APIC",
-"tests/data/acpi/loongarch64/virt/DSDT",
-"tests/data/acpi/loongarch64/virt/FACP",
-"tests/data/acpi/loongarch64/virt/MCFG",
-"tests/data/acpi/loongarch64/virt/PPTT",
-"tests/data/acpi/loongarch64/virt/SLIT",
-"tests/data/acpi/loongarch64/virt/SPCR",
-"tests/data/acpi/loongarch64/virt/SRAT",
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 23/31] vhost: Don't set vring call if guest notifier is unused
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (21 preceding siblings ...)
2025-06-01 15:25 ` [PULL 22/31] tests/acpi: Remove stale allowed tables Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 24/31] vdpa: check for iova tree initialized at net_client_start Michael S. Tsirkin
` (10 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Huaitong Han, Zhiyuan Yuan, Jidong Xia,
Marcel Apfelbaum
From: Huaitong Han <hanht2@chinatelecom.cn>
The vring call fd is set even when the guest does not use MSI-X (e.g., in the
case of virtio PMD), leading to unnecessary CPU overhead for processing
interrupts.
The commit 96a3d98d2c("vhost: don't set vring call if no vector") optimized the
case where MSI-X is enabled but the queue vector is unset. However, there's an
additional case where the guest uses INTx and the INTx_DISABLED bit in the PCI
config is set, meaning that no interrupt notifier will actually be used.
In such cases, the vring call fd should also be cleared to avoid redundant
interrupt handling.
Fixes: 96a3d98d2c("vhost: don't set vring call if no vector")
Reported-by: Zhiyuan Yuan <yuanzhiyuan@chinatelecom.cn>
Signed-off-by: Jidong Xia <xiajd@chinatelecom.cn>
Signed-off-by: Huaitong Han <hanht2@chinatelecom.cn>
Message-Id: <20250522100548.212740-1-hanht2@chinatelecom.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pci.h | 1 +
hw/pci/pci.c | 2 +-
hw/virtio/virtio-pci.c | 7 ++++++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index a6854dad2b..35d59d7672 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -983,6 +983,7 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev);
qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
void pci_set_irq(PCIDevice *pci_dev, int level);
+int pci_irq_disabled(PCIDevice *d);
static inline void pci_irq_assert(PCIDevice *pci_dev)
{
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index c6b5768f3a..9b4bf48439 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1730,7 +1730,7 @@ static void pci_update_mappings(PCIDevice *d)
pci_update_vga(d);
}
-static inline int pci_irq_disabled(PCIDevice *d)
+int pci_irq_disabled(PCIDevice *d)
{
return pci_get_word(d->config + PCI_COMMAND) & PCI_COMMAND_INTX_DISABLE;
}
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 9b48aa8c3e..7e309d1d49 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1215,7 +1215,12 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
static bool virtio_pci_query_guest_notifiers(DeviceState *d)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
- return msix_enabled(&proxy->pci_dev);
+
+ if (msix_enabled(&proxy->pci_dev)) {
+ return true;
+ } else {
+ return pci_irq_disabled(&proxy->pci_dev);
+ }
}
static int virtio_pci_set_guest_notifiers(DeviceState *d, int nvqs, bool assign)
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 24/31] vdpa: check for iova tree initialized at net_client_start
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (22 preceding siblings ...)
2025-06-01 15:25 ` [PULL 23/31] vhost: Don't set vring call if guest notifier is unused Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 25/31] vdpa: reorder vhost_vdpa_set_backend_cap Michael S. Tsirkin
` (9 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer
From: Eugenio Pérez <eperezma@redhat.com>
To map the guest memory while it is migrating we need to create the
iova_tree, as long as the destination uses x-svq=on. Checking to not
override it.
The function vhost_vdpa_net_client_stop clear it if the device is
stopped. If the guest starts the device again, the iova tree is
recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start
if needed, so old behavior is kept.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-2-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
net/vhost-vdpa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 7ca8b46eee..decb826868 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -366,7 +366,9 @@ static void vhost_vdpa_net_data_start_first(VhostVDPAState *s)
migration_add_notifier(&s->migration_state,
vdpa_net_migration_state_notifier);
- if (v->shadow_vqs_enabled) {
+
+ /* iova_tree may be initialized by vhost_vdpa_net_load_setup */
+ if (v->shadow_vqs_enabled && !v->shared->iova_tree) {
v->shared->iova_tree = vhost_iova_tree_new(v->shared->iova_range.first,
v->shared->iova_range.last);
}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 25/31] vdpa: reorder vhost_vdpa_set_backend_cap
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (23 preceding siblings ...)
2025-06-01 15:25 ` [PULL 24/31] vdpa: check for iova tree initialized at net_client_start Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 26/31] vdpa: set backend capabilities at vhost_vdpa_init Michael S. Tsirkin
` (8 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
It will be used directly by vhost_vdpa_init.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-3-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 60 +++++++++++++++++++++---------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 1ab2c11fa8..6b242ca56a 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -594,6 +594,36 @@ static void vhost_vdpa_init_svq(struct vhost_dev *hdev, struct vhost_vdpa *v)
v->shadow_vqs = g_steal_pointer(&shadow_vqs);
}
+static int vhost_vdpa_set_backend_cap(struct vhost_dev *dev)
+{
+ struct vhost_vdpa *v = dev->opaque;
+
+ uint64_t features;
+ uint64_t f = 0x1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2 |
+ 0x1ULL << VHOST_BACKEND_F_IOTLB_BATCH |
+ 0x1ULL << VHOST_BACKEND_F_IOTLB_ASID |
+ 0x1ULL << VHOST_BACKEND_F_SUSPEND;
+ int r;
+
+ if (vhost_vdpa_call(dev, VHOST_GET_BACKEND_FEATURES, &features)) {
+ return -EFAULT;
+ }
+
+ features &= f;
+
+ if (vhost_vdpa_first_dev(dev)) {
+ r = vhost_vdpa_call(dev, VHOST_SET_BACKEND_FEATURES, &features);
+ if (r) {
+ return -EFAULT;
+ }
+ }
+
+ dev->backend_cap = features;
+ v->shared->backend_cap = features;
+
+ return 0;
+}
+
static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
{
struct vhost_vdpa *v = opaque;
@@ -841,36 +871,6 @@ static int vhost_vdpa_set_features(struct vhost_dev *dev,
return vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);
}
-static int vhost_vdpa_set_backend_cap(struct vhost_dev *dev)
-{
- struct vhost_vdpa *v = dev->opaque;
-
- uint64_t features;
- uint64_t f = 0x1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2 |
- 0x1ULL << VHOST_BACKEND_F_IOTLB_BATCH |
- 0x1ULL << VHOST_BACKEND_F_IOTLB_ASID |
- 0x1ULL << VHOST_BACKEND_F_SUSPEND;
- int r;
-
- if (vhost_vdpa_call(dev, VHOST_GET_BACKEND_FEATURES, &features)) {
- return -EFAULT;
- }
-
- features &= f;
-
- if (vhost_vdpa_first_dev(dev)) {
- r = vhost_vdpa_call(dev, VHOST_SET_BACKEND_FEATURES, &features);
- if (r) {
- return -EFAULT;
- }
- }
-
- dev->backend_cap = features;
- v->shared->backend_cap = features;
-
- return 0;
-}
-
static int vhost_vdpa_get_device_id(struct vhost_dev *dev,
uint32_t *device_id)
{
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 26/31] vdpa: set backend capabilities at vhost_vdpa_init
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (24 preceding siblings ...)
2025-06-01 15:25 ` [PULL 25/31] vdpa: reorder vhost_vdpa_set_backend_cap Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 27/31] vdpa: add listener_registered Michael S. Tsirkin
` (7 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
The backend does not reset them until the vdpa file descriptor is closed
so there is no harm in doing it only once.
This allows the destination of a live migration to premap memory in
batches, using VHOST_BACKEND_F_IOTLB_BATCH.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-4-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 6b242ca56a..e9826ede2c 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -634,6 +634,12 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
v->dev = dev;
dev->opaque = opaque ;
v->shared->listener = vhost_vdpa_memory_listener;
+
+ ret = vhost_vdpa_set_backend_cap(dev);
+ if (unlikely(ret != 0)) {
+ return ret;
+ }
+
vhost_vdpa_init_svq(dev, v);
error_propagate(&dev->migration_blocker, v->migration_blocker);
@@ -1563,7 +1569,6 @@ const VhostOps vdpa_ops = {
.vhost_set_vring_kick = vhost_vdpa_set_vring_kick,
.vhost_set_vring_call = vhost_vdpa_set_vring_call,
.vhost_get_features = vhost_vdpa_get_features,
- .vhost_set_backend_cap = vhost_vdpa_set_backend_cap,
.vhost_set_owner = vhost_vdpa_set_owner,
.vhost_set_vring_endian = NULL,
.vhost_backend_memslots_limit = vhost_vdpa_memslots_limit,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 27/31] vdpa: add listener_registered
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (25 preceding siblings ...)
2025-06-01 15:25 ` [PULL 26/31] vdpa: set backend capabilities at vhost_vdpa_init Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 28/31] vdpa: reorder listener assignment Michael S. Tsirkin
` (6 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
Check if the listener has been registered or not, so it needs to be
registered again at start.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-5-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/vhost-vdpa.h | 6 ++++++
hw/virtio/vhost-vdpa.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 0a9575b469..221840987e 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -51,6 +51,12 @@ typedef struct vhost_vdpa_shared {
bool iotlb_batch_begin_sent;
+ /*
+ * The memory listener has been registered, so DMA maps have been sent to
+ * the device.
+ */
+ bool listener_registered;
+
/* Vdpa must send shadow addresses as IOTLB key for data queues, not GPA */
bool shadow_data;
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index e9826ede2c..450f68f117 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1379,7 +1379,10 @@ static int vhost_vdpa_dev_start(struct vhost_dev *dev, bool started)
"IOMMU and try again");
return -1;
}
- memory_listener_register(&v->shared->listener, dev->vdev->dma_as);
+ if (!v->shared->listener_registered) {
+ memory_listener_register(&v->shared->listener, dev->vdev->dma_as);
+ v->shared->listener_registered = true;
+ }
return vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
}
@@ -1399,6 +1402,8 @@ static void vhost_vdpa_reset_status(struct vhost_dev *dev)
vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE |
VIRTIO_CONFIG_S_DRIVER);
memory_listener_unregister(&v->shared->listener);
+ v->shared->listener_registered = false;
+
}
static int vhost_vdpa_set_log_base(struct vhost_dev *dev, uint64_t base,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 28/31] vdpa: reorder listener assignment
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (26 preceding siblings ...)
2025-06-01 15:25 ` [PULL 27/31] vdpa: add listener_registered Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 29/31] vdpa: move iova_tree allocation to net_vhost_vdpa_init Michael S. Tsirkin
` (5 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
Since commit f6fe3e333f ("vdpa: move memory listener to
vhost_vdpa_shared") this piece of code repeatedly assign
shared->listener members. This was not a problem as it was not used
until device start.
However next patches move the listener registration to this
vhost_vdpa_init function. When the listener is registered it is added
to an embedded linked list, so setting its members again will cause
memory corruption to the linked list node.
Do the right thing and only set it in the first vdpa device.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-6-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 450f68f117..de834f2ebd 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -633,7 +633,6 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
v->dev = dev;
dev->opaque = opaque ;
- v->shared->listener = vhost_vdpa_memory_listener;
ret = vhost_vdpa_set_backend_cap(dev);
if (unlikely(ret != 0)) {
@@ -675,6 +674,7 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE |
VIRTIO_CONFIG_S_DRIVER);
+ v->shared->listener = vhost_vdpa_memory_listener;
return 0;
}
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 29/31] vdpa: move iova_tree allocation to net_vhost_vdpa_init
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (27 preceding siblings ...)
2025-06-01 15:25 ` [PULL 28/31] vdpa: reorder listener assignment Michael S. Tsirkin
@ 2025-06-01 15:25 ` Michael S. Tsirkin
2025-06-01 15:26 ` [PULL 30/31] vdpa: move memory listener register to vhost_vdpa_init Michael S. Tsirkin
` (4 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
As we are moving to keep the mapping through all the vdpa device life
instead of resetting it at VirtIO reset, we need to move all its
dependencies to the initialization too. In particular devices with
x-svq=on need a valid iova_tree from the beginning.
Simplify the code also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Suggested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-7-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/vhost-vdpa.h | 16 ++++++++++++++-
net/vhost-vdpa.c | 36 +++-------------------------------
2 files changed, 18 insertions(+), 34 deletions(-)
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 221840987e..449bf5c840 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -43,7 +43,21 @@ typedef struct vhost_vdpa_shared {
struct vhost_vdpa_iova_range iova_range;
QLIST_HEAD(, vdpa_iommu) iommu_list;
- /* IOVA mapping used by the Shadow Virtqueue */
+ /*
+ * IOVA mapping used by the Shadow Virtqueue
+ *
+ * It is shared among all ASID for simplicity, whether CVQ shares ASID with
+ * guest or not:
+ * - Memory listener need access to guest's memory addresses allocated in
+ * the IOVA tree.
+ * - There should be plenty of IOVA address space for both ASID not to
+ * worry about collisions between them. Guest's translations are still
+ * validated with virtio virtqueue_pop so there is no risk for the guest
+ * to access memory that it shouldn't.
+ *
+ * To allocate a iova tree per ASID is doable but it complicates the code
+ * and it is not worth it for the moment.
+ */
VhostIOVATree *iova_tree;
/* Copy of backend features */
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index decb826868..58d738945d 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -235,6 +235,7 @@ static void vhost_vdpa_cleanup(NetClientState *nc)
return;
}
qemu_close(s->vhost_vdpa.shared->device_fd);
+ g_clear_pointer(&s->vhost_vdpa.shared->iova_tree, vhost_iova_tree_delete);
g_free(s->vhost_vdpa.shared);
}
@@ -362,16 +363,8 @@ static int vdpa_net_migration_state_notifier(NotifierWithReturn *notifier,
static void vhost_vdpa_net_data_start_first(VhostVDPAState *s)
{
- struct vhost_vdpa *v = &s->vhost_vdpa;
-
migration_add_notifier(&s->migration_state,
vdpa_net_migration_state_notifier);
-
- /* iova_tree may be initialized by vhost_vdpa_net_load_setup */
- if (v->shadow_vqs_enabled && !v->shared->iova_tree) {
- v->shared->iova_tree = vhost_iova_tree_new(v->shared->iova_range.first,
- v->shared->iova_range.last);
- }
}
static int vhost_vdpa_net_data_start(NetClientState *nc)
@@ -418,19 +411,12 @@ static int vhost_vdpa_net_data_load(NetClientState *nc)
static void vhost_vdpa_net_client_stop(NetClientState *nc)
{
VhostVDPAState *s = DO_UPCAST(VhostVDPAState, nc, nc);
- struct vhost_dev *dev;
assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_VDPA);
if (s->vhost_vdpa.index == 0) {
migration_remove_notifier(&s->migration_state);
}
-
- dev = s->vhost_vdpa.dev;
- if (dev->vq_index + dev->nvqs == dev->vq_index_end) {
- g_clear_pointer(&s->vhost_vdpa.shared->iova_tree,
- vhost_iova_tree_delete);
- }
}
static NetClientInfo net_vhost_vdpa_info = {
@@ -602,24 +588,6 @@ out:
return 0;
}
- /*
- * If other vhost_vdpa already have an iova_tree, reuse it for simplicity,
- * whether CVQ shares ASID with guest or not, because:
- * - Memory listener need access to guest's memory addresses allocated in
- * the IOVA tree.
- * - There should be plenty of IOVA address space for both ASID not to
- * worry about collisions between them. Guest's translations are still
- * validated with virtio virtqueue_pop so there is no risk for the guest
- * to access memory that it shouldn't.
- *
- * To allocate a iova tree per ASID is doable but it complicates the code
- * and it is not worth it for the moment.
- */
- if (!v->shared->iova_tree) {
- v->shared->iova_tree = vhost_iova_tree_new(v->shared->iova_range.first,
- v->shared->iova_range.last);
- }
-
r = vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer,
vhost_vdpa_net_cvq_cmd_page_len(), false);
if (unlikely(r < 0)) {
@@ -1728,6 +1696,8 @@ static NetClientState *net_vhost_vdpa_init(NetClientState *peer,
s->vhost_vdpa.shared->device_fd = vdpa_device_fd;
s->vhost_vdpa.shared->iova_range = iova_range;
s->vhost_vdpa.shared->shadow_data = svq;
+ s->vhost_vdpa.shared->iova_tree = vhost_iova_tree_new(iova_range.first,
+ iova_range.last);
} else if (!is_datapath) {
s->cvq_cmd_out_buffer = mmap(NULL, vhost_vdpa_net_cvq_cmd_page_len(),
PROT_READ | PROT_WRITE,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 30/31] vdpa: move memory listener register to vhost_vdpa_init
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (28 preceding siblings ...)
2025-06-01 15:25 ` [PULL 29/31] vdpa: move iova_tree allocation to net_vhost_vdpa_init Michael S. Tsirkin
@ 2025-06-01 15:26 ` Michael S. Tsirkin
2025-06-01 15:26 ` [PULL 31/31] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine Michael S. Tsirkin
` (3 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:26 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Eugenio Pérez, Lei Yang, Si-Wei Liu,
Jason Wang, Jonah Palmer, Stefano Garzarella
From: Eugenio Pérez <eperezma@redhat.com>
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the workload is resumed at the destination. This is a
period where neigher traffic can flow, nor the VM workload can continue
(downtime).
We can do better as we know the memory layout of the guest RAM at the
destination from the moment that all devices are initializaed. So
moving that operation allows QEMU to communicate the kernel the maps
while the workload is still running in the source, so Linux can start
mapping them.
As a small drawback, there is a time in the initialization where QEMU
cannot respond to QMP etc. By some testing, this time is about
0.2seconds. This may be further reduced (or increased) depending on the
vdpa driver and the platform hardware, and it is dominated by the cost
of memory pinning.
This matches the time that we move out of the called downtime window.
The downtime is measured as the elapsed trace time between the last
vhost_vdpa_suspend on the source and the last vhost_vdpa_set_vring_enable_one
on the destination. In other words, from "guest CPUs freeze" to the
instant the final Rx/Tx queue-pair is able to start moving data.
Using ConnectX-6 Dx (MLX5) NICs in vhost-vDPA mode with 8 queue-pairs,
the series reduces guest-visible downtime during back-to-back live
migrations by more than half:
- 39G VM: 4.72s -> 2.09s (-2.63s, ~56% improvement)
- 128G VM: 14.72s -> 5.83s (-8.89s, ~60% improvement)
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20250522145839.59974-8-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost-vdpa.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index de834f2ebd..e20da95f30 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -894,8 +894,14 @@ static int vhost_vdpa_reset_device(struct vhost_dev *dev)
ret = vhost_vdpa_call(dev, VHOST_VDPA_SET_STATUS, &status);
trace_vhost_vdpa_reset_device(dev);
+ if (ret) {
+ return ret;
+ }
+
+ memory_listener_unregister(&v->shared->listener);
+ v->shared->listener_registered = false;
v->suspended = false;
- return ret;
+ return 0;
}
static int vhost_vdpa_get_vq_index(struct vhost_dev *dev, int idx)
@@ -1379,6 +1385,11 @@ static int vhost_vdpa_dev_start(struct vhost_dev *dev, bool started)
"IOMMU and try again");
return -1;
}
+ if (v->shared->listener_registered &&
+ dev->vdev->dma_as != v->shared->listener.address_space) {
+ memory_listener_unregister(&v->shared->listener);
+ v->shared->listener_registered = false;
+ }
if (!v->shared->listener_registered) {
memory_listener_register(&v->shared->listener, dev->vdev->dma_as);
v->shared->listener_registered = true;
@@ -1392,8 +1403,6 @@ static int vhost_vdpa_dev_start(struct vhost_dev *dev, bool started)
static void vhost_vdpa_reset_status(struct vhost_dev *dev)
{
- struct vhost_vdpa *v = dev->opaque;
-
if (!vhost_vdpa_last_dev(dev)) {
return;
}
@@ -1401,9 +1410,6 @@ static void vhost_vdpa_reset_status(struct vhost_dev *dev)
vhost_vdpa_reset_device(dev);
vhost_vdpa_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE |
VIRTIO_CONFIG_S_DRIVER);
- memory_listener_unregister(&v->shared->listener);
- v->shared->listener_registered = false;
-
}
static int vhost_vdpa_set_log_base(struct vhost_dev *dev, uint64_t base,
@@ -1537,12 +1543,27 @@ static int vhost_vdpa_get_features(struct vhost_dev *dev,
static int vhost_vdpa_set_owner(struct vhost_dev *dev)
{
+ int r;
+ struct vhost_vdpa *v;
+
if (!vhost_vdpa_first_dev(dev)) {
return 0;
}
trace_vhost_vdpa_set_owner(dev);
- return vhost_vdpa_call(dev, VHOST_SET_OWNER, NULL);
+ r = vhost_vdpa_call(dev, VHOST_SET_OWNER, NULL);
+ if (unlikely(r < 0)) {
+ return r;
+ }
+
+ /*
+ * Being optimistic and listening address space memory. If the device
+ * uses vIOMMU, it is changed at vhost_vdpa_dev_start.
+ */
+ v = dev->opaque;
+ memory_listener_register(&v->shared->listener, &address_space_memory);
+ v->shared->listener_registered = true;
+ return 0;
}
static int vhost_vdpa_vq_get_addr(struct vhost_dev *dev,
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PULL 31/31] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (29 preceding siblings ...)
2025-06-01 15:26 ` [PULL 30/31] vdpa: move memory listener register to vhost_vdpa_init Michael S. Tsirkin
@ 2025-06-01 15:26 ` Michael S. Tsirkin
2025-06-02 8:39 ` [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (2 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-01 15:26 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Bernhard Beschow, Mark Cave-Ayland, Paolo Bonzini,
Richard Henderson, Eduardo Habkost, Marcel Apfelbaum
From: Bernhard Beschow <shentey@gmail.com>
Commit 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges")
attempted to refactor RTC IRQ wiring which was previously done in
pc_basic_device_init() but forgot about the isapc machine. Fix this by
wiring in the code section dedicated exclusively to the isapc machine.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2961
Fixes: 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges")
cc: qemu-stable
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Message-Id: <20250526203820.1853-1-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/pc_piix.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 0dce512f18..6b6359ef65 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -285,6 +285,8 @@ static void pc_init1(MachineState *machine, const char *pci_type)
pcms->idebus[0] = qdev_get_child_bus(dev, "ide.0");
pcms->idebus[1] = qdev_get_child_bus(dev, "ide.1");
} else {
+ uint32_t irq;
+
isa_bus = isa_bus_new(NULL, system_memory, system_io,
&error_abort);
isa_bus_register_input_irqs(isa_bus, x86ms->gsi);
@@ -292,6 +294,9 @@ static void pc_init1(MachineState *machine, const char *pci_type)
x86ms->rtc = isa_new(TYPE_MC146818_RTC);
qdev_prop_set_int32(DEVICE(x86ms->rtc), "base_year", 2000);
isa_realize_and_unref(x86ms->rtc, isa_bus, &error_fatal);
+ irq = object_property_get_uint(OBJECT(x86ms->rtc), "irq",
+ &error_fatal);
+ isa_connect_gpio_out(ISA_DEVICE(x86ms->rtc), 0, irq);
i8257_dma_init(OBJECT(machine), isa_bus, 0);
pcms->hpet_enabled = false;
--
MST
^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (30 preceding siblings ...)
2025-06-01 15:26 ` [PULL 31/31] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine Michael S. Tsirkin
@ 2025-06-02 8:39 ` Michael S. Tsirkin
2025-06-02 16:39 ` Stefan Hajnoczi
2025-06-02 20:43 ` Stefan Hajnoczi
33 siblings, 0 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-02 8:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
On Sun, Jun 01, 2025 at 11:24:45AM -0400, Michael S. Tsirkin wrote:
> The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
>
> Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
>
> are available in the Git repository at:
>
> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>
> for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
>
> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
6e672b2a088ad56beb076d8d19ff86502815d6a8 now - I fixed two commit logs
> ----------------------------------------------------------------
> virtio,pci,pc: features, fixes, tests
>
> vhost will now no longer set a call notifier if unused
> loongarch gained acpi tests based on bios-tables-test
> some core pci work for SVM support in vtd
> vhost vdpa init has been optimized for response time to QMP
> A couple more fixes
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> ----------------------------------------------------------------
> Bernhard Beschow (1):
> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
>
> Bibo Mao (8):
> uefi-test-tools:: Add LoongArch64 support
> tests/data/uefi-boot-images: Add ISO image for LoongArch system
> tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> tests/acpi: Add empty ACPI data files for LoongArch
> tests/qtest/bios-tables-test: Add basic testing for LoongArch
> rebuild-expected-aml.sh: Add support for LoongArch
> tests/acpi: Fill acpi table data for LoongArch
> tests/acpi: Remove stale allowed tables
>
> CLEMENT MATHIEU--DRIF (11):
> pcie: Add helper to declare PASID capability for a pcie device
> pcie: Helper functions to check if PASID is enabled
> pcie: Helper function to check if ATS is enabled
> pcie: Add a helper to declare the PRI capability for a pcie device
> pcie: Helper functions to check to check if PRI is enabled
> pci: Cache the bus mastering status in the device
> pci: Add an API to get IOMMU's min page size and virtual address width
> memory: Store user data pointer in the IOMMU notifiers
> pci: Add a pci-level initialization function for IOMMU notifiers
> pci: Add a pci-level API for ATS
> pci: Add a PCI-level API for PRI
>
> Eugenio Pérez (7):
> vdpa: check for iova tree initialized at net_client_start
> vdpa: reorder vhost_vdpa_set_backend_cap
> vdpa: set backend capabilities at vhost_vdpa_init
> vdpa: add listener_registered
> vdpa: reorder listener assignment
> vdpa: move iova_tree allocation to net_vhost_vdpa_init
> vdpa: move memory listener register to vhost_vdpa_init
>
> Huaitong Han (1):
> vhost: Don't set vring call if guest notifier is unused
>
> Sairaj Kodilkar (1):
> hw/i386/amd_iommu: Fix device setup failure when PT is on.
>
> Vasant Hegde (1):
> hw/i386/amd_iommu: Fix xtsup when vcpus < 255
>
> Yuri Benditovich (1):
> virtio: check for validity of indirect descriptors
>
> include/hw/pci/pci.h | 316 +++++++++++++++++++++
> include/hw/pci/pci_device.h | 1 +
> include/hw/pci/pcie.h | 13 +-
> include/hw/pci/pcie_regs.h | 8 +
> include/hw/virtio/vhost-vdpa.h | 22 +-
> include/system/memory.h | 1 +
> hw/i386/amd_iommu.c | 20 +-
> hw/i386/pc_piix.c | 5 +
> hw/pci/pci.c | 206 +++++++++++++-
> hw/pci/pcie.c | 78 +++++
> hw/virtio/vhost-vdpa.c | 107 ++++---
> hw/virtio/virtio-pci.c | 7 +-
> hw/virtio/virtio.c | 11 +
> net/vhost-vdpa.c | 34 +--
> tests/qtest/bios-tables-test.c | 99 ++++++-
> tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> tests/data/acpi/loongarch64/virt/SLIT | 0
> tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> tests/qtest/meson.build | 1 +
> tests/uefi-test-tools/Makefile | 5 +-
> .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> tests/uefi-test-tools/uefi-test-build.config | 10 +
> 38 files changed, 846 insertions(+), 108 deletions(-)
> create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (31 preceding siblings ...)
2025-06-02 8:39 ` [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
@ 2025-06-02 16:39 ` Stefan Hajnoczi
2025-06-02 17:54 ` Michael S. Tsirkin
2025-06-02 20:43 ` Stefan Hajnoczi
33 siblings, 1 reply; 41+ messages in thread
From: Stefan Hajnoczi @ 2025-06-02 16:39 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel, Peter Maydell
On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
>
> Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
>
> are available in the Git repository at:
>
> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>
> for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
>
> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
>
> ----------------------------------------------------------------
> virtio,pci,pc: features, fixes, tests
>
> vhost will now no longer set a call notifier if unused
> loongarch gained acpi tests based on bios-tables-test
> some core pci work for SVM support in vtd
> vhost vdpa init has been optimized for response time to QMP
> A couple more fixes
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Please take a look at this CI failure:
https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
>
> ----------------------------------------------------------------
> Bernhard Beschow (1):
> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
>
> Bibo Mao (8):
> uefi-test-tools:: Add LoongArch64 support
> tests/data/uefi-boot-images: Add ISO image for LoongArch system
> tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> tests/acpi: Add empty ACPI data files for LoongArch
> tests/qtest/bios-tables-test: Add basic testing for LoongArch
> rebuild-expected-aml.sh: Add support for LoongArch
> tests/acpi: Fill acpi table data for LoongArch
> tests/acpi: Remove stale allowed tables
>
> CLEMENT MATHIEU--DRIF (11):
> pcie: Add helper to declare PASID capability for a pcie device
> pcie: Helper functions to check if PASID is enabled
> pcie: Helper function to check if ATS is enabled
> pcie: Add a helper to declare the PRI capability for a pcie device
> pcie: Helper functions to check to check if PRI is enabled
> pci: Cache the bus mastering status in the device
> pci: Add an API to get IOMMU's min page size and virtual address width
> memory: Store user data pointer in the IOMMU notifiers
> pci: Add a pci-level initialization function for IOMMU notifiers
> pci: Add a pci-level API for ATS
> pci: Add a PCI-level API for PRI
>
> Eugenio Pérez (7):
> vdpa: check for iova tree initialized at net_client_start
> vdpa: reorder vhost_vdpa_set_backend_cap
> vdpa: set backend capabilities at vhost_vdpa_init
> vdpa: add listener_registered
> vdpa: reorder listener assignment
> vdpa: move iova_tree allocation to net_vhost_vdpa_init
> vdpa: move memory listener register to vhost_vdpa_init
>
> Huaitong Han (1):
> vhost: Don't set vring call if guest notifier is unused
>
> Sairaj Kodilkar (1):
> hw/i386/amd_iommu: Fix device setup failure when PT is on.
>
> Vasant Hegde (1):
> hw/i386/amd_iommu: Fix xtsup when vcpus < 255
>
> Yuri Benditovich (1):
> virtio: check for validity of indirect descriptors
>
> include/hw/pci/pci.h | 316 +++++++++++++++++++++
> include/hw/pci/pci_device.h | 1 +
> include/hw/pci/pcie.h | 13 +-
> include/hw/pci/pcie_regs.h | 8 +
> include/hw/virtio/vhost-vdpa.h | 22 +-
> include/system/memory.h | 1 +
> hw/i386/amd_iommu.c | 20 +-
> hw/i386/pc_piix.c | 5 +
> hw/pci/pci.c | 206 +++++++++++++-
> hw/pci/pcie.c | 78 +++++
> hw/virtio/vhost-vdpa.c | 107 ++++---
> hw/virtio/virtio-pci.c | 7 +-
> hw/virtio/virtio.c | 11 +
> net/vhost-vdpa.c | 34 +--
> tests/qtest/bios-tables-test.c | 99 ++++++-
> tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> tests/data/acpi/loongarch64/virt/SLIT | 0
> tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> tests/qtest/meson.build | 1 +
> tests/uefi-test-tools/Makefile | 5 +-
> .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> tests/uefi-test-tools/uefi-test-build.config | 10 +
> 38 files changed, 846 insertions(+), 108 deletions(-)
> create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 16:39 ` Stefan Hajnoczi
@ 2025-06-02 17:54 ` Michael S. Tsirkin
2025-06-02 18:25 ` Stefan Hajnoczi
0 siblings, 1 reply; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-02 17:54 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell
On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
> On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
> >
> > Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
> >
> > are available in the Git repository at:
> >
> > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> >
> > for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
> >
> > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
> >
> > ----------------------------------------------------------------
> > virtio,pci,pc: features, fixes, tests
> >
> > vhost will now no longer set a call notifier if unused
> > loongarch gained acpi tests based on bios-tables-test
> > some core pci work for SVM support in vtd
> > vhost vdpa init has been optimized for response time to QMP
> > A couple more fixes
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Please take a look at this CI failure:
> https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
Hmm must be how it interacts with something in your tree.
Which commit are you merging with?
Let me know, I'll try to rebase.
> >
> > ----------------------------------------------------------------
> > Bernhard Beschow (1):
> > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
> >
> > Bibo Mao (8):
> > uefi-test-tools:: Add LoongArch64 support
> > tests/data/uefi-boot-images: Add ISO image for LoongArch system
> > tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> > tests/acpi: Add empty ACPI data files for LoongArch
> > tests/qtest/bios-tables-test: Add basic testing for LoongArch
> > rebuild-expected-aml.sh: Add support for LoongArch
> > tests/acpi: Fill acpi table data for LoongArch
> > tests/acpi: Remove stale allowed tables
> >
> > CLEMENT MATHIEU--DRIF (11):
> > pcie: Add helper to declare PASID capability for a pcie device
> > pcie: Helper functions to check if PASID is enabled
> > pcie: Helper function to check if ATS is enabled
> > pcie: Add a helper to declare the PRI capability for a pcie device
> > pcie: Helper functions to check to check if PRI is enabled
> > pci: Cache the bus mastering status in the device
> > pci: Add an API to get IOMMU's min page size and virtual address width
> > memory: Store user data pointer in the IOMMU notifiers
> > pci: Add a pci-level initialization function for IOMMU notifiers
> > pci: Add a pci-level API for ATS
> > pci: Add a PCI-level API for PRI
> >
> > Eugenio Pérez (7):
> > vdpa: check for iova tree initialized at net_client_start
> > vdpa: reorder vhost_vdpa_set_backend_cap
> > vdpa: set backend capabilities at vhost_vdpa_init
> > vdpa: add listener_registered
> > vdpa: reorder listener assignment
> > vdpa: move iova_tree allocation to net_vhost_vdpa_init
> > vdpa: move memory listener register to vhost_vdpa_init
> >
> > Huaitong Han (1):
> > vhost: Don't set vring call if guest notifier is unused
> >
> > Sairaj Kodilkar (1):
> > hw/i386/amd_iommu: Fix device setup failure when PT is on.
> >
> > Vasant Hegde (1):
> > hw/i386/amd_iommu: Fix xtsup when vcpus < 255
> >
> > Yuri Benditovich (1):
> > virtio: check for validity of indirect descriptors
> >
> > include/hw/pci/pci.h | 316 +++++++++++++++++++++
> > include/hw/pci/pci_device.h | 1 +
> > include/hw/pci/pcie.h | 13 +-
> > include/hw/pci/pcie_regs.h | 8 +
> > include/hw/virtio/vhost-vdpa.h | 22 +-
> > include/system/memory.h | 1 +
> > hw/i386/amd_iommu.c | 20 +-
> > hw/i386/pc_piix.c | 5 +
> > hw/pci/pci.c | 206 +++++++++++++-
> > hw/pci/pcie.c | 78 +++++
> > hw/virtio/vhost-vdpa.c | 107 ++++---
> > hw/virtio/virtio-pci.c | 7 +-
> > hw/virtio/virtio.c | 11 +
> > net/vhost-vdpa.c | 34 +--
> > tests/qtest/bios-tables-test.c | 99 ++++++-
> > tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> > tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> > tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> > tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> > tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> > tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> > tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> > tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> > tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> > tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> > tests/data/acpi/loongarch64/virt/SLIT | 0
> > tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> > tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> > tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> > tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> > tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> > tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> > tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> > .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> > tests/qtest/meson.build | 1 +
> > tests/uefi-test-tools/Makefile | 5 +-
> > .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> > tests/uefi-test-tools/uefi-test-build.config | 10 +
> > 38 files changed, 846 insertions(+), 108 deletions(-)
> > create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> > create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> > create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> > create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> > create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> > create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
> >
> >
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 17:54 ` Michael S. Tsirkin
@ 2025-06-02 18:25 ` Stefan Hajnoczi
2025-06-02 18:31 ` Michael S. Tsirkin
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Hajnoczi @ 2025-06-02 18:25 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel, Peter Maydell
On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
> > On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> > >
> > > The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
> > >
> > > Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
> > >
> > > are available in the Git repository at:
> > >
> > > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> > >
> > > for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
> > >
> > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
> > >
> > > ----------------------------------------------------------------
> > > virtio,pci,pc: features, fixes, tests
> > >
> > > vhost will now no longer set a call notifier if unused
> > > loongarch gained acpi tests based on bios-tables-test
> > > some core pci work for SVM support in vtd
> > > vhost vdpa init has been optimized for response time to QMP
> > > A couple more fixes
> > >
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > Please take a look at this CI failure:
> > https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
>
> Hmm must be how it interacts with something in your tree.
> Which commit are you merging with?
> Let me know, I'll try to rebase.
commit 25de0b9aa129b2b014a0595befef05f04511868d (HEAD -> staging)
Merge: 3e82ddaa8d 6e672b2a08
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Mon Jun 2 09:56:12 2025 -0400
Merge tag 'for_upstream' of
https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
virtio,pci,pc: features, fixes, tests
Commit 6e672b2a08 is the one you published and 3e82ddaa8d is the
qemu.git/master.
>
> > >
> > > ----------------------------------------------------------------
> > > Bernhard Beschow (1):
> > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
> > >
> > > Bibo Mao (8):
> > > uefi-test-tools:: Add LoongArch64 support
> > > tests/data/uefi-boot-images: Add ISO image for LoongArch system
> > > tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> > > tests/acpi: Add empty ACPI data files for LoongArch
> > > tests/qtest/bios-tables-test: Add basic testing for LoongArch
> > > rebuild-expected-aml.sh: Add support for LoongArch
> > > tests/acpi: Fill acpi table data for LoongArch
> > > tests/acpi: Remove stale allowed tables
> > >
> > > CLEMENT MATHIEU--DRIF (11):
> > > pcie: Add helper to declare PASID capability for a pcie device
> > > pcie: Helper functions to check if PASID is enabled
> > > pcie: Helper function to check if ATS is enabled
> > > pcie: Add a helper to declare the PRI capability for a pcie device
> > > pcie: Helper functions to check to check if PRI is enabled
> > > pci: Cache the bus mastering status in the device
> > > pci: Add an API to get IOMMU's min page size and virtual address width
> > > memory: Store user data pointer in the IOMMU notifiers
> > > pci: Add a pci-level initialization function for IOMMU notifiers
> > > pci: Add a pci-level API for ATS
> > > pci: Add a PCI-level API for PRI
> > >
> > > Eugenio Pérez (7):
> > > vdpa: check for iova tree initialized at net_client_start
> > > vdpa: reorder vhost_vdpa_set_backend_cap
> > > vdpa: set backend capabilities at vhost_vdpa_init
> > > vdpa: add listener_registered
> > > vdpa: reorder listener assignment
> > > vdpa: move iova_tree allocation to net_vhost_vdpa_init
> > > vdpa: move memory listener register to vhost_vdpa_init
> > >
> > > Huaitong Han (1):
> > > vhost: Don't set vring call if guest notifier is unused
> > >
> > > Sairaj Kodilkar (1):
> > > hw/i386/amd_iommu: Fix device setup failure when PT is on.
> > >
> > > Vasant Hegde (1):
> > > hw/i386/amd_iommu: Fix xtsup when vcpus < 255
> > >
> > > Yuri Benditovich (1):
> > > virtio: check for validity of indirect descriptors
> > >
> > > include/hw/pci/pci.h | 316 +++++++++++++++++++++
> > > include/hw/pci/pci_device.h | 1 +
> > > include/hw/pci/pcie.h | 13 +-
> > > include/hw/pci/pcie_regs.h | 8 +
> > > include/hw/virtio/vhost-vdpa.h | 22 +-
> > > include/system/memory.h | 1 +
> > > hw/i386/amd_iommu.c | 20 +-
> > > hw/i386/pc_piix.c | 5 +
> > > hw/pci/pci.c | 206 +++++++++++++-
> > > hw/pci/pcie.c | 78 +++++
> > > hw/virtio/vhost-vdpa.c | 107 ++++---
> > > hw/virtio/virtio-pci.c | 7 +-
> > > hw/virtio/virtio.c | 11 +
> > > net/vhost-vdpa.c | 34 +--
> > > tests/qtest/bios-tables-test.c | 99 ++++++-
> > > tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> > > tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> > > tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> > > tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> > > tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> > > tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> > > tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> > > tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> > > tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> > > tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> > > tests/data/acpi/loongarch64/virt/SLIT | 0
> > > tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> > > tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> > > tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> > > tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> > > tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> > > tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> > > tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> > > .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> > > tests/qtest/meson.build | 1 +
> > > tests/uefi-test-tools/Makefile | 5 +-
> > > .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> > > tests/uefi-test-tools/uefi-test-build.config | 10 +
> > > 38 files changed, 846 insertions(+), 108 deletions(-)
> > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> > > create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> > > create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> > > create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
> > >
> > >
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 18:25 ` Stefan Hajnoczi
@ 2025-06-02 18:31 ` Michael S. Tsirkin
2025-06-02 21:58 ` Michael S. Tsirkin
0 siblings, 1 reply; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-02 18:31 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell, Bibo Mao
On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote:
> On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
> > > On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >
> > > > The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
> > > >
> > > > Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> > > >
> > > > for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
> > > >
> > > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
> > > >
> > > > ----------------------------------------------------------------
> > > > virtio,pci,pc: features, fixes, tests
> > > >
> > > > vhost will now no longer set a call notifier if unused
> > > > loongarch gained acpi tests based on bios-tables-test
> > > > some core pci work for SVM support in vtd
> > > > vhost vdpa init has been optimized for response time to QMP
> > > > A couple more fixes
> > > >
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > >
> > > Please take a look at this CI failure:
> > > https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
> >
> > Hmm must be how it interacts with something in your tree.
> > Which commit are you merging with?
> > Let me know, I'll try to rebase.
>
> commit 25de0b9aa129b2b014a0595befef05f04511868d (HEAD -> staging)
> Merge: 3e82ddaa8d 6e672b2a08
> Author: Stefan Hajnoczi <stefanha@redhat.com>
> Date: Mon Jun 2 09:56:12 2025 -0400
>
> Merge tag 'for_upstream' of
> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
>
> virtio,pci,pc: features, fixes, tests
>
> Commit 6e672b2a08 is the one you published and 3e82ddaa8d is the
> qemu.git/master.
I could not figure it out. Must be a loongarch bug dealing
with s390 hosts. I dropped them from the tag for now.
Cc contributor to figure it out.
Bibo Mao pls take a look.
New tag:
0b006153b7ec66505cb2d231235aa19ca5d2ce37
Thanks!
> >
> > > >
> > > > ----------------------------------------------------------------
> > > > Bernhard Beschow (1):
> > > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
> > > >
> > > > Bibo Mao (8):
> > > > uefi-test-tools:: Add LoongArch64 support
> > > > tests/data/uefi-boot-images: Add ISO image for LoongArch system
> > > > tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> > > > tests/acpi: Add empty ACPI data files for LoongArch
> > > > tests/qtest/bios-tables-test: Add basic testing for LoongArch
> > > > rebuild-expected-aml.sh: Add support for LoongArch
> > > > tests/acpi: Fill acpi table data for LoongArch
> > > > tests/acpi: Remove stale allowed tables
> > > >
> > > > CLEMENT MATHIEU--DRIF (11):
> > > > pcie: Add helper to declare PASID capability for a pcie device
> > > > pcie: Helper functions to check if PASID is enabled
> > > > pcie: Helper function to check if ATS is enabled
> > > > pcie: Add a helper to declare the PRI capability for a pcie device
> > > > pcie: Helper functions to check to check if PRI is enabled
> > > > pci: Cache the bus mastering status in the device
> > > > pci: Add an API to get IOMMU's min page size and virtual address width
> > > > memory: Store user data pointer in the IOMMU notifiers
> > > > pci: Add a pci-level initialization function for IOMMU notifiers
> > > > pci: Add a pci-level API for ATS
> > > > pci: Add a PCI-level API for PRI
> > > >
> > > > Eugenio Pérez (7):
> > > > vdpa: check for iova tree initialized at net_client_start
> > > > vdpa: reorder vhost_vdpa_set_backend_cap
> > > > vdpa: set backend capabilities at vhost_vdpa_init
> > > > vdpa: add listener_registered
> > > > vdpa: reorder listener assignment
> > > > vdpa: move iova_tree allocation to net_vhost_vdpa_init
> > > > vdpa: move memory listener register to vhost_vdpa_init
> > > >
> > > > Huaitong Han (1):
> > > > vhost: Don't set vring call if guest notifier is unused
> > > >
> > > > Sairaj Kodilkar (1):
> > > > hw/i386/amd_iommu: Fix device setup failure when PT is on.
> > > >
> > > > Vasant Hegde (1):
> > > > hw/i386/amd_iommu: Fix xtsup when vcpus < 255
> > > >
> > > > Yuri Benditovich (1):
> > > > virtio: check for validity of indirect descriptors
> > > >
> > > > include/hw/pci/pci.h | 316 +++++++++++++++++++++
> > > > include/hw/pci/pci_device.h | 1 +
> > > > include/hw/pci/pcie.h | 13 +-
> > > > include/hw/pci/pcie_regs.h | 8 +
> > > > include/hw/virtio/vhost-vdpa.h | 22 +-
> > > > include/system/memory.h | 1 +
> > > > hw/i386/amd_iommu.c | 20 +-
> > > > hw/i386/pc_piix.c | 5 +
> > > > hw/pci/pci.c | 206 +++++++++++++-
> > > > hw/pci/pcie.c | 78 +++++
> > > > hw/virtio/vhost-vdpa.c | 107 ++++---
> > > > hw/virtio/virtio-pci.c | 7 +-
> > > > hw/virtio/virtio.c | 11 +
> > > > net/vhost-vdpa.c | 34 +--
> > > > tests/qtest/bios-tables-test.c | 99 ++++++-
> > > > tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> > > > tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> > > > tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> > > > tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> > > > tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> > > > tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> > > > tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> > > > tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> > > > tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> > > > tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> > > > tests/data/acpi/loongarch64/virt/SLIT | 0
> > > > tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> > > > tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> > > > tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> > > > tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> > > > tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> > > > tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> > > > tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> > > > .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> > > > tests/qtest/meson.build | 1 +
> > > > tests/uefi-test-tools/Makefile | 5 +-
> > > > .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> > > > tests/uefi-test-tools/uefi-test-build.config | 10 +
> > > > 38 files changed, 846 insertions(+), 108 deletions(-)
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> > > > create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
> > > >
> > > >
> >
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
` (32 preceding siblings ...)
2025-06-02 16:39 ` Stefan Hajnoczi
@ 2025-06-02 20:43 ` Stefan Hajnoczi
33 siblings, 0 replies; 41+ messages in thread
From: Stefan Hajnoczi @ 2025-06-02 20:43 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel, Peter Maydell
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 18:31 ` Michael S. Tsirkin
@ 2025-06-02 21:58 ` Michael S. Tsirkin
2025-06-02 22:27 ` Stefan Hajnoczi
2025-06-03 1:09 ` Bibo Mao
0 siblings, 2 replies; 41+ messages in thread
From: Michael S. Tsirkin @ 2025-06-02 21:58 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell, Bibo Mao
On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote:
> On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote:
> > On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > >
> > > On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
> > > > On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > > >
> > > > > The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
> > > > >
> > > > > Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
> > > > >
> > > > > are available in the Git repository at:
> > > > >
> > > > > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> > > > >
> > > > > for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
> > > > >
> > > > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > virtio,pci,pc: features, fixes, tests
> > > > >
> > > > > vhost will now no longer set a call notifier if unused
> > > > > loongarch gained acpi tests based on bios-tables-test
> > > > > some core pci work for SVM support in vtd
> > > > > vhost vdpa init has been optimized for response time to QMP
> > > > > A couple more fixes
> > > > >
> > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > >
> > > > Please take a look at this CI failure:
> > > > https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
> > >
> > > Hmm must be how it interacts with something in your tree.
> > > Which commit are you merging with?
> > > Let me know, I'll try to rebase.
> >
> > commit 25de0b9aa129b2b014a0595befef05f04511868d (HEAD -> staging)
> > Merge: 3e82ddaa8d 6e672b2a08
> > Author: Stefan Hajnoczi <stefanha@redhat.com>
> > Date: Mon Jun 2 09:56:12 2025 -0400
> >
> > Merge tag 'for_upstream' of
> > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
> >
> > virtio,pci,pc: features, fixes, tests
> >
> > Commit 6e672b2a08 is the one you published and 3e82ddaa8d is the
> > qemu.git/master.
>
> I could not figure it out. Must be a loongarch bug dealing
> with s390 hosts. I dropped them from the tag for now.
> Cc contributor to figure it out.
> Bibo Mao pls take a look.
>
> New tag:
> 0b006153b7ec66505cb2d231235aa19ca5d2ce37
>
>
> Thanks!
hope this is ok now. going offline for vacation. see you after the 10th!
>
> > >
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > Bernhard Beschow (1):
> > > > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
> > > > >
> > > > > Bibo Mao (8):
> > > > > uefi-test-tools:: Add LoongArch64 support
> > > > > tests/data/uefi-boot-images: Add ISO image for LoongArch system
> > > > > tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
> > > > > tests/acpi: Add empty ACPI data files for LoongArch
> > > > > tests/qtest/bios-tables-test: Add basic testing for LoongArch
> > > > > rebuild-expected-aml.sh: Add support for LoongArch
> > > > > tests/acpi: Fill acpi table data for LoongArch
> > > > > tests/acpi: Remove stale allowed tables
> > > > >
> > > > > CLEMENT MATHIEU--DRIF (11):
> > > > > pcie: Add helper to declare PASID capability for a pcie device
> > > > > pcie: Helper functions to check if PASID is enabled
> > > > > pcie: Helper function to check if ATS is enabled
> > > > > pcie: Add a helper to declare the PRI capability for a pcie device
> > > > > pcie: Helper functions to check to check if PRI is enabled
> > > > > pci: Cache the bus mastering status in the device
> > > > > pci: Add an API to get IOMMU's min page size and virtual address width
> > > > > memory: Store user data pointer in the IOMMU notifiers
> > > > > pci: Add a pci-level initialization function for IOMMU notifiers
> > > > > pci: Add a pci-level API for ATS
> > > > > pci: Add a PCI-level API for PRI
> > > > >
> > > > > Eugenio Pérez (7):
> > > > > vdpa: check for iova tree initialized at net_client_start
> > > > > vdpa: reorder vhost_vdpa_set_backend_cap
> > > > > vdpa: set backend capabilities at vhost_vdpa_init
> > > > > vdpa: add listener_registered
> > > > > vdpa: reorder listener assignment
> > > > > vdpa: move iova_tree allocation to net_vhost_vdpa_init
> > > > > vdpa: move memory listener register to vhost_vdpa_init
> > > > >
> > > > > Huaitong Han (1):
> > > > > vhost: Don't set vring call if guest notifier is unused
> > > > >
> > > > > Sairaj Kodilkar (1):
> > > > > hw/i386/amd_iommu: Fix device setup failure when PT is on.
> > > > >
> > > > > Vasant Hegde (1):
> > > > > hw/i386/amd_iommu: Fix xtsup when vcpus < 255
> > > > >
> > > > > Yuri Benditovich (1):
> > > > > virtio: check for validity of indirect descriptors
> > > > >
> > > > > include/hw/pci/pci.h | 316 +++++++++++++++++++++
> > > > > include/hw/pci/pci_device.h | 1 +
> > > > > include/hw/pci/pcie.h | 13 +-
> > > > > include/hw/pci/pcie_regs.h | 8 +
> > > > > include/hw/virtio/vhost-vdpa.h | 22 +-
> > > > > include/system/memory.h | 1 +
> > > > > hw/i386/amd_iommu.c | 20 +-
> > > > > hw/i386/pc_piix.c | 5 +
> > > > > hw/pci/pci.c | 206 +++++++++++++-
> > > > > hw/pci/pcie.c | 78 +++++
> > > > > hw/virtio/vhost-vdpa.c | 107 ++++---
> > > > > hw/virtio/virtio-pci.c | 7 +-
> > > > > hw/virtio/virtio.c | 11 +
> > > > > net/vhost-vdpa.c | 34 +--
> > > > > tests/qtest/bios-tables-test.c | 99 ++++++-
> > > > > tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
> > > > > tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
> > > > > tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
> > > > > tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
> > > > > tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
> > > > > tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
> > > > > tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
> > > > > tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
> > > > > tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
> > > > > tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
> > > > > tests/data/acpi/loongarch64/virt/SLIT | 0
> > > > > tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
> > > > > tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
> > > > > tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
> > > > > tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
> > > > > tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
> > > > > tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
> > > > > tests/data/acpi/rebuild-expected-aml.sh | 4 +-
> > > > > .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
> > > > > tests/qtest/meson.build | 1 +
> > > > > tests/uefi-test-tools/Makefile | 5 +-
> > > > > .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
> > > > > tests/uefi-test-tools/uefi-test-build.config | 10 +
> > > > > 38 files changed, 846 insertions(+), 108 deletions(-)
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/FACP
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
> > > > > create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
> > > > > create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
> > > > >
> > > > >
> > >
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 21:58 ` Michael S. Tsirkin
@ 2025-06-02 22:27 ` Stefan Hajnoczi
2025-06-03 1:09 ` Bibo Mao
1 sibling, 0 replies; 41+ messages in thread
From: Stefan Hajnoczi @ 2025-06-02 22:27 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel, Peter Maydell, Bibo Mao
On Mon, Jun 2, 2025 at 5:58 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote:
> > On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote:
> > > On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >
> > > > On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
> > > > > On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > > > >
> > > > > > The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
> > > > > >
> > > > > > Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
> > > > > >
> > > > > > are available in the Git repository at:
> > > > > >
> > > > > > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> > > > > >
> > > > > > for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
> > > > > >
> > > > > > hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
> > > > > >
> > > > > > ----------------------------------------------------------------
> > > > > > virtio,pci,pc: features, fixes, tests
> > > > > >
> > > > > > vhost will now no longer set a call notifier if unused
> > > > > > loongarch gained acpi tests based on bios-tables-test
> > > > > > some core pci work for SVM support in vtd
> > > > > > vhost vdpa init has been optimized for response time to QMP
> > > > > > A couple more fixes
> > > > > >
> > > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > >
> > > > > Please take a look at this CI failure:
> > > > > https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
> > > >
> > > > Hmm must be how it interacts with something in your tree.
> > > > Which commit are you merging with?
> > > > Let me know, I'll try to rebase.
> > >
> > > commit 25de0b9aa129b2b014a0595befef05f04511868d (HEAD -> staging)
> > > Merge: 3e82ddaa8d 6e672b2a08
> > > Author: Stefan Hajnoczi <stefanha@redhat.com>
> > > Date: Mon Jun 2 09:56:12 2025 -0400
> > >
> > > Merge tag 'for_upstream' of
> > > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
> > >
> > > virtio,pci,pc: features, fixes, tests
> > >
> > > Commit 6e672b2a08 is the one you published and 3e82ddaa8d is the
> > > qemu.git/master.
> >
> > I could not figure it out. Must be a loongarch bug dealing
> > with s390 hosts. I dropped them from the tag for now.
> > Cc contributor to figure it out.
> > Bibo Mao pls take a look.
> >
> > New tag:
> > 0b006153b7ec66505cb2d231235aa19ca5d2ce37
> >
> >
> > Thanks!
>
>
> hope this is ok now. going offline for vacation. see you after the 10th!
Yes, it has been merged now. Enjoy your vacation!
Stefan
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests
2025-06-02 21:58 ` Michael S. Tsirkin
2025-06-02 22:27 ` Stefan Hajnoczi
@ 2025-06-03 1:09 ` Bibo Mao
1 sibling, 0 replies; 41+ messages in thread
From: Bibo Mao @ 2025-06-03 1:09 UTC (permalink / raw)
To: Michael S. Tsirkin, Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell
On 2025/6/3 上午5:58, Michael S. Tsirkin wrote:
> On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote:
>> On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote:
>>> On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>
>>>> On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote:
>>>>> On Sun, Jun 1, 2025 at 11:34 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>>>
>>>>>> The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d:
>>>>>>
>>>>>> Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400)
>>>>>>
>>>>>> are available in the Git repository at:
>>>>>>
>>>>>> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>>>>>>
>>>>>> for you to fetch changes up to 1c5771c092742b729e2a640be184a0f48c0b2cdb:
>>>>>>
>>>>>> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine (2025-06-01 08:30:09 -0400)
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> virtio,pci,pc: features, fixes, tests
>>>>>>
>>>>>> vhost will now no longer set a call notifier if unused
>>>>>> loongarch gained acpi tests based on bios-tables-test
>>>>>> some core pci work for SVM support in vtd
>>>>>> vhost vdpa init has been optimized for response time to QMP
>>>>>> A couple more fixes
>>>>>>
>>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>>>>
>>>>> Please take a look at this CI failure:
>>>>> https://gitlab.com/qemu-project/qemu/-/jobs/10225580735#L4750
>>>>
>>>> Hmm must be how it interacts with something in your tree.
>>>> Which commit are you merging with?
>>>> Let me know, I'll try to rebase.
>>>
>>> commit 25de0b9aa129b2b014a0595befef05f04511868d (HEAD -> staging)
>>> Merge: 3e82ddaa8d 6e672b2a08
>>> Author: Stefan Hajnoczi <stefanha@redhat.com>
>>> Date: Mon Jun 2 09:56:12 2025 -0400
>>>
>>> Merge tag 'for_upstream' of
>>> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
>>>
>>> virtio,pci,pc: features, fixes, tests
>>>
>>> Commit 6e672b2a08 is the one you published and 3e82ddaa8d is the
>>> qemu.git/master.
>>
>> I could not figure it out. Must be a loongarch bug dealing
>> with s390 hosts. I dropped them from the tag for now.
>> Cc contributor to figure it out.
>> Bibo Mao pls take a look.
>>
>> New tag:
>> 0b006153b7ec66505cb2d231235aa19ca5d2ce37
>>
>>
>> Thanks!
>
>
> hope this is ok now. going offline for vacation. see you after the 10th!
Sorry for the trouble, I will look into this issue. And have a good
summer vacation.
Regards
Bibo Mao
>
>>
>>>>
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> Bernhard Beschow (1):
>>>>>> hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
>>>>>>
>>>>>> Bibo Mao (8):
>>>>>> uefi-test-tools:: Add LoongArch64 support
>>>>>> tests/data/uefi-boot-images: Add ISO image for LoongArch system
>>>>>> tests/qtest/bios-tables-test: Use MiB macro rather hardcode value
>>>>>> tests/acpi: Add empty ACPI data files for LoongArch
>>>>>> tests/qtest/bios-tables-test: Add basic testing for LoongArch
>>>>>> rebuild-expected-aml.sh: Add support for LoongArch
>>>>>> tests/acpi: Fill acpi table data for LoongArch
>>>>>> tests/acpi: Remove stale allowed tables
>>>>>>
>>>>>> CLEMENT MATHIEU--DRIF (11):
>>>>>> pcie: Add helper to declare PASID capability for a pcie device
>>>>>> pcie: Helper functions to check if PASID is enabled
>>>>>> pcie: Helper function to check if ATS is enabled
>>>>>> pcie: Add a helper to declare the PRI capability for a pcie device
>>>>>> pcie: Helper functions to check to check if PRI is enabled
>>>>>> pci: Cache the bus mastering status in the device
>>>>>> pci: Add an API to get IOMMU's min page size and virtual address width
>>>>>> memory: Store user data pointer in the IOMMU notifiers
>>>>>> pci: Add a pci-level initialization function for IOMMU notifiers
>>>>>> pci: Add a pci-level API for ATS
>>>>>> pci: Add a PCI-level API for PRI
>>>>>>
>>>>>> Eugenio Pérez (7):
>>>>>> vdpa: check for iova tree initialized at net_client_start
>>>>>> vdpa: reorder vhost_vdpa_set_backend_cap
>>>>>> vdpa: set backend capabilities at vhost_vdpa_init
>>>>>> vdpa: add listener_registered
>>>>>> vdpa: reorder listener assignment
>>>>>> vdpa: move iova_tree allocation to net_vhost_vdpa_init
>>>>>> vdpa: move memory listener register to vhost_vdpa_init
>>>>>>
>>>>>> Huaitong Han (1):
>>>>>> vhost: Don't set vring call if guest notifier is unused
>>>>>>
>>>>>> Sairaj Kodilkar (1):
>>>>>> hw/i386/amd_iommu: Fix device setup failure when PT is on.
>>>>>>
>>>>>> Vasant Hegde (1):
>>>>>> hw/i386/amd_iommu: Fix xtsup when vcpus < 255
>>>>>>
>>>>>> Yuri Benditovich (1):
>>>>>> virtio: check for validity of indirect descriptors
>>>>>>
>>>>>> include/hw/pci/pci.h | 316 +++++++++++++++++++++
>>>>>> include/hw/pci/pci_device.h | 1 +
>>>>>> include/hw/pci/pcie.h | 13 +-
>>>>>> include/hw/pci/pcie_regs.h | 8 +
>>>>>> include/hw/virtio/vhost-vdpa.h | 22 +-
>>>>>> include/system/memory.h | 1 +
>>>>>> hw/i386/amd_iommu.c | 20 +-
>>>>>> hw/i386/pc_piix.c | 5 +
>>>>>> hw/pci/pci.c | 206 +++++++++++++-
>>>>>> hw/pci/pcie.c | 78 +++++
>>>>>> hw/virtio/vhost-vdpa.c | 107 ++++---
>>>>>> hw/virtio/virtio-pci.c | 7 +-
>>>>>> hw/virtio/virtio.c | 11 +
>>>>>> net/vhost-vdpa.c | 34 +--
>>>>>> tests/qtest/bios-tables-test.c | 99 ++++++-
>>>>>> tests/data/acpi/loongarch64/virt/APIC | Bin 0 -> 108 bytes
>>>>>> tests/data/acpi/loongarch64/virt/APIC.topology | Bin 0 -> 213 bytes
>>>>>> tests/data/acpi/loongarch64/virt/DSDT | Bin 0 -> 4641 bytes
>>>>>> tests/data/acpi/loongarch64/virt/DSDT.memhp | Bin 0 -> 5862 bytes
>>>>>> tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 0 -> 4647 bytes
>>>>>> tests/data/acpi/loongarch64/virt/DSDT.topology | Bin 0 -> 5352 bytes
>>>>>> tests/data/acpi/loongarch64/virt/FACP | Bin 0 -> 268 bytes
>>>>>> tests/data/acpi/loongarch64/virt/MCFG | Bin 0 -> 60 bytes
>>>>>> tests/data/acpi/loongarch64/virt/PPTT | Bin 0 -> 76 bytes
>>>>>> tests/data/acpi/loongarch64/virt/PPTT.topology | Bin 0 -> 296 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SLIT | 0
>>>>>> tests/data/acpi/loongarch64/virt/SLIT.numamem | Bin 0 -> 48 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SPCR | Bin 0 -> 80 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SRAT | Bin 0 -> 104 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SRAT.memhp | Bin 0 -> 144 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SRAT.numamem | Bin 0 -> 144 bytes
>>>>>> tests/data/acpi/loongarch64/virt/SRAT.topology | Bin 0 -> 216 bytes
>>>>>> tests/data/acpi/rebuild-expected-aml.sh | 4 +-
>>>>>> .../bios-tables-test.loongarch64.iso.qcow2 | Bin 0 -> 12800 bytes
>>>>>> tests/qtest/meson.build | 1 +
>>>>>> tests/uefi-test-tools/Makefile | 5 +-
>>>>>> .../UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +-
>>>>>> tests/uefi-test-tools/uefi-test-build.config | 10 +
>>>>>> 38 files changed, 846 insertions(+), 108 deletions(-)
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/APIC
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/APIC.topology
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.memhp
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.numamem
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/DSDT.topology
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/FACP
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/MCFG
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/PPTT.topology
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SLIT.numamem
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SPCR
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.memhp
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.numamem
>>>>>> create mode 100644 tests/data/acpi/loongarch64/virt/SRAT.topology
>>>>>> create mode 100644 tests/data/uefi-boot-images/bios-tables-test.loongarch64.iso.qcow2
>>>>>>
>>>>>>
>>>>
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2025-06-03 1:11 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-01 15:24 [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 01/31] virtio: check for validity of indirect descriptors Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 02/31] hw/i386/amd_iommu: Fix device setup failure when PT is on Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 03/31] hw/i386/amd_iommu: Fix xtsup when vcpus < 255 Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 04/31] pcie: Add helper to declare PASID capability for a pcie device Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 05/31] pcie: Helper functions to check if PASID is enabled Michael S. Tsirkin
2025-06-01 15:24 ` [PULL 06/31] pcie: Helper function to check if ATS " Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 07/31] pcie: Add a helper to declare the PRI capability for a pcie device Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 08/31] pcie: Helper functions to check to check if PRI is enabled Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 09/31] pci: Cache the bus mastering status in the device Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 10/31] pci: Add an API to get IOMMU's min page size and virtual address width Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 11/31] memory: Store user data pointer in the IOMMU notifiers Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 12/31] pci: Add a pci-level initialization function for " Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 13/31] pci: Add a pci-level API for ATS Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 14/31] pci: Add a PCI-level API for PRI Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 15/31] uefi-test-tools:: Add LoongArch64 support Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 16/31] tests/data/uefi-boot-images: Add ISO image for LoongArch system Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 17/31] tests/qtest/bios-tables-test: Use MiB macro rather hardcode value Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 18/31] tests/acpi: Add empty ACPI data files for LoongArch Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 19/31] tests/qtest/bios-tables-test: Add basic testing " Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 20/31] rebuild-expected-aml.sh: Add support " Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 21/31] tests/acpi: Fill acpi table data " Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 22/31] tests/acpi: Remove stale allowed tables Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 23/31] vhost: Don't set vring call if guest notifier is unused Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 24/31] vdpa: check for iova tree initialized at net_client_start Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 25/31] vdpa: reorder vhost_vdpa_set_backend_cap Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 26/31] vdpa: set backend capabilities at vhost_vdpa_init Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 27/31] vdpa: add listener_registered Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 28/31] vdpa: reorder listener assignment Michael S. Tsirkin
2025-06-01 15:25 ` [PULL 29/31] vdpa: move iova_tree allocation to net_vhost_vdpa_init Michael S. Tsirkin
2025-06-01 15:26 ` [PULL 30/31] vdpa: move memory listener register to vhost_vdpa_init Michael S. Tsirkin
2025-06-01 15:26 ` [PULL 31/31] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine Michael S. Tsirkin
2025-06-02 8:39 ` [PULL 00/31] virtio,pci,pc: features, fixes, tests Michael S. Tsirkin
2025-06-02 16:39 ` Stefan Hajnoczi
2025-06-02 17:54 ` Michael S. Tsirkin
2025-06-02 18:25 ` Stefan Hajnoczi
2025-06-02 18:31 ` Michael S. Tsirkin
2025-06-02 21:58 ` Michael S. Tsirkin
2025-06-02 22:27 ` Stefan Hajnoczi
2025-06-03 1:09 ` Bibo Mao
2025-06-02 20:43 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).