]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/xen: xenpvh: Disable buffered IOREQs for ARM
authorEdgar E. Iglesias <edgar.iglesias@amd.com>
Wed, 4 Sep 2024 23:00:36 +0000 (01:00 +0200)
committerEdgar E. Iglesias <edgar.iglesias@amd.com>
Thu, 3 Oct 2024 17:37:35 +0000 (19:37 +0200)
Add a way to enable/disable buffered IOREQs for PVH machines
and disable them for ARM. ARM does not support buffered
IOREQ's nor the legacy way to map IOREQ info pages.

See the following for more details:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=2fbd7e609e1803ac5e5c26e22aa8e4b5a6cddbb1
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/arm/ioreq.c;h=2e829d2e7f3760401b96fa7c930e2015fb1cf463;hb=HEAD#l138

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
hw/arm/xen-pvh.c
hw/i386/xen/xen-pvh.c
hw/xen/xen-pvh-common.c
include/hw/xen/xen-pvh-common.h

index 04cb9855af84b0fa0c71a8fa0059ae3217cce5a0..28af3910ea91874f2b3ea8a897d78167f0cbb585 100644 (file)
@@ -66,6 +66,9 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
      */
     mc->max_cpus = GUEST_MAX_VCPUS;
 
+    /* Xen/ARM does not use buffered IOREQs.  */
+    xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
+
     /* List of supported features known to work on PVH ARM.  */
     xpc->has_tpm = true;
     xpc->has_virtio_mmio = true;
index 45645667e9e9f41f129eb8271e5c4dae376290ee..f1f02d3311886e53d4b6076272056c7caabc7d03 100644 (file)
@@ -89,6 +89,9 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
     /* We have an implementation specific init to create CPU objects.  */
     xpc->init = xen_pvh_init;
 
+    /* Enable buffered IOREQs.  */
+    xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_ATOMIC;
+
     /*
      * PCI INTX routing.
      *
index 08641fdcec8ee68c9c69880b2f61af46c184788f..76a9b2b9458cb10f4dd24b82b23ea7a06fb0cbce 100644 (file)
@@ -195,7 +195,7 @@ static void xen_pvh_init(MachineState *ms)
 
     xen_pvh_init_ram(s, sysmem);
     xen_register_ioreq(&s->ioreq, ms->smp.max_cpus,
-                       HVM_IOREQSRV_BUFIOREQ_ATOMIC,
+                       xpc->handle_bufioreq,
                        &xen_memory_listener);
 
     if (s->cfg.virtio_mmio_num) {
index bc09eea9362fc60008ef5a2e665608fc52eb83cb..5cdd23c2f4d32ace4f919e4b4bd7b11856f53038 100644 (file)
@@ -43,6 +43,9 @@ struct XenPVHMachineClass {
      */
     int (*set_pci_link_route)(uint8_t line, uint8_t irq);
 
+    /* Allow implementations to optionally enable buffered ioreqs.  */
+    uint8_t handle_bufioreq;
+
     /*
      * Each implementation can optionally enable features that it
      * supports and are known to work.