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

[Xen-devel] Some fixes for xen-3.4-testing/xen-unstable



Hi,

I am sending small fixes for
hypervisor and fs-backed.

For details look below.

# HG changeset patch
# User dkiper@xxxxxxxxxxxx
# Date 1266696392 -3600
# Node ID cf24f666046204df7dd3d614dfca66004a40cb6e
# Parent  06911a6d4d3dc3f3b42ec57dcebb715ca15bbb6c
Fix for fs-backend crash when xend
was not started after system boot.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>

diff -r 06911a6d4d3d -r cf24f6660462 tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c        Wed Feb 17 12:16:23 2010 +0000
+++ b/tools/fs-back/fs-backend.c        Sat Feb 20 21:06:32 2010 +0100
@@ -299,7 +299,8 @@ static void await_connections(void)
     LIST_INIT (&mount_requests_head);
 
     assert(xsh != NULL);
-    fd = xenbus_get_watch_fd(); 
+    if ((fd = xenbus_get_watch_fd()) == -1)
+           err(1, "xenbus_get_watch_fd: could not setup watch");
     /* Infinite watch loop */
     do {
        FD_ZERO(&fds);
diff -r 06911a6d4d3d -r cf24f6660462 tools/fs-back/fs-xenbus.c
--- a/tools/fs-back/fs-xenbus.c Wed Feb 17 12:16:23 2010 +0000
+++ b/tools/fs-back/fs-xenbus.c Sat Feb 20 21:06:32 2010 +0100
@@ -105,11 +105,18 @@ int xenbus_get_watch_fd(void)
 int xenbus_get_watch_fd(void)
 {
     int res;
+#if DEBUG
+    int errno_orig;
+#endif
     assert(xsh != NULL);
     res = xs_watch(xsh, WATCH_NODE, "conn-watch");
     if (!res) {
+#if DEBUG
+       errno_orig = errno;
         FS_DEBUG("ERROR: xs_watch %s failed ret=%d errno=%d\n",
                  WATCH_NODE, res, errno);
+       errno = errno_orig;
+#endif
         return -1;
     }
     return xs_fileno(xsh); 

# HG changeset patch
# User dkiper@xxxxxxxxxxxx
# Date 1266696656 -3600
# Node ID eed20588492fb6c512cdd03f05a34035da0e2be0
# Parent  06911a6d4d3dc3f3b42ec57dcebb715ca15bbb6c
Disable memory mapping warnings when stub domain is used.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>

diff -r 06911a6d4d3d -r eed20588492f xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Wed Feb 17 12:16:23 2010 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Sat Feb 20 21:10:56 2010 +0100
@@ -2584,9 +2584,10 @@ int sh_remove_all_mappings(struct vcpu *
     {
         /* Don't complain if we're in HVM and there are some extra mappings: 
          * The qemu helper process has an untyped mapping of this dom's RAM 
-         * and the HVM restore program takes another. */
+         * and the HVM restore program takes another. Additionally, if stub 
domain
+        * is active then it also has an untyped mapping of original dom's RAM. 
*/
         if ( !(shadow_mode_external(v->domain)
-               && (page->count_info & PGC_count_mask) <= 3
+               && (page->count_info & PGC_count_mask) <= 4
                && (page->u.inuse.type_info & PGT_count_mask) == 0) )
         {
             SHADOW_ERROR("can't find all mappings of mfn %lx: "

# HG changeset patch
# User dkiper@xxxxxxxxxxxx
# Date 1266697931 -3600
# Node ID 4e0254d2adefc07b8ad97cd64a5be700a763ad0b
# Parent  b4041e7bbe1b62fab4e3416bbab085b07af57809
Fix for fs-backend crash when xend
was not started after system boot.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>

diff -r b4041e7bbe1b -r 4e0254d2adef tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c        Wed Feb 17 12:11:13 2010 +0000
+++ b/tools/fs-back/fs-backend.c        Sat Feb 20 21:32:11 2010 +0100
@@ -300,7 +300,8 @@ static void await_connections(void)
     LIST_INIT (&mount_requests_head);
 
     assert(xsh != NULL);
-    fd = xenbus_get_watch_fd(); 
+    if ((fd = xenbus_get_watch_fd()) == -1)
+           err(1, "xenbus_get_watch_fd: could not setup watch");
     /* Infinite watch loop */
     do {
        FD_ZERO(&fds);
diff -r b4041e7bbe1b -r 4e0254d2adef tools/fs-back/fs-xenbus.c
--- a/tools/fs-back/fs-xenbus.c Wed Feb 17 12:11:13 2010 +0000
+++ b/tools/fs-back/fs-xenbus.c Sat Feb 20 21:32:11 2010 +0100
@@ -105,11 +105,18 @@ int xenbus_get_watch_fd(void)
 int xenbus_get_watch_fd(void)
 {
     int res;
+#if DEBUG
+    int errno_orig;
+#endif
     assert(xsh != NULL);
     res = xs_watch(xsh, WATCH_NODE, "conn-watch");
     if (!res) {
+#if DEBUG
+       errno_orig = errno;
         FS_DEBUG("ERROR: xs_watch %s failed ret=%d errno=%d\n",
                  WATCH_NODE, res, errno);
+       errno = errno_orig;
+#endif
         return -1;
     }
     return xs_fileno(xsh); 

# HG changeset patch
# User dkiper@xxxxxxxxxxxx
# Date 1266698140 -3600
# Node ID 0278998ea935b2bf4f503684ec5a352cf44660c8
# Parent  b4041e7bbe1b62fab4e3416bbab085b07af57809
Disable memory mapping warnings when stub domain is used.

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>

diff -r b4041e7bbe1b -r 0278998ea935 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Wed Feb 17 12:11:13 2010 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Sat Feb 20 21:35:40 2010 +0100
@@ -2607,9 +2607,10 @@ int sh_remove_all_mappings(struct vcpu *
     {
         /* Don't complain if we're in HVM and there are some extra mappings: 
          * The qemu helper process has an untyped mapping of this dom's RAM 
-         * and the HVM restore program takes another. */
+         * and the HVM restore program takes another. Additionally, if stub 
domain
+        * is active then it also has an untyped mapping of original dom's RAM. 
*/
         if ( !(shadow_mode_external(v->domain)
-               && (page->count_info & PGC_count_mask) <= 3
+               && (page->count_info & PGC_count_mask) <= 4
                && (page->u.inuse.type_info & PGT_count_mask) == 0) )
         {
             SHADOW_ERROR("can't find all mappings of mfn %lx: "

Is it possible to differentiate HVM with
and without stub domain ???

Daniel

Attachment: xen-3.4-testing-fs-backend-watch-crash_20100220.patch
Description: Text document

Attachment: xen-3.4-testing-stub-domain-disable-memory-mapping-warnings_20100220.patch
Description: Text document

Attachment: xen-unstable-fs-backend-watch-crash_20100220.patch
Description: Text document

Attachment: xen-unstable-stub-domain-disable-memory-mapping-warnings_20100220.patch
Description: Text document

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.