WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <qemu-devel@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH 00/15] RFC xen device model support
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 12 Aug 2010 15:08:17 +0100
Cc: Anthony.Perard@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Anthony Liguori <anthony@xxxxxxxxxxxxx>
Delivery-date: Thu, 12 Aug 2010 07:08:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
this is the long awaited patch series to add xen device model support in
qemu; the main author is Anthony Perard.
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