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

[libvirt] [PATCH v2 0/4] Xen-PV PyGrub support



When using PyGrub as the boot-loader for Xen-PV domains, Xend passes the first
disk marked as bootable to it. Xend automatically sets this flag to 1 for the
first disk created for a domain.
Until commit c1a98d88255197a8446d08c0b1589861660e9064 the order of disks could
be changed by re-ordering the disk and re-defining the domain. After that patch
the order can only be changed by modifying the disk device names, which are
visible to the Guest OS and thus break mounting devices by device-name.
Changing the device order is needed, since Xen-PV domains don't have a
domain/os/boot BIOS section to change the boot order from CD-ROM to disk.

Patch 1 fixes a bug in the Relax-NG for capabilities, which is not Xen related,
but applies to Qemu, too.

The following patches uses bootIndex to track the order of bootable devices;
non-bootable devices still get reordered by virDomainDiskInsertPreAlloced(),
which should be okay.

The <deviceboot>-capability is added for Xen-PV-domain. I don't know if this is
100% correct, since the bootloader is only ever called with disks, not with
interfaces; marking a interface as bootable wouldn't work.

I've split the change into multiple patches to ease review. It might be better
to commit the last three patches as one, since bi-section is broken otherwise.

Changes since v1:
* explicitly sort disks by bootIndex on XML to S-Expr.
* Add deviceboot capability.

Philipp Hahn (4):
  doc: Add <deviceboot> capability.
  xen: support bootable flag for Xen-PV.
  xen: fix PyGrub device order using boot/@order
  test/xen: PyGrub device order using boot/@order

 docs/schemas/capability.rng                        |    5 ++
 src/xen/xen_hypervisor.c                           |    7 +++
 src/xen/xend_internal.c                            |    4 +-
 src/xenxs/xen_sxpr.c                               |   50 ++++++++++++++++----
 src/xenxs/xen_sxpr.h                               |    2 +-
 tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml      |    1 +
 .../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml  |    1 +
 tests/xencapsdata/xen-i686-pae-hvm.xml             |    1 +
 tests/xencapsdata/xen-i686-pae.xml                 |    1 +
 tests/xencapsdata/xen-i686.xml                     |    1 +
 tests/xencapsdata/xen-ia64-be-hvm.xml              |    1 +
 tests/xencapsdata/xen-ia64-be.xml                  |    1 +
 tests/xencapsdata/xen-ia64-hvm.xml                 |    3 +
 tests/xencapsdata/xen-ia64.xml                     |    3 +
 tests/xencapsdata/xen-ppc64.xml                    |    3 +
 tests/xencapsdata/xen-x86_64-hvm.xml               |    3 +
 tests/xencapsdata/xen-x86_64.xml                   |    3 +
 tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr      |    2 +-
 tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-curmem.sexpr         |    2 +-
 .../xml2sexpr-disk-block-shareable.sexpr           |    2 +-
 tests/xml2sexprdata/xml2sexpr-disk-block.sexpr     |    2 +-
 .../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr |    2 +-
 .../xml2sexpr-disk-drv-blktap-qcow.sexpr           |    2 +-
 .../xml2sexpr-disk-drv-blktap-raw.sexpr            |    2 +-
 .../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr  |    2 +-
 .../xml2sexpr-disk-drv-blktap2-raw.sexpr           |    2 +-
 .../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr |    2 +-
 tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-disk-file.sexpr      |    2 +-
 tests/xml2sexprdata/xml2sexpr-escape.sexpr         |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr  |    2 +-
 .../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr      |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr   |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr   |    2 +-
 .../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr  |    2 +-
 .../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr  |    2 +-
 .../xml2sexpr-fv-serial-dev-2-ports.sexpr          |    2 +-
 .../xml2sexpr-fv-serial-dev-2nd-port.sexpr         |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr  |    2 +-
 .../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr  |    2 +-
 .../xml2sexpr-fv-serial-tcp-telnet.sexpr           |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr       |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr    |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr   |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr         |    2 +-
 tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr          |    4 +-
 tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr   |    4 +-
 tests/xml2sexprdata/xml2sexpr-fv.sexpr             |    2 +-
 tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr    |    2 +-
 tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr      |    2 +-
 tests/xml2sexprdata/xml2sexpr-net-routed.sexpr     |    2 +-
 .../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr  |    4 +-
 tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr       |    2 +-
 .../xml2sexpr-pv-bootloader-cmdline.sexpr          |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr   |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr       |    2 +-
 .../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr  |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr     |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr    |    2 +-
 tests/xml2sexprdata/xml2sexpr-pv.sexpr             |    2 +-
 69 files changed, 132 insertions(+), 68 deletions(-)


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