File 5628fc67-libxl-No-emulated-disk-driver-for-xvdX-disk.patch of Package xen.1589

commit c0c099d157cc5bc942afef766cf141628a6380a1
Author: Anthony PERARD <anthony.perard@citrix.com>
Date:   Wed Oct 14 12:05:17 2015 +0100

    libxl: No emulated disk driver for xvdX disk
    
    When a guest configuration list xvdX for its disks, there is no need to
    provide an emulated driver for the same target.
    
    Such configuration can work with the OVMF firmware, as it supports PV
    disk.
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Index: xen-4.4.3-testing/tools/libxl/libxl_dm.c
===================================================================
--- xen-4.4.3-testing.orig/tools/libxl/libxl_dm.c
+++ xen-4.4.3-testing/tools/libxl/libxl_dm.c
@@ -771,6 +771,12 @@ static char ** libxl__build_device_model
                     drive = libxl__sprintf
                         (gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback",
                          disks[i].pdev_path, disk, format);
+                else if (strncmp(disks[i].vdev, "xvd", 3) == 0)
+                    /*
+                     * Do not add any emulated disk when PV disk are
+                     * explicitly asked for.
+                     */
+                    continue;
                 else if (disk < 4)
                     drive = libxl__sprintf
                         (gc, "file=%s,if=ide,index=%d,media=disk,format=%s,cache=writeback",
openSUSE Build Service is sponsored by