From: Anthony PERARD Subject: [PATCH] libxl: No emulated disk driver for xvdX disk Date: Wed, 14 Oct 2015 12:05:17 +0100 Message-ID: <1444820717-25565-1-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Anthony PERARD , Wei Liu , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 --- tools/libxl/libxl_dm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 71a1a3e..5371f72 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1190,6 +1190,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc, drive = libxl__sprintf (gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback", 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 < 6 && b_info->u.hvm.hdtype == LIBXL_HDTYPE_AHCI) { flexarray_vappend(dm_args, "-drive", GCSPRINTF("file=%s,if=none,id=ahcidisk-%d,format=%s,cache=writeback", -- Anthony PERARD