[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH 00/15] RFC xen device model support



Hi Stefano/Anthony,

On 08/12/2010 09:08 AM, Stefano Stabellini wrote:
Hi all,
this is the long awaited patch series to add xen device model support in
qemu; the main author is Anthony Perard.

Thanks for sending this out. Overall, the series looks pretty good. I think there's just a couple issues we need to address to get it into a mergable state.

We definitely need to resolve the various CODING_STYLE issues.

We should limit XenStore interactions to strictly be device model setup. Any management operations should be done through QMP. The main reason to take this approach is to ensure that we don't end up with a more powerful interface via xenstore verses QMP or vice versa.

The target changes are probably the most contentious. Fortunately, we have a very similar set of goals with KVM so I think we'll be able to come up with a common solution to the problem.

Regards,

Anthony Liguori

Developing this series we tried to come up with the cleanest possible
solution from the qemu point of view, limiting the amount of changes to
common code as much as possible. The end result still requires a couple
of hooks in piix_pci but overall the impact should be very limited.
The current series gives you an upstream qemu device model able to boot
a Linux or a Windows HVM guest; some features are still missing
compared to the current qemu-xen, among which vga dirty bits, pci
passthrough and stubdomain support.

For any of you that want to try it, this is the step by step guide:

- clone a fresh copy of xen-unstable.hg, make and install;
note that the xen-unstable make system will clone a linux tree and a
qemu-xen tree by default: you can avoid the former just executing 'make
xen' and 'make tools' instead of 'make world';

- configure qemu using xen-dm-softmmu as target and extra-ldflags and
extra-cflags pointing at the xen-unstable build directory, something
like this should work:

./configure --target-list=xen-dm-softmmu 
--extra-cflags="-I$HOME/xen-unstable/dist/install/usr/include" 
--extra-ldflags="-L$HOME/xen-unstable/dist/install/usr/lib" --enable-xen

- build qemu and install the newly compiled binary
(xen-dm-softmmu/qemu-system-xen);

- edit your VM config file and modify device_model to point at it.


Currently only xl (not xend) knows how to spawn the new qemu device model
with the right command line options.
As you can see the build and test procedures are not straightforward
yet, but in the near future we plan to provide a way to select an
upstream qemu tree for use as xen device model directly from the
xen-unstable build system.

The patch series adds a new target with the whole xen device model
machinery; each patch contains a detailed description.
This is the full list of patches and the diffstat:

Anthony Perard (15):
     xen: Update libxc calls
     xen: Add xen_machine_fv
     xen: Add a new target to qemu: target-xen
     xen: xen_machine_fv, initialize xenstore
     xen: add a 8259 Interrupt Controller
     xen: Add the Xen platform pci device
     xen: handle xenstore events
     xen: Read and write the state of the VM in xenstore
     xen: Initialize event channels and io rings
     xen: Introduce the Xen mapcache
     piix3: introduce register_set_irq and register_map_irq
     piix_pci: introduce a write_config notifier
     vl.c: Introduce getter for shutdown_requested and reset_requested.
     xen: destroy the VM when shutdown is requested

  Makefile.target                    |   31 ++
  arch_init.c                        |    2 +
  arch_init.h                        |    1 +
  configure                          |   12 +-
  default-configs/xen-dm-softmmu.mak |   24 +
  hw/pc.h                            |    4 +
  hw/piix_pci.c                      |   45 ++-
  hw/xen_acpi_piix4.c                |  424 ++++++++++++++++++
  hw/xen_backend.c                   |   10 +-
  hw/xen_backend.h                   |    2 +-
  hw/xen_common.h                    |    6 +
  hw/xen_disk.c                      |   12 +-
  hw/xen_domainbuild.c               |    4 +-
  hw/xen_machine_fv.c                |  234 ++++++++++
  hw/xen_nic.c                       |   16 +-
  hw/xen_platform.c                  |  452 ++++++++++++++++++++
  hw/xen_platform.h                  |    9 +
  sysemu.h                           |    2 +
  target-xen/cpu.h                   |  121 ++++++
  target-xen/exec-dm.c               |  826 ++++++++++++++++++++++++++++++++++++
  target-xen/helper.c                |  455 ++++++++++++++++++++
  target-xen/i8259-xen-stub.c        |   63 +++
  target-xen/qemu-xen.h              |   50 +++
  target-xen/stub-functions.c        |   42 ++
  target-xen/xen_mapcache.c          |  247 +++++++++++
  target-xen/xenstore.c              |  168 ++++++++
  target-xen/xenstore.h              |   12 +
  vl.c                               |   10 +
  28 files changed, 3259 insertions(+), 25 deletions(-)


A git tree is available here:

git://xenbits.xen.org/people/sstabellini/qemu-dm.git

branch name qemu-dm-v1.


We are committed in providing the best solution for both qemu and xen
developers and users communities; we greatly appreciate any help you can
give us to improve the quality of this series, including comments,
critics, suggestions and of course patches :)

Happy Hacking,

Stefano


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.