Skip to contentSkip to conversation

xen: Build fixes and dust removal

PATCH In review Philippe Mathieu-Daudé 3 participants 17 messages Feb 18, 2025 – Mar 3, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover xen: Build fixes and dust removal

Hi,

While preparing another pull request I wanted to run my changes with Xen and failed at testing on a 32-bit ARM host. Apparently the config isn't used (at least we don't test it at all since more than 4 years). Therefore I'm directly dropping it. The rest are #include and Kconfig cleanups.

Regards,

Phil.

Philippe Mathieu-Daudé (8):
accel/Kconfig: Link XenPVH with GPEX PCIe bridge hw/arm: Do not expose the virt machine on Xen-only binary hw/arm/xen-pvh: Do not allow specifying any CPU type hw/xen/xen-pvh: Reduce included headers hw/xen/xen-hvm: Reduce included headers hw/xen/xen-bus: Reduce included headers hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header
meson: Remove support for Xen on 32-bit ARM hosts

 docs/about/removed-features.rst     |  5 +++++
 meson.build                         |  3 ---
 include/hw/xen/xen-bus.h            |  3 ++-
 include/hw/xen/xen-hvm-common.h     | 14 +++-----------
 include/hw/xen/xen-legacy-backend.h |  1 -
 include/hw/xen/xen-pvh-common.h     |  8 ++++----
 hw/arm/xen-pvh.c                    |  2 ++
 hw/arm/xen-stubs.c                  |  5 ++---
 hw/i386/xen/xen-hvm.c               |  5 +++++
 hw/i386/xen/xen-pvh.c               |  1 +
 hw/xen/xen-hvm-common.c             |  6 ++++++
 hw/xen/xen-pvh-common.c             |  6 ++----
 accel/Kconfig                       |  1 +
 hw/arm/Kconfig                      |  1 +
 14 files changed, 34 insertions(+), 27 deletions(-)
Signature · 1 line
2.47.1
#1 lore raw

PATCH 1/8 accel/Kconfig: Link XenPVH with GPEX PCIe bridge

XenPVH requires the PCIe/GPEX device. Add it to Kconfig to avoid when configuring using --without-default-devices:

/usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-pvh-common.c.o: in function `xenpvh_gpex_init':
hw/xen/xen-pvh-common.c:174: undefined reference to `gpex_set_irq_num'
/usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-hvm-common.c.o: in function `pci_dev_bus_num':
include/hw/pci/pci.h:337: undefined reference to `pci_bus_num'
/usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to pci_bus_num' /usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to pci_bus_num' /usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to pci_bus_num' /usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to pci_bus_num' /usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-hvm-common.c.o: in function `cpu_ioreq_config':
hw/xen/xen-hvm-common.c:412: undefined reference to pci_host_config_read_common' /usr/bin/ld: hw/xen/xen-hvm-common.c:428: undefined reference to pci_host_config_read_common' /usr/bin/ld: hw/xen/xen-hvm-common.c:438: undefined reference to `pci_host_config_write_common'

Fixes f22e598a72c ("hw/xen: pvh-common: Add support for creating PCIe/GPEX")
---
 accel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
accel/Kconfig +1 -0
index 794e0d18d21..4263cab7227 100644
@@ -16,4 +16,5 @@ config KVM
 config XEN
     bool
     select FSDEV_9P if VIRTFS
+    select PCI_EXPRESS_GENERIC_BRIDGE
     select XEN_BUS
Signature · 1 line
2.47.1
Reviewed-by on v1 1/8
#2 lore raw

Re: [PATCH 1/8] accel/Kconfig: Link XenPVH with GPEX PCIe bridge

Quoted 26 lines · Philippe Mathieu-Daudé

XenPVH requires the PCIe/GPEX device. Add it to Kconfig to avoid when configuring using --without-default-devices:

/usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-pvh-common.c.o: in
function `xenpvh_gpex_init':
hw/xen/xen-pvh-common.c:174: undefined reference to `gpex_set_irq_num' /usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-hvm-common.c.o: in
function `pci_dev_bus_num':
include/hw/pci/pci.h:337: undefined reference to `pci_bus_num' /usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to
`pci_bus_num'
/usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to
`pci_bus_num'
/usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to
`pci_bus_num'
/usr/bin/ld: include/hw/pci/pci.h:337: undefined reference to
`pci_bus_num'
/usr/bin/ld: libqemu-aarch64-softmmu.a.p/hw_xen_xen-hvm-common.c.o: in
function `cpu_ioreq_config':
hw/xen/xen-hvm-common.c:412: undefined reference to
`pci_host_config_read_common'
/usr/bin/ld: hw/xen/xen-hvm-common.c:428: undefined reference to
`pci_host_config_read_common'
/usr/bin/ld: hw/xen/xen-hvm-common.c:438: undefined reference to
`pci_host_config_write_common'

Quoted 4 lines
Fixes f22e598a72c ("hw/xen: pvh-common: Add support for creating

PCIe/GPEX")

Quoted 18 lines
---
 accel/Kconfig | 1 +
 1 file changed, 1 insertion(+)
accel/Kconfig +1 -1
index 794e0d18d21..4263cab7227 100644
@@ -16,4 +16,5 @@ config KVM
 config XEN
     bool
     select FSDEV_9P if VIRTFS
+    select PCI_EXPRESS_GENERIC_BRIDGE
     select XEN_BUS
--

2.47.1

#3 lore raw

PATCH 2/8 hw/arm: Do not expose the virt machine on Xen-only binary

In reply to Philippe Mathieu-Daudé

Since the Virt machine is useless under Xen, do not even try to build it there.
A Xen-only binary now only offers the XenPVH machine:

  $ qemu-system-aarch64 -M help
  Supported machines are:
  none                 empty machine
  xenpvh               Xen PVH ARM machine
---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/arm/Kconfig +1 -0
index 256013ca808..e5f4b1d84d3 100644
@@ -2,6 +2,7 @@ config ARM_VIRT
     bool
     default y
     depends on ARM
+    depends on TCG || KVM || HVF
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VFIO_AMD_XGBE
Signature · 1 line
2.47.1
Reviewed-by on v1 2/8
#4 lore raw

Re: [PATCH 2/8] hw/arm: Do not expose the virt machine on Xen-only binary

Quoted 10 lines · Philippe Mathieu-Daudé

Since the Virt machine is useless under Xen, do not even try to build it there.
A Xen-only binary now only offers the XenPVH machine:

  $ qemu-system-aarch64 -M help
  Supported machines are:
  none                 empty machine
  xenpvh               Xen PVH ARM machine

Makes sense to me.

Quoted 21 lines
---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/arm/Kconfig +1 -1
index 256013ca808..e5f4b1d84d3 100644
@@ -2,6 +2,7 @@ config ARM_VIRT
     bool
     default y
     depends on ARM
+    depends on TCG || KVM || HVF
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VFIO_AMD_XGBE
--

2.47.1

#5 lore raw

PATCH 3/8 hw/arm/xen-pvh: Do not allow specifying any CPU type

In reply to Philippe Mathieu-Daudé

No CPU can be selected by the PHV machine.

---
 hw/arm/xen-pvh.c | 2 ++
 1 file changed, 2 insertions(+)
hw/arm/xen-pvh.c +2 -0
index d1509bd235d..2557d520307 100644
@@ -53,6 +53,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
 {
     XenPVHMachineClass *xpc = XEN_PVH_MACHINE_CLASS(oc);
     MachineClass *mc = MACHINE_CLASS(oc);
+    static const char * const valid_cpu_types[] = { NULL };
 
     mc->desc = "Xen PVH ARM machine";
 
@@ -75,6 +76,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
      * mc->max_cpus, QEMU will bail out with an error message.
      */
     mc->max_cpus = GUEST_MAX_VCPUS;
+    mc->valid_cpu_types = valid_cpu_types;
 
     /* Xen/ARM does not use buffered IOREQs.  */
     xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
Signature · 1 line
2.47.1
#6 lore raw

PATCH 4/8 hw/xen/xen-pvh: Reduce included headers

In reply to Philippe Mathieu-Daudé

Have "hw/xen/xen-pvh-common.h" include the bare minimal set of headers. Adapt sources to avoid errors when refactoring unrelated headers such:

hw/i386/xen/xen-pvh.c: In function ‘xen_pvh_machine_class_init’:
hw/i386/xen/xen-pvh.c:84:28: error: ‘TARGET_DEFAULT_CPU_TYPE’ undeclared (first use in this function)
84 | mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
| ^~~~~~~~~~~~~~~~~~~~~~~
hw/xen/xen-pvh-common.c: In function ‘xen_pvh_init’:
hw/xen/xen-pvh-common.c:217:43: error: ‘MiB’ undeclared (first use in this function)
217 | if (s->cfg.pci_ecam.size != 256 * MiB) {
| ^~~
hw/xen/xen-hvm-common.c:18:6: error: no previous prototype for ‘xen_mr_is_memory’ [-Werror=missing-prototypes]
18 | bool xen_mr_is_memory(MemoryRegion *mr)
| ^~~~~~~~~~~~~~~~

---
 include/hw/xen/xen-pvh-common.h | 8 ++++----
 hw/i386/xen/xen-pvh.c           | 1 +
 hw/xen/xen-pvh-common.c         | 6 ++----
 3 files changed, 7 insertions(+), 8 deletions(-)
include/hw/xen/xen-pvh-common.h +4 -4
index 5cdd23c2f4d..17c5a58a5a4 100644
@@ -9,11 +9,11 @@
 #ifndef XEN_PVH_COMMON_H__
 #define XEN_PVH_COMMON_H__
 
-#include <assert.h>
-#include "hw/sysbus.h"
-#include "hw/hw.h"
-#include "hw/xen/xen-hvm-common.h"
+#include "exec/memory.h"
+#include "qom/object.h"
+#include "hw/boards.h"
 #include "hw/pci-host/gpex.h"
+#include "hw/xen/xen-hvm-common.h"
 
 #define TYPE_XEN_PVH_MACHINE MACHINE_TYPE_NAME("xen-pvh-base")
 OBJECT_DECLARE_TYPE(XenPVHMachineState, XenPVHMachineClass,
hw/i386/xen/xen-pvh.c +1 -0
index 33c10279763..f6356f2a7ed 100644
@@ -14,6 +14,7 @@
 #include "hw/xen/arch_hvm.h"
 #include <xen/hvm/hvm_info_table.h>
 #include "hw/xen/xen-pvh-common.h"
+#include "target/i386/cpu.h"
 
 #define TYPE_XEN_PVH_X86  MACHINE_TYPE_NAME("xenpvh")
 OBJECT_DECLARE_SIMPLE_TYPE(XenPVHx86State, XEN_PVH_X86)
hw/xen/xen-pvh-common.c +2 -4
index 9c21fa858d3..19876ad7e8d 100644
@@ -7,15 +7,13 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu/error-report.h"
-#include "qapi/error.h"
+#include "qemu/units.h"
 #include "qapi/visitor.h"
 #include "hw/boards.h"
 #include "hw/irq.h"
-#include "hw/sysbus.h"
-#include "system/system.h"
 #include "system/tpm.h"
 #include "system/tpm_backend.h"
+#include "system/runstate.h"
 #include "hw/xen/xen-pvh-common.h"
 #include "trace.h"
 
Signature · 1 line
2.47.1
Reviewed-by on v1 4/8
#7 lore raw

Re: [PATCH 4/8] hw/xen/xen-pvh: Reduce included headers

Quoted 4 lines · Philippe Mathieu-Daudé

Have "hw/xen/xen-pvh-common.h" include the bare minimal set of headers. Adapt sources to avoid errors when refactoring unrelated headers such:

Quoted 16 lines

hw/i386/xen/xen-pvh.c: In function ‘xen_pvh_machine_class_init’:
hw/i386/xen/xen-pvh.c:84:28: error: ‘TARGET_DEFAULT_CPU_TYPE’
undeclared (first use in this function)
84 | mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
| ^~~~~~~~~~~~~~~~~~~~~~~
hw/xen/xen-pvh-common.c: In function ‘xen_pvh_init’:
hw/xen/xen-pvh-common.c:217:43: error: ‘MiB’ undeclared (first use in
this function)
217 | if (s->cfg.pci_ecam.size != 256 * MiB) {
| ^~~
hw/xen/xen-hvm-common.c:18:6: error: no previous prototype for
‘xen_mr_is_memory’ [-Werror=missing-prototypes]
18 | bool xen_mr_is_memory(MemoryRegion *mr)
| ^~~~~~~~~~~~~~~~

Quoted 66 lines
---
 include/hw/xen/xen-pvh-common.h | 8 ++++----
 hw/i386/xen/xen-pvh.c           | 1 +
 hw/xen/xen-pvh-common.c         | 6 ++----
 3 files changed, 7 insertions(+), 8 deletions(-)
include/hw/xen/xen-pvh-common.h +4 -4
index 5cdd23c2f4d..17c5a58a5a4 100644
@@ -9,11 +9,11 @@
 #ifndef XEN_PVH_COMMON_H__
 #define XEN_PVH_COMMON_H__
 
-#include <assert.h>
-#include "hw/sysbus.h"
-#include "hw/hw.h"
-#include "hw/xen/xen-hvm-common.h"
+#include "exec/memory.h"
+#include "qom/object.h"
+#include "hw/boards.h"
 #include "hw/pci-host/gpex.h"
+#include "hw/xen/xen-hvm-common.h"
 
 #define TYPE_XEN_PVH_MACHINE MACHINE_TYPE_NAME("xen-pvh-base")
 OBJECT_DECLARE_TYPE(XenPVHMachineState, XenPVHMachineClass,
hw/i386/xen/xen-pvh.c +1 -0
index 33c10279763..f6356f2a7ed 100644
@@ -14,6 +14,7 @@
 #include "hw/xen/arch_hvm.h"
 #include <xen/hvm/hvm_info_table.h>
 #include "hw/xen/xen-pvh-common.h"
+#include "target/i386/cpu.h"
 
 #define TYPE_XEN_PVH_X86  MACHINE_TYPE_NAME("xenpvh")
 OBJECT_DECLARE_SIMPLE_TYPE(XenPVHx86State, XEN_PVH_X86)
hw/xen/xen-pvh-common.c +2 -5
index 9c21fa858d3..19876ad7e8d 100644
@@ -7,15 +7,13 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu/error-report.h"
-#include "qapi/error.h"
+#include "qemu/units.h"
 #include "qapi/visitor.h"
 #include "hw/boards.h"
 #include "hw/irq.h"
-#include "hw/sysbus.h"
-#include "system/system.h"
 #include "system/tpm.h"
 #include "system/tpm_backend.h"
+#include "system/runstate.h"
 #include "hw/xen/xen-pvh-common.h"
 #include "trace.h"
 
--

2.47.1

#8 lore raw

PATCH 5/8 hw/xen/xen-hvm: Reduce included headers

In reply to Philippe Mathieu-Daudé

Have "hw/xen/xen-hvm-common.h" include the bare minimal set of headers. Adapt sources to avoid errors when refactoring unrelated headers such:

include/hw/xen/xen-hvm-common.h:71:5: error: unknown type name ‘xenevtchn_handle’

     71 |     xenevtchn_handle *xce_handle;
        |     ^~~~~~~~~~~~~~~~
  hw/xen/xen-hvm-common.c: In function ‘cpu_get_ioreq’:
  hw/xen/xen-hvm-common.c:227:13: error: implicit declaration of function ‘hw_error’
    227 |             hw_error("Fatal error while trying to get io event!\n");
        |             ^~~~~~~~
        |             herror
  hw/xen/xen-hvm-common.c: In function ‘handle_ioreq’:
  hw/xen/xen-hvm-common.c:446:34: error: ‘target_ulong’ undeclared (first use in this function)
    446 |             (req->size < sizeof (target_ulong))) {
        |                                  ^~~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘xen_add_to_physmap’:
  hw/i386/xen/xen-hvm.c:298:22: error: implicit declaration of function ‘xen_replace_cache_entry’
    298 |         uint8_t *p = xen_replace_cache_entry(phys_offset, start_addr, size);
        |                      ^~~~~~~~~~~~~~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘xen_log_global_start’:
  hw/i386/xen/xen-hvm.c:465:9: error: implicit declaration of function ‘xen_enabled’
    465 |     if (xen_enabled()) {
        |         ^~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘regs_to_cpu’:
  hw/i386/xen/xen-hvm.c:487:5: error: unknown type name ‘X86CPU’
    487 |     X86CPU *cpu;
        |     ^~~~~~
  hw/i386/xen/xen-hvm.c:492:15: error: ‘R_EAX’ undeclared (first use in this function)
    492 |     env->regs[R_EAX] = req->data;
        |               ^~~~~
        |               REG_RAX
---
 include/hw/xen/xen-hvm-common.h | 14 +++-----------
 hw/arm/xen-stubs.c              |  5 ++---
 hw/i386/xen/xen-hvm.c           |  5 +++++
 hw/xen/xen-hvm-common.c         |  6 ++++++
 4 files changed, 16 insertions(+), 14 deletions(-)
include/hw/xen/xen-hvm-common.h +3 -11
index c1ea2c0d787..19df5600a39 100644
@@ -1,18 +1,10 @@
 #ifndef HW_XEN_HVM_COMMON_H
 #define HW_XEN_HVM_COMMON_H
 
-#include "qemu/units.h"
-
-#include "cpu.h"
-#include "hw/pci/pci.h"
-#include "hw/hw.h"
+#include "qemu/queue.h"
+#include "exec/hwaddr.h"
 #include "hw/xen/xen_native.h"
-#include "hw/xen/xen-legacy-backend.h"
-#include "system/runstate.h"
-#include "system/system.h"
-#include "system/xen.h"
-#include "system/xen-mapcache.h"
-#include "qemu/error-report.h"
+#include "hw/xen/xen_backend_ops.h"
 #include <xen/hvm/ioreq.h>
 
 extern MemoryRegion xen_memory;
hw/arm/xen-stubs.c +2 -3
index 34beb8b08cb..5551584dc20 100644
@@ -5,10 +5,9 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu/error-report.h"
 #include "qapi/qapi-commands-migration.h"
-#include "hw/boards.h"
-#include "system/system.h"
+#include "system/xen.h"
+#include "hw/hw.h"
 #include "hw/xen/xen-hvm-common.h"
 #include "hw/xen/arch_hvm.h"
 
hw/i386/xen/xen-hvm.c +5 -0
index d3df488c483..67b7c223aee 100644
@@ -14,6 +14,7 @@
 #include "qapi/qapi-commands-migration.h"
 #include "trace.h"
 
+#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/i386/apic-msidef.h"
@@ -24,6 +25,10 @@
 #include "hw/xen/arch_hvm.h"
 #include <xen/hvm/e820.h>
 #include "exec/target_page.h"
+#include "target/i386/cpu.h"
+#include "system/runstate.h"
+#include "system/xen-mapcache.h"
+#include "system/xen.h"
 
 static MemoryRegion ram_640k, ram_lo, ram_hi;
 static MemoryRegion *framebuffer;
hw/xen/xen-hvm-common.c +6 -0
index 7ffbbfea23b..3828105c95e 100644
@@ -1,14 +1,20 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
+#include "exec/target_long.h"
 #include "exec/target_page.h"
 #include "trace.h"
 
+#include "hw/hw.h"
 #include "hw/pci/pci_host.h"
 #include "hw/xen/xen-hvm-common.h"
 #include "hw/xen/xen-bus.h"
 #include "hw/boards.h"
 #include "hw/xen/arch_hvm.h"
+#include "system/runstate.h"
+#include "system/system.h"
+#include "system/xen.h"
+#include "system/xen-mapcache.h"
 
 MemoryRegion xen_memory, xen_grants;
 
Signature · 1 line
2.47.1
Reviewed-by on v1 5/8
#9 lore raw

Re: [PATCH 5/8] hw/xen/xen-hvm: Reduce included headers

Quoted 33 lines · Philippe Mathieu-Daudé

Have "hw/xen/xen-hvm-common.h" include the bare minimal set of headers. Adapt sources to avoid errors when refactoring unrelated headers such:

include/hw/xen/xen-hvm-common.h:71:5: error: unknown type name ‘xenevtchn_handle’

     71 |     xenevtchn_handle *xce_handle;
        |     ^~~~~~~~~~~~~~~~
  hw/xen/xen-hvm-common.c: In function ‘cpu_get_ioreq’:
  hw/xen/xen-hvm-common.c:227:13: error: implicit declaration of function ‘hw_error’
    227 |             hw_error("Fatal error while trying to get io event!\n");
        |             ^~~~~~~~
        |             herror
  hw/xen/xen-hvm-common.c: In function ‘handle_ioreq’:
  hw/xen/xen-hvm-common.c:446:34: error: ‘target_ulong’ undeclared (first use in this function)
    446 |             (req->size < sizeof (target_ulong))) {
        |                                  ^~~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘xen_add_to_physmap’:
  hw/i386/xen/xen-hvm.c:298:22: error: implicit declaration of function ‘xen_replace_cache_entry’
    298 |         uint8_t *p = xen_replace_cache_entry(phys_offset, start_addr, size);
        |                      ^~~~~~~~~~~~~~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘xen_log_global_start’:
  hw/i386/xen/xen-hvm.c:465:9: error: implicit declaration of function ‘xen_enabled’
    465 |     if (xen_enabled()) {
        |         ^~~~~~~~~~~
  hw/i386/xen/xen-hvm.c: In function ‘regs_to_cpu’:
  hw/i386/xen/xen-hvm.c:487:5: error: unknown type name ‘X86CPU’
    487 |     X86CPU *cpu;
        |     ^~~~~~
  hw/i386/xen/xen-hvm.c:492:15: error: ‘R_EAX’ undeclared (first use in this function)
    492 |     env->regs[R_EAX] = req->data;
        |               ^~~~~
        |               REG_RAX
Quoted 1 line

Thanks,

Signature · 1 line
Anthony PERARD
#10 lore raw

PATCH 6/8 hw/xen/xen-bus: Reduce included headers

In reply to Philippe Mathieu-Daudé

Have "hw/xen/xen-bus" include the bare minimal set of headers.

---
 include/hw/xen/xen-bus.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/hw/xen/xen-bus.h +2 -1
index 2adb2af8391..bdbf1ed6fd0 100644
@@ -8,9 +8,10 @@
 #ifndef HW_XEN_BUS_H
 #define HW_XEN_BUS_H
 
+#include "hw/qdev-core.h"
 #include "hw/xen/xen_backend_ops.h"
-#include "hw/sysbus.h"
 #include "qemu/notify.h"
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 typedef struct XenEventChannel XenEventChannel;
Signature · 1 line
2.47.1
#12 lore raw

PATCH 7/8 hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header

In reply to Philippe Mathieu-Daudé
---
 include/hw/xen/xen-legacy-backend.h | 1 -
 1 file changed, 1 deletion(-)
include/hw/xen/xen-legacy-backend.h +0 -1
index e198b120c5d..2d0cbfecade 100644
@@ -3,7 +3,6 @@
 
 #include "hw/xen/xen_backend_ops.h"
 #include "hw/xen/xen_pvdev.h"
-#include "net/net.h"
 #include "qom/object.h"
 
 #define TYPE_XENSYSDEV "xen-sysdev"
Signature · 1 line
2.47.1
#14 lore raw

PATCH 8/8 meson: Remove support for Xen on 32-bit ARM hosts

In reply to Philippe Mathieu-Daudé

Per Stefano:

For ARM 32-bit, I do not think we ever had many deployments, as most are 64-bit. Even when there are deployments, they do not typically use QEMU, as QEMU is less important for Xen on ARM compared to x86.

The QEMU project only test to cross-build Xen on Aarch64 hosts (see 84eda110792 ("gitlab-ci: Add Xen cross-build jobs"). Since 32-bit host aren't tested, simply remove the support there.

[*] https://lore.kernel.org/qemu-devel/alpine.DEB.2.22.394.2502031438170.11632@ubuntu-linux-20-04-desktop/

---
While apparently running Xen on 32-bit hosts isn't straighforward anymore (see [x]), we don't need to remove it ASAP, it is already in the deprecation queue since commit 6d701c9bac1 ("meson:
Deprecate 32-bit host support").

[x] https://lore.kernel.org/qemu-devel/[email protected]/

---
 docs/about/removed-features.rst | 5 +++++
 meson.build                     | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/about/removed-features.rst +5 -0
index c6616ce05e5..f6ea53acc8b 100644
@@ -969,6 +969,11 @@ MIPS "Trap-and-Emulate" KVM support (removed in 8.0)
 The MIPS "Trap-and-Emulate" KVM host and guest support was removed
 from Linux in 2021, and is not supported anymore by QEMU either.
 
+Xen on 32-bit ARM hosts (removed in 10.0)
+'''''''''''''''''''''''''''''''''''''''''
+
+Untested for more than 4 years.
+
 System emulator machines
 ------------------------
 
meson.build +0 -3
index 8ed10b6624e..7b80d8dff09 100644
@@ -308,9 +308,6 @@ if cpu == 'x86'
   xen_targets = ['i386-softmmu']
 elif cpu == 'x86_64'
   xen_targets = ['i386-softmmu', 'x86_64-softmmu']
-elif cpu == 'arm'
-  # i386 emulator provides xenpv machine type for multiple architectures
-  xen_targets = ['i386-softmmu']
 elif cpu == 'aarch64'
   # i386 emulator provides xenpv machine type for multiple architectures
   xen_targets = ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu']
Signature · 1 line
2.47.1
Reviewed-by on v1 8/8
#15 lore raw

Re: [PATCH 8/8] meson: Remove support for Xen on 32-bit ARM hosts

Quoted 30 lines · Philippe Mathieu-Daudé

Per Stefano:

For ARM 32-bit, I do not think we ever had many deployments, as most are 64-bit. Even when there are deployments, they do not typically use QEMU, as QEMU is less important for Xen on ARM compared to x86.

The QEMU project only test to cross-build Xen on Aarch64 hosts (see 84eda110792 ("gitlab-ci: Add Xen cross-build jobs"). Since 32-bit host aren't tested, simply remove the support there.

[*] https://lore.kernel.org/qemu-devel/alpine.DEB.2.22.394.2502031438170.11632@ubuntu-linux-20-04-desktop/

---
While apparently running Xen on 32-bit hosts isn't straighforward anymore (see [x]), we don't need to remove it ASAP, it is already in the deprecation queue since commit 6d701c9bac1 ("meson:
Deprecate 32-bit host support").

[x] https://lore.kernel.org/qemu-devel/[email protected]/

---
 docs/about/removed-features.rst | 5 +++++
 meson.build                     | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)
docs/about/removed-features.rst +0 -0
index c6616ce05e5..f6ea53acc8b 100644

docs/about/removed-features.rst MIPS "Trap-and-Emulate" KVM support (removed in 8.0) · line 975

Quoted 7 lines
docs/about/removed-features.rst +4 -0
@@ -969,6 +969,11 @@ MIPS "Trap-and-Emulate" KVM support (removed in 8.0)
 The MIPS "Trap-and-Emulate" KVM host and guest support was removed
 from Linux in 2021, and is not supported anymore by QEMU either.
 
+Xen on 32-bit ARM hosts (removed in 10.0)
+'''''''''''''''''''''''''''''''''''''''''
+
+Untested for more than 4 years.

Well, not quite, we used to have some test of Xen on armhf hosts (one of arndale or cubietrunk, I don't remember which one we had to stop and never start testing again) until last year, and that included tests with qcow2 disk, so using QEMU.

But that testing infra is gone so the patch is fine:

Cheers,

Signature · 1 line
Anthony PERARD
#16 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

accel/Kconfig: Link XenPVH with GPEX PCIe bridge hw/arm: Do not expose the virt machine on Xen-only binary hw/arm/xen-pvh: Do not allow specifying any CPU type hw/xen/xen-pvh: Reduce included headers hw/xen/xen-hvm: Reduce included headers hw/xen/xen-bus: Reduce included headers hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header
meson: Remove support for Xen on 32-bit ARM hosts

Queuing 1-2, 4-7 as I understand #8 needs rewording, thanks.