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

ioemu: Re-enable guest boot with blktap devices ([Xen-devel] Weekly VMX

To: haicheng.li@xxxxxxxxx, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: ioemu: Re-enable guest boot with blktap devices ([Xen-devel] Weekly VMX status report. Xen: #18577 & Xen0: #696)
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Tue, 14 Oct 2008 13:04:29 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 13 Oct 2008 21:05:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <76780B19A496DC4B80439008DAD7076C01ACDF710F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <76780B19A496DC4B80439008DAD7076C01ACDF710F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)
Li, Haicheng wrote:
Our testing was blocke by bug #1367; and totally 2 new issues were found this 
week,

New Bugs:
=====================================================================
1. [Qcow]Guest cannot boot up with Qcow image
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1367

Bug #1367 looks caused by the xenstore path checking code recently added
to ioemu-remote. I saw the same problem and found that the code didn't
consider the case blktap devices were attached to the guest. The patch
below should avoid the problem.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>

diff --git a/xenstore.c b/xenstore.c
index f5aa8a7..39ff8a6 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -158,6 +158,7 @@ static void xenstore_get_backend_path(char **backend, const char *devtype,
     char *frontend_path=0;
     char *backend_dompath=0;
     char *expected_backend=0;
+    char *expected_devtype=0;
     char *frontend_backend_path=0;
     char *backend_frontend_path=0;
     char *frontend_doublecheck=0;
@@ -191,11 +192,18 @@ static void xenstore_get_backend_path(char **backend, const char *devtype,
     backend_dompath = xs_get_domain_path(xsh, domid_backend);
     if (!backend_dompath) goto out;

+    if (pasprintf(&expected_devtype, "%s", devtype) == -1) goto out;
+
+ again:
     if (pasprintf(&expected_backend, "%s/backend/%s/%lu/%s",
-                  backend_dompath, devtype, frontend_domid, inst_danger)
+ backend_dompath, expected_devtype, frontend_domid, inst_danger)
         == -1) goto out;

     if (strcmp(bpath, expected_backend)) {
+        if (!strcmp(expected_devtype, "vbd")) {
+            pasprintf(&expected_devtype, "tap");
+            goto again;
+        }
         fprintf(stderr, "frontend `%s' expected backend `%s' got `%s',"
                 " ignoring\n", frontend_path, expected_backend, bpath);
         errno = EINVAL;
@@ -223,6 +231,7 @@ static void xenstore_get_backend_path(char **backend, const char *devtype,
     free(frontend_path);
     free(backend_dompath);
     free(expected_backend);
+    free(expected_devtype);
     free(frontend_backend_path);
     free(backend_frontend_path);
     free(frontend_doublecheck);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel