Skip to content

hw/xen: Have most of Xen files become target-agnostic

Philippe Mathieu-Daudé kvm qemu-arm qemu-devel xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest19 patches 30 repliesIn review
  2. v110 patches 21 repliesSuperseded

Changes in v2 from the cover letter

- Rework handle_ioreq() patch (Richard)
- Call xen_enabled() and remove various stubs
- Use QEMU_ALIGNED() in xen_blkif header
- Rename ram_memory -> xen_memory
- Have files using Xen API also use its CPPFLAGS
- Add missing license
- Added Avocado tag
- Added R-b tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19tests/avocado: Add 'guest:xen' tag to tests running Xen guesttests/avocado/boot_xen.py tests/avocado/kvm_xen_guest.py+4 -06 replies
2/19sysemu/xen: Forbid using Xen headers in user emulationinclude/sysemu/xen.h+4 -40 replies
3/19sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLEinclude/sysemu/xen-mapcache.h+2 -10 replies
4/19system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'system/physmem.c+1 -12 replies
5/19hw/display: Restrict xen_register_framebuffer() call to Xenhw/display/vga.c+4 -11 reply
6/19hw/pci/msi: Restrict xen_is_pirq_msi() call to Xenhw/pci/msi.c+2 -15 replies
7/19hw/xen: Remove unnecessary xen_hvm_inject_msi() stubstubs/xen-hw-stub.c+0 -41 reply
8/19hw/xen: Remove unused Xen stubsstubs/xen-hw-stub.c+0 -241 reply
9/19hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragmahw/block/xen_blkif.h+3 -53 replies
10/19hw/xen: Rename 'ram_memory' global variable as 'xen_memory'hw/arm/xen_arm.c hw/i386/xen/xen-hvm.c hw/xen/xen-hvm-common.c +1 more+12 -122 replies
11/19hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefixhw/arm/xen_arm.c hw/i386/xen/xen-hvm.c hw/xen/xen-hvm-common.c +2 more+11 -111 reply
12/19hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'hw/arm/xen_arm.c hw/i386/xen/xen-hvm.c hw/xen/xen-hvm-common.c +4 more+6 -281 reply
13/19hw/xen: Remove use of 'target_ulong' in handle_ioreq()hw/xen/xen-hvm-common.c+3 -32 replies
14/19hw/xen: Use target-agnostic qemu_target_page_bits()hw/xen/xen-hvm-common.c+4 -20 replies
15/19hw/xen: Reduce inclusion of 'cpu.h' to target-specific sourceshw/arm/xen_arm.c hw/i386/xen/xen-hvm.c include/hw/xen/xen-hvm-common.h+2 -11 reply
16/19hw/xen/xen_pt: Add missing licensehw/xen/xen_pt.h+10 -02 replies
17/19hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'accel/xen/xen-all.c hw/i386/pc_piix.c hw/xen/xen_pt.c +5 more+42 -180 replies
18/19hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGShw/i386/xen/meson.build+3 -11 reply
19/19hw/xen: Have most of Xen files become target-agnosticaccel/xen/meson.build hw/block/dataplane/meson.build hw/xen/meson.build+12 -131 reply

Reviews trailers per patch

16 of 19 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonDavid WoodhouseDavid HildenbrandAnthony PERARD
1/19R-b
2/19R-b R-b
3/19R-b
4/19R-b R-b
5/19R-b
6/19R-b
7/19R-b
8/19
9/19
10/19R-b
11/19R-b R-b A-b
12/19R-b R-b A-b
13/19R-b
14/19R-b R-b
15/19R-b R-b A-b
16/19R-b A-b
17/19R-b
18/19R-b
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH-for-9.0 v2 00/19] hw/xen: Have most of Xen files become target-agnostic

Missing review: 4-10,13,16,18-19

Since v1:
- Rework handle_ioreq() patch (Richard)
- Call xen_enabled() and remove various stubs
- Use QEMU_ALIGNED() in xen_blkif header
- Rename ram_memory -> xen_memory
- Have files using Xen API also use its CPPFLAGS
- Add missing license
- Added Avocado tag
- Added R-b tags

Hi,

After discussing with Alex Bennée I realized most Xen code should be target-agnostic. David Woodhouse confirmed that last week, so I had a quick look and here is the result.

More work is required to be able to instanciate Xen HW in an heterogeneous machine, but this doesn't make sense yet until we can run multiple accelerators concurrently.

Tested running on x86_64/aarch64 Linux hosts:

  $ make check-avocado AVOCADO_TAGS='guest:xen'

Regards,

Phil.

Philippe Mathieu-Daudé (19):
tests/avocado: Add 'guest:xen' tag to tests running Xen guest sysemu/xen: Forbid using Xen headers in user emulation sysemu/xen-mapcache: Check Xen availability with
CONFIG_XEN_IS_POSSIBLE
system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h' hw/display: Restrict xen_register_framebuffer() call to Xen hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen hw/xen: Remove unnecessary xen_hvm_inject_msi() stub hw/xen: Remove unused Xen stubs
hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of
#pragma
hw/xen: Rename 'ram_memory' global variable as 'xen_memory' hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h' hw/xen: Remove use of 'target_ulong' in handle_ioreq() hw/xen: Use target-agnostic qemu_target_page_bits() hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources hw/xen/xen_pt: Add missing license
hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS hw/xen: Have most of Xen files become target-agnostic

 hw/block/xen_blkif.h            |  8 +++-----
 hw/xen/xen_pt.h                 | 24 ++++++++++--------------
 include/hw/arm/xen_arch_hvm.h   |  9 ---------
 include/hw/i386/xen_arch_hvm.h  | 11 -----------
 include/hw/xen/arch_hvm.h       |  5 -----
 include/hw/xen/xen-hvm-common.h |  9 +++++++--
 include/hw/xen/xen_igd.h        | 33 +++++++++++++++++++++++++++++++++
 include/sysemu/xen-mapcache.h   |  3 ++-
 include/sysemu/xen.h            |  8 ++++----
 accel/xen/xen-all.c             |  1 +
 hw/arm/xen_arm.c                | 12 ++++++------
 hw/display/vga.c                |  5 ++++-
 hw/i386/pc_piix.c               |  1 +
 hw/i386/xen/xen-hvm.c           | 18 +++++++++---------
 hw/pci/msi.c                    |  3 ++-
 hw/xen/xen-hvm-common.c         | 23 ++++++++++++-----------
 hw/xen/xen_pt.c                 |  3 ++-
 hw/xen/xen_pt_config_init.c     |  3 ++-
 hw/xen/xen_pt_graphics.c        |  3 ++-
 hw/xen/xen_pt_stub.c            |  2 +-
 stubs/xen-hw-stub.c             | 28 ----------------------------
 system/physmem.c                |  2 +-
 accel/xen/meson.build           |  2 +-
 hw/block/dataplane/meson.build  |  2 +-
 hw/i386/xen/meson.build         |  4 +++-
 hw/xen/meson.build              | 21 ++++++++++-----------
 tests/avocado/boot_xen.py       |  3 +++
 tests/avocado/kvm_xen_guest.py  |  1 +
 28 files changed, 121 insertions(+), 126 deletions(-)
 delete mode 100644 include/hw/arm/xen_arch_hvm.h
 delete mode 100644 include/hw/i386/xen_arch_hvm.h
 delete mode 100644 include/hw/xen/arch_hvm.h
 create mode 100644 include/hw/xen/xen_igd.h
Signature · 1 line
2.41.0