Skip to content

RFC Xen: introduce Xen PV target

Wei Liu 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 RFC Latest6 patches 5 repliesIn review
  2. v1 RFC5 patches 26 repliesSuperseded

Changes in v2 from the cover letter

* more refactoring
* include Paolo's patch to factor out list of Xen / KVM targets

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6configure: factor out list of supported Xen/KVM targetsconfigure+35 -230 replies
2/6xen: move Xen PV machine files to hw/xenpvhw/i386/Makefile.objs hw/xenpv/Makefile.objs hw/xenpv/xen_domainbuild.c +2 more+3 -10 replies
2/6xen: move Xen PV machine files to hw/xenpvhw/i386/Makefile.objs hw/xenpv/Makefile.objs hw/xenpv/xen_domainbuild.c +2 more+3 -10 replies
3/6xen: move Xen HVM files under hw/i386/xenhw/i386/Makefile.objs hw/i386/xen/Makefile.objs hw/i386/xen/xen_apic.c +3 more+2 -20 replies
3/6xen: move Xen HVM files under hw/i386/xenhw/i386/Makefile.objs hw/i386/xen/Makefile.objs hw/i386/xen/xen_apic.c +3 more+2 -20 replies
4/6xen: factor out common functionsMakefile.target xen-common-stub.c xen-common.c +3 more+203 -1230 replies
5/6xen: implement Xen PV targetarch_init.c cpu-exec.c include/sysemu/arch_init.h +6 more+195 -00 replies
6/6xen: introduce xenpv-softmmu.makconfigure default-configs/xenpv-softmmu.mak+7 -20 replies
6/6xen: introduce xenpv-softmmu.makconfigure default-configs/xenpv-softmmu.mak+7 -25 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH RFC V2 0/6] Xen: introduce Xen PV target

This is a prototype based on QEMU's master branch. In fact it's more or less the same as the last version.

The first 3 patches refactor some code to disentangle Xen PV and HVM guest in QEMU. They are quite safe to go in.

The 4th patch has the real meat. It introduces Xen PV target, which contains basically a dummy CPU, then hooks up this Xen PV CPU to QEMU internal structures.

The last patch introduces xenpv-softmmu, which contains *no* emulation code. I know that in previous discussion people said that every device emulation should be included if the target architecture is called null. But since this target CPU is now called xenpv I don't feel obliged to include any device emulation in this prototype anymore. :-)

Please note that the existing Xen QEMU build is not affected at all. You can still use "--enable-xen --target-list=i386-softmmu" (or x86_64-softmmu") to build qemu-system-{i386,x86_64} and use it for both HVM and PV guest. This series adds another option to build QEMU with "--enable-xen --target-list=xenpv-softmmu" and get a QEMU binary tailored for Xen PV guest. The effect is that we reduce the binary size from 14MB to 7.3MB.

Wei.

Changes in RFC V2:
* more refactoring
* include Paolo's patch to factor out list of Xen / KVM targets

Paolo Bonzini (1):
configure: factor out list of supported Xen/KVM targets

Wei Liu (5):
xen: move Xen PV machine files to hw/xenpv
xen: move Xen HVM files under hw/i386/xen
xen: factor out common functions
xen: implement Xen PV target
xen: introduce xenpv-softmmu.mak

 Makefile.target                      |    6 +-
 arch_init.c                          |    2 +
 configure                            |   61 ++++++++++-------
 cpu-exec.c                           |    2 +
 default-configs/xenpv-softmmu.mak    |    2 +
 hw/i386/Makefile.objs                |    2 +-
 hw/i386/xen/Makefile.objs            |    1 +
 hw/{ => i386}/xen/xen_apic.c         |    0
 hw/{ => i386}/xen/xen_platform.c     |    0
 hw/{ => i386}/xen/xen_pvdevice.c     |    0
 hw/xen/Makefile.objs                 |    1 -
 hw/xenpv/Makefile.objs               |    2 +
 hw/{i386 => xenpv}/xen_domainbuild.c |    0
 hw/{i386 => xenpv}/xen_domainbuild.h |    0
 hw/{i386 => xenpv}/xen_machine_pv.c  |    0
 include/sysemu/arch_init.h           |    1 +
 target-xenpv/Makefile.objs           |    1 +
 target-xenpv/cpu-qom.h               |   64 ++++++++++++++++++
 target-xenpv/cpu.h                   |   66 ++++++++++++++++++
 target-xenpv/helper.c                |   32 +++++++++
 target-xenpv/translate.c             |   27 ++++++++
 xen-common-stub.c                    |   19 ++++++
 xen-common.c                         |  123 ++++++++++++++++++++++++++++++++++
 xen-stub.c => xen-hvm-stub.c         |   18 ++---
 xen-all.c => xen-hvm.c               |  121 +++------------------------------
 xen-mapcache-stub.c                  |   39 +++++++++++
 26 files changed, 442 insertions(+), 148 deletions(-)
 create mode 100644 default-configs/xenpv-softmmu.mak
 create mode 100644 hw/i386/xen/Makefile.objs
 rename hw/{ => i386}/xen/xen_apic.c (100%)
 rename hw/{ => i386}/xen/xen_platform.c (100%)
 rename hw/{ => i386}/xen/xen_pvdevice.c (100%)
 create mode 100644 hw/xenpv/Makefile.objs
 rename hw/{i386 => xenpv}/xen_domainbuild.c (100%)
 rename hw/{i386 => xenpv}/xen_domainbuild.h (100%)
 rename hw/{i386 => xenpv}/xen_machine_pv.c (100%)
 create mode 100644 target-xenpv/Makefile.objs
 create mode 100644 target-xenpv/cpu-qom.h
 create mode 100644 target-xenpv/cpu.h
 create mode 100644 target-xenpv/helper.c
 create mode 100644 target-xenpv/helper.h
 create mode 100644 target-xenpv/translate.c
 create mode 100644 xen-common-stub.c
 create mode 100644 xen-common.c
 rename xen-stub.c => xen-hvm-stub.c (91%)
 rename xen-all.c => xen-hvm.c (93%)
 create mode 100644 xen-mapcache-stub.c
Signature · 1 line
1.7.10.4