All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libxl: correct xenstore entry for empty cdrom
@ 2017-02-15 11:11 Juergen Gross
  2017-02-16 13:01 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2017-02-15 11:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

Specifying an empty cdrom device will result in a Xenstore entry

params = aio:(null)

as the physical device path isn't existing. This lets a domain booted
via OVMF hang as OVMF is checking for "aio:" only in order to detect
the empty cdrom case.

Use an empty string for the physical device path in this case. As a
cdrom device for HVM is always backed by qdisk we only need to cover this
backend.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
This is a backport candidate.

V2: rebase to staging
---
 tools/libxl/libxl_disk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c
index ac49df2..63de75c 100644
--- a/tools/libxl/libxl_disk.c
+++ b/tools/libxl/libxl_disk.c
@@ -359,7 +359,8 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
             case LIBXL_DISK_BACKEND_QDISK:
                 flexarray_append(back, "params");
                 flexarray_append(back, GCSPRINTF("%s:%s",
-                              libxl__device_disk_string_of_format(disk->format), disk->pdev_path));
+                              libxl__device_disk_string_of_format(disk->format),
+                              disk->pdev_path ? : ""));
                 if (libxl_defbool_val(disk->colo_enable)) {
                     flexarray_append(back, "colo-host");
                     flexarray_append(back, libxl__sprintf(gc, "%s", disk->colo_host));
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] libxl: correct xenstore entry for empty cdrom
  2017-02-15 11:11 [PATCH v2] libxl: correct xenstore entry for empty cdrom Juergen Gross
@ 2017-02-16 13:01 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2017-02-16 13:01 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, ian.jackson, wei.liu2

On Wed, Feb 15, 2017 at 12:11:12PM +0100, Juergen Gross wrote:
> Specifying an empty cdrom device will result in a Xenstore entry
> 
> params = aio:(null)
> 
> as the physical device path isn't existing. This lets a domain booted
> via OVMF hang as OVMF is checking for "aio:" only in order to detect
> the empty cdrom case.
> 
> Use an empty string for the physical device path in this case. As a
> cdrom device for HVM is always backed by qdisk we only need to cover this
> backend.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---

Acked + applied

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-16 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 11:11 [PATCH v2] libxl: correct xenstore entry for empty cdrom Juergen Gross
2017-02-16 13:01 ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.