Skip to contentSkip to conversation

Migrate/Save of 32-bit domU Broken on Xen 3.1.2 64-bit dom0

DISCUSSION Joshua West 5 participants 19 messages Jan 18, 2008 – Feb 4, 2008

lore
Share & tools
lore
#0 lore raw

Hey all,

So it looks like the xc_save utility has issues saving a 32-bit paravirtualized domU on a 64-bit dom0. As a result, live migration of 32-bit PV VM's (between 64-bit dom0's) also does not work. However, I am able to "xm save" and "xm migrate" 64-bit PV domU's on those same 64-bit dom0's without encountering issues.

Has anybody else run into save/migrate issues of 32-bit domU's on 64-bit dom0's? Do you know of a fix or workaround?

The 32-bit domU's I'm working with have kernels which are compiled with PAE (HIGHMEM64G=y) support. Additionally, both of these machines are of identical hardware configuration (Dell PowerEdge 1950's) and have been setup exactly the same.

Here is a snippit of output from /var/log/xen/xend.log:

#----------------------------------------------------------#
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:88) [xc_save]: /usr/lib64/xen/bin/xc_save 30 1 0 0 0 [2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:333) suspend
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:91) In saveInputHandler suspend
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:93) Suspending 1 ...
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:451) XendDomainInfo.shutdown(suspend)
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] INFO (XendCheckpoint:98) Domain 1 suspended.
[2008-01-17 19:18:08 8353] INFO (XendDomainInfo:1179) Domain has shutdown: name=migrating-rhel5-test id=1 reason=suspend. [2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:107) Written done
[2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error: Timed out waiting for frame list updated. [2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error: Failed to map/save the p2m frame list [2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) Save exit rc=1
[2008-01-17 19:18:09 8353] ERROR (XendCheckpoint:140) Save failed on domain rhel5-test (1).
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py",
line 109, in save
forkHelper(cmd, fd, saveInputHandler, False)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py",
line 350, in forkHelper
raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib64/xen/bin/xc_save 30 1 0 0 0 failed
[2008-01-17 19:18:09 8353] DEBUG (XendDomainInfo:1793) XendDomainInfo.resumeDomain(1)
[2008-01-17 19:18:09 8353] DEBUG (XendCheckpoint:143) XendCheckpoint.save: resumeDomain
#----------------------------------------------------------#

I'm not sure if this is related, but I also see messages such as the following in "xm dmesg":
(XEN) event_channel.c:231:d3 EVTCHNOP failure: domain 1, error -17, line 231 (XEN) event_channel.c:231:d4 EVTCHNOP failure: domain 4, error -17, line 231

I suspect they're just a result of the save failures.

Any help would be *greatly* appreciated!

Thanks!

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#1 lore raw

Hi Joshua,

Can you try the two attached patches? This should apply to 3.1.3-pre. These take care of the 32-bit dom0/64-bit domU case, but also should have some affect on your 64-bit dom0/32-bit domU.

Thanks
kurt

Quoted 80 lines · Joshua West

Hey all,

So it looks like the xc_save utility has issues saving a 32-bit paravirtualized domU on a 64-bit dom0. As a result, live migration of 32-bit PV VM's (between 64-bit dom0's) also does not work. However, I am able to "xm save" and "xm migrate" 64-bit PV domU's on those same 64-bit dom0's without encountering issues.

Has anybody else run into save/migrate issues of 32-bit domU's on 64-bit dom0's? Do you know of a fix or workaround?

The 32-bit domU's I'm working with have kernels which are compiled with PAE (HIGHMEM64G=y) support. Additionally, both of these machines are of identical hardware configuration (Dell PowerEdge 1950's) and have been setup exactly the same.

Here is a snippit of output from /var/log/xen/xend.log:

#----------------------------------------------------------#
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:88) [xc_save]:
/usr/lib64/xen/bin/xc_save 30 1 0 0 0
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:333) suspend [2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:91) In saveInputHandler suspend
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:93) Suspending 1 ... [2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:451) XendDomainInfo.shutdown(suspend)
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] INFO (XendCheckpoint:98) Domain 1 suspended. [2008-01-17 19:18:08 8353] INFO (XendDomainInfo:1179) Domain has shutdown:
name=migrating-rhel5-test id=1 reason=suspend.
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:107) Written done [2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error:
Timed out waiting for frame list updated.
[2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error:
Failed to map/save the p2m frame list
[2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) Save exit rc=1 [2008-01-17 19:18:09 8353] ERROR (XendCheckpoint:140) Save failed on domain rhel5-test (1).
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
109, in save
forkHelper(cmd, fd, saveInputHandler, False)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
350, in forkHelper
raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib64/xen/bin/xc_save 30 1 0 0 0 failed [2008-01-17 19:18:09 8353] DEBUG (XendDomainInfo:1793) XendDomainInfo.resumeDomain(1)
[2008-01-17 19:18:09 8353] DEBUG (XendCheckpoint:143) XendCheckpoint.save:
resumeDomain
#----------------------------------------------------------#

I'm not sure if this is related, but I also see messages such as the following in "xm dmesg":
(XEN) event_channel.c:231:d3 EVTCHNOP failure: domain 1, error -17, line 231
(XEN) event_channel.c:231:d4 EVTCHNOP failure: domain 4, error -17, line 231

I suspect they're just a result of the save failures.

Any help would be *greatly* appreciated!

Thanks!

Signature · 10 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
xen/include/public/foreign/structs.py renamed from xen/include/public/foreign/structs.py.orig +1 -0
@@ -49,6 +49,7 @@ defines = [ "__i386__",
 
             # all archs
             "xen_pfn_to_cr3",
+            "xen_cr3_to_pfn",
             "MAX_VIRT_CPUS",
             "MAX_GUEST_CMDLINE" ];
 
tools/libxc/xc_domain_save.c renamed from tools/libxc/xc_domain_save.c.orig +34 -16

66 lines not on this page · raw message

tools/libxc/xc_domain_restore.c renamed from tools/libxc/xc_domain_restore.c.orig +14 -4
@@ -32,6 +32,16 @@
 #include <xen/hvm/ioreq.h>
 #include <xen/hvm/params.h>
 
+#define xen_cr3_to_pfn_either(cr3) \
+    (guest_width==8 ? \
+        xen_cr3_to_pfn_x86_64(cr3) : \
+        xen_cr3_to_pfn_x86_32(cr3))
+
+#define xen_pfn_to_cr3_either(pfn) \
+    (guest_width==8 ? \
+        xen_pfn_to_cr3_x86_64(pfn) : \
+        xen_pfn_to_cr3_x86_32(pfn))
+
 /* max mfn of the current host machine */
 static unsigned long max_mfn;
 
@@ -1050,7 +1060,7 @@ int xc_domain_restore(int xc_handle, int
             SET_FIELD(&ctxt, gdt_frames[j], p2m[pfn]);
         }
         /* Uncanonicalise the page table base pointer. */
-        pfn = xen_cr3_to_pfn(GET_FIELD(&ctxt, ctrlreg[3]));
+	pfn = xen_cr3_to_pfn_either(GET_FIELD(&ctxt, ctrlreg[3]));
 
         if ( pfn >= p2m_size )
         {
@@ -1067,12 +1077,12 @@ int xc_domain_restore(int xc_handle, int
                   (unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT);
             goto out;
         }
-        SET_FIELD(&ctxt, ctrlreg[3], xen_pfn_to_cr3(p2m[pfn]));
+        SET_FIELD(&ctxt, ctrlreg[3], xen_pfn_to_cr3_either(p2m[pfn]));
 
         /* Guest pagetable (x86/64) stored in otherwise-unused CR1. */
         if ( (pt_levels == 4) && (ctxt.x64.ctrlreg[1] & 1) )
         {
-            pfn = xen_cr3_to_pfn(ctxt.x64.ctrlreg[1] & ~1);
+            pfn = xen_cr3_to_pfn_either(ctxt.x64.ctrlreg[1] & ~1);
             if ( pfn >= p2m_size )
             {
                 ERROR("User PT base is bad: pfn=%lu p2m_size=%lu",
@@ -1087,7 +1097,7 @@ int xc_domain_restore(int xc_handle, int
                       (unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT);
                 goto out;
             }
-            ctxt.x64.ctrlreg[1] = xen_pfn_to_cr3(p2m[pfn]);
+            ctxt.x64.ctrlreg[1] = xen_pfn_to_cr3_either(p2m[pfn]);
         }
         domctl.cmd = XEN_DOMCTL_setvcpucontext;
         domctl.domain = (domid_t)dom;
tools/python/xen/xend/server/blkif.py renamed from tools/python/xen/xend/server/blkif.py.orig +8 -0
@@ -86,6 +86,10 @@ class BlkifController(DevController):
                   'device-type' : dev_type
                 }
 
+        protocol = config.get('protocol')
+        if protocol:
+            front['protocol'] = protocol
+
         return (devid, back, front)
 
 
@@ -137,6 +141,10 @@ class BlkifController(DevController):
         if uuid:
             config['uuid'] = uuid
 
+        proto = self.readFrontend(devid, 'protocol')
+        if proto:
+            config['protocol'] = proto
+
         return config
 
     def destroyDevice(self, devid, force):
tools/python/xen/xm/create.py renamed from tools/python/xen/xm/create.py.orig +6 -1
@@ -557,7 +557,7 @@ def configure_image(vals):
 def configure_disks(config_devs, vals):
     """Create the config for disks (virtual block devices).
     """
-    for (uname, dev, mode, backend) in vals.disk:
+    for (uname, dev, mode, backend, protocol) in vals.disk:
         if uname.startswith('tap:'):
             cls = 'tap'
         else:
@@ -569,6 +569,8 @@ def configure_disks(config_devs, vals):
                       ['mode', mode ] ]
         if backend:
             config_vbd.append(['backend', backend])
+        if protocol:
+            config_vbd.append(['protocol', protocol])
         config_devs.append(['device', config_vbd])
 
 def configure_pci(config_devs, vals):
@@ -807,7 +809,10 @@ def preprocess_disk(vals):
         n = len(d)
         if n == 3:
             d.append(None)
+            d.append(None)
         elif n == 4:
+            d.append(None)
+        elif n == 5:
             pass
         else:
             err('Invalid disk specifier: ' + v)
tools/libxc/xc_domain.c renamed from tools/libxc/xc_domain.c.orig +17 -6
@@ -7,6 +7,7 @@
  */
 
 #include "xc_private.h"
+#include "xg_save_restore.h"
 #include <xen/memory.h>
 #include <xen/hvm/hvm_op.h>
 
@@ -301,18 +302,23 @@ int xc_vcpu_getcontext(int xc_handle,
 {
     int rc;
     DECLARE_DOMCTL;
+    size_t sz = sizeof (vcpu_guest_context_either_t);
 
     domctl.cmd = XEN_DOMCTL_getvcpucontext;
     domctl.domain = (domid_t)domid;
     domctl.u.vcpucontext.vcpu   = (uint16_t)vcpu;
     set_xen_guest_handle(domctl.u.vcpucontext.ctxt, ctxt);
 
-    if ( (rc = lock_pages(ctxt, sizeof(*ctxt))) != 0 )
-        return rc;
+    if ( (rc = lock_pages(ctxt, sz)) != 0 )
+    {
+        sz = sizeof(*ctxt);
+        if ( (rc = lock_pages(ctxt, sz)) != 0 )
+            return rc;
+    }
 
     rc = do_domctl(xc_handle, &domctl);
 
-    unlock_pages(ctxt, sizeof(*ctxt));
+    unlock_pages(ctxt, sz);
 
     return rc;
 }
@@ -599,19 +605,24 @@ int xc_vcpu_setcontext(int xc_handle,
 {
     DECLARE_DOMCTL;
     int rc;
+    size_t sz = sizeof (vcpu_guest_context_either_t);
 
     domctl.cmd = XEN_DOMCTL_setvcpucontext;
     domctl.domain = domid;
     domctl.u.vcpucontext.vcpu = vcpu;
     set_xen_guest_handle(domctl.u.vcpucontext.ctxt, ctxt);
 
-    if ( (ctxt != NULL) && ((rc = lock_pages(ctxt, sizeof(*ctxt))) != 0) )
-        return rc;
+    if ( ctxt != NULL && (rc = lock_pages(ctxt, sz)) != 0 )
+    {
+        sz = sizeof(*ctxt);
+        if ( (rc = lock_pages(ctxt, sz)) != 0 )
+            return rc;
+    }
 
     rc = do_domctl(xc_handle, &domctl);
 
     if ( ctxt != NULL )
-        unlock_pages(ctxt, sizeof(*ctxt));
+        unlock_pages(ctxt, sz);
 
     return rc;
 }
tools/libxc/xc_domain_restore.c renamed from tools/libxc/xc_domain_restore.c.orig +126 -105

409 lines not on this page · raw message

tools/libxc/xc_resume.c renamed from tools/libxc/xc_resume.c.orig +4 -9
@@ -8,13 +8,8 @@
 #include <xen/foreign/x86_64.h>
 #include <xen/hvm/params.h>
 
-/* Need to provide the right flavour of vcpu context for Xen */
-typedef union
-{
-    vcpu_guest_context_x86_64_t c64;
-    vcpu_guest_context_x86_32_t c32;   
-    vcpu_guest_context_t c;
-} vcpu_guest_context_either_t;
+/* Don't yet support cross-address-size uncooperative resume */
+#define guest_width (sizeof (unsigned long))
 
 static int modify_returncode(int xc_handle, uint32_t domid)
 {
@@ -50,9 +45,9 @@ static int modify_returncode(int xc_hand
     if ( !info.hvm )
         ctxt.c.user_regs.eax = 1;
     else if ( strstr(caps, "x86_64") )
-        ctxt.c64.user_regs.eax = 1;
+        ctxt.x64.user_regs.eax = 1;
     else
-        ctxt.c32.user_regs.eax = 1;
+        ctxt.x32.user_regs.eax = 1;
 
     if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt.c)) != 0 )
         return rc;
tools/libxc/xc_core_x86.c renamed from tools/libxc/xc_core_x86.c.orig +3 -0
@@ -21,6 +21,9 @@
 #include "xg_private.h"
 #include "xc_core.h"
 
+/* Don't yet support cross-address-size core dump */
+#define guest_width (sizeof (unsigned long))
+
 static int nr_gpfns(int xc_handle, domid_t domid)
 {
     return xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &domid) + 1;
tools/libxc/xc_domain_save.c renamed from tools/libxc/xc_domain_save.c.orig +196 -92

544 lines not on this page · raw message

tools/libxc/xg_private.h renamed from tools/libxc/xg_private.h.orig +14 -12
@@ -134,13 +134,6 @@ typedef l4_pgentry_64_t l4_pgentry_t;
 #define PAGE_SHIFT_X86          12
 #define PAGE_SIZE_X86           (1UL << PAGE_SHIFT_X86)
 #define PAGE_MASK_X86           (~(PAGE_SIZE_X86-1))
-#if defined(__i386__)
-#define MADDR_BITS_X86          44
-#elif defined(__x86_64__)
-#define MADDR_BITS_X86          52
-#endif
-#define MFN_MASK_X86            ((1ULL << (MADDR_BITS_X86 - PAGE_SHIFT_X86)) - 1)
-#define MADDR_MASK_X86          (MFN_MASK_X86 << PAGE_SHIFT_X86)
 
 #define PAGE_SHIFT_IA64         14
 #define PAGE_SIZE_IA64          (1UL << PAGE_SHIFT_IA64)
@@ -148,19 +141,28 @@ typedef l4_pgentry_64_t l4_pgentry_t;
 
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 
+
+/* XXX SMH: following skanky macros rely on variable p2m_size being set */
+/* XXX TJD: also, "guest_width" should be the guest's sizeof(unsigned long) */
+
 /* Number of xen_pfn_t in a page */
-#define fpp             (PAGE_SIZE/sizeof(xen_pfn_t))
 
-/* XXX SMH: following 3 skanky macros rely on variable p2m_size being set */
+#define FPP             (PAGE_SIZE/(guest_width))
 
 /* Number of entries in the pfn_to_mfn_frame_list_list */
-#define P2M_FLL_ENTRIES (((p2m_size)+(fpp*fpp)-1)/(fpp*fpp))
+#define P2M_FLL_ENTRIES (((p2m_size)+(FPP*FPP)-1)/(FPP*FPP))
 
 /* Number of entries in the pfn_to_mfn_frame_list */
-#define P2M_FL_ENTRIES  (((p2m_size)+fpp-1)/fpp)
+#define P2M_FL_ENTRIES  (((p2m_size)+FPP-1)/FPP)
 
 /* Size in bytes of the pfn_to_mfn_frame_list     */
-#define P2M_FL_SIZE     ((P2M_FL_ENTRIES)*sizeof(unsigned long))
+#define P2M_FL_SIZE     ((P2M_FL_ENTRIES)*(guest_width))
+
+/* Masks for PTE<->PFN conversions */
+#define MADDR_BITS_X86  ((guest_width == 8) ? 52 : 44)
+#define MFN_MASK_X86    ((1ULL << (MADDR_BITS_X86 - PAGE_SHIFT_X86)) - 1)
+#define MADDR_MASK_X86  (MFN_MASK_X86 << PAGE_SHIFT_X86)
+
 
 #define PAEKERN_no           0
 #define PAEKERN_yes          1
tools/libxc/xc_core.c renamed from tools/libxc/xc_core.c.orig +3 -0
@@ -58,6 +58,9 @@
 /* number of pages to write at a time */
 #define DUMP_INCREMENT (4 * 1024)
 
+/* Don't yet support cross-address-size core dump */
+#define guest_width (sizeof (unsigned long))
+
 static int
 copy_from_domain_page(int xc_handle,
                       uint32_t domid,
tools/libxc/xg_save_restore.h renamed from tools/libxc/xg_save_restore.h.orig +58 -11

99 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Hi Kurt,

Awesome -- thanks for the patches! I'll be testing them later on today and I'll let you know what happens.

Quoted 79 lines · Kurt Hackel

Hi Joshua,

Can you try the two attached patches? This should apply to 3.1.3-pre. These take care of the 32-bit dom0/64-bit domU case, but also should have some affect on your 64-bit dom0/32-bit domU.

Thanks
kurt

Quoted 41 lines · Joshua West

Hey all,

So it looks like the xc_save utility has issues saving a 32-bit paravirtualized domU on a 64-bit dom0. As a result, live migration of 32-bit PV VM's (between 64-bit dom0's) also does not work. However, I am able to "xm save" and "xm migrate" 64-bit PV domU's on those same 64-bit dom0's without encountering issues.

Has anybody else run into save/migrate issues of 32-bit domU's on 64-bit dom0's? Do you know of a fix or workaround?

The 32-bit domU's I'm working with have kernels which are compiled with PAE (HIGHMEM64G=y) support. Additionally, both of these machines are of identical hardware configuration (Dell PowerEdge 1950's) and have been setup exactly the same.

Here is a snippit of output from /var/log/xen/xend.log:

#----------------------------------------------------------#
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:88) [xc_save]: /usr/lib64/xen/bin/xc_save 30 1 0 0 0 [2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:333) suspend
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:91) In saveInputHandler suspend
[2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:93) Suspending 1 ...
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:451) XendDomainInfo.shutdown(suspend)
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-17 19:18:08 8353] INFO (XendCheckpoint:98) Domain 1 suspended.
[2008-01-17 19:18:08 8353] INFO (XendDomainInfo:1179) Domain has shutdown: name=migrating-rhel5-test id=1 reason=suspend. [2008-01-17 19:18:08 8353] DEBUG (XendCheckpoint:107) Written done
[2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error: Timed out waiting for frame list updated. [2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) ERROR Internal error: Failed to map/save the p2m frame list [2008-01-17 19:18:09 8353] INFO (XendCheckpoint:362) Save exit rc=1
[2008-01-17 19:18:09 8353] ERROR (XendCheckpoint:140) Save failed on domain rhel5-test (1).
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
109, in save
forkHelper(cmd, fd, saveInputHandler, False)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
350, in forkHelper
raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib64/xen/bin/xc_save 30 1 0 0 0 failed
[2008-01-17 19:18:09 8353] DEBUG (XendDomainInfo:1793) XendDomainInfo.resumeDomain(1)
[2008-01-17 19:18:09 8353] DEBUG (XendCheckpoint:143) XendCheckpoint.save: resumeDomain
#----------------------------------------------------------#

I'm not sure if this is related, but I also see messages such as the following in "xm dmesg":
(XEN) event_channel.c:231:d3 EVTCHNOP failure: domain 1, error -17, line 231 (XEN) event_channel.c:231:d4 EVTCHNOP failure: domain 4, error -17, line 231

Quoted 18 lines

I suspect they're just a result of the save failures.

Any help would be *greatly* appreciated!

Thanks!

Signature · 10 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#3 lore raw
In reply to Kurt Hackel

Hi Kurt & Xen Developers,

I applied those two patches to Xen 3.1.3-rc1. Unfortunately, the issue still persists. xc_save fails and therefore save/migrate doesn't work. However, I did receive a different error message this time. Here's the snippit from /var/log/xen/xend.log:

#----------------------------------------------------------#
[2008-01-18 16:57:06 6774] DEBUG (XendCheckpoint:88) [xc_save]: /usr/lib64/xen/bin/xc_save 24 1 0 0 0
[2008-01-18 16:57:06 6774] DEBUG (XendCheckpoint:333) suspend
[2008-01-18 16:57:06 6774] DEBUG (XendCheckpoint:91) In saveInputHandler suspend
[2008-01-18 16:57:06 6774] DEBUG (XendCheckpoint:93) Suspending 1 ...
[2008-01-18 16:57:06 6774] DEBUG (XendDomainInfo:451) XendDomainInfo.shutdown(suspend)
[2008-01-18 16:57:06 6774] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-18 16:57:06 6774] DEBUG (XendDomainInfo:991) XendDomainInfo.handleShutdownWatch
[2008-01-18 16:57:06 6774] INFO (XendDomainInfo:1179) Domain has shutdown: name=migrating-rhel5-test id=1 reason=suspend. [2008-01-18 16:57:06 6774] INFO (XendCheckpoint:98) Domain 1 suspended.
[2008-01-18 16:57:06 6774] DEBUG (XendCheckpoint:107) Written done
[2008-01-18 16:57:06 6774] INFO (XendCheckpoint:362) Had 0 unexplained entries in p2m table
[2008-01-18 16:57:08 6774] INFO (XendCheckpoint:362) Saving memory pages: iter 1 15%ERROR Internal error: Fatal PT race (pfn 853, type 20000000) [2008-01-18 16:57:08 6774] INFO (XendCheckpoint:362) Save exit rc=1
[2008-01-18 16:57:08 6774] ERROR (XendCheckpoint:140) Save failed on domain rhel5-test (1).
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py",
line 109, in save
forkHelper(cmd, fd, saveInputHandler, False)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py",
line 350, in forkHelper
raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib64/xen/bin/xc_save 24 1 0 0 0 failed
[2008-01-18 16:57:08 6774] DEBUG (XendDomainInfo:1802) XendDomainInfo.resumeDomain(1)
[2008-01-18 16:57:08 6774] DEBUG (XendCheckpoint:143) XendCheckpoint.save: resumeDomain
#----------------------------------------------------------#

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen 3.1.3-rc1 w/o patches.

Kurt, Keir, everybody else... any ideas as to why "xm save" (and thus "xm migrate") of 32-bit domU's does not work on 64-bit dom0's? Has anybody found this to be successful in the past?

Thanks.

Quoted 16 lines · Kurt Hackel

Hi Joshua,

Can you try the two attached patches? This should apply to 3.1.3-pre. These take care of the 32-bit dom0/64-bit domU case, but also should have some affect on your 64-bit dom0/32-bit domU.

Thanks
kurt

------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#4 lore raw
Quoted 6 lines · Joshua West

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen 3.1.3-rc1 w/o patches.

Kurt, Keir, everybody else... any ideas as to why "xm save" (and thus "xm migrate") of 32-bit domU's does not work on 64-bit dom0's? Has anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its pretty unlikely to work without considerable code modification. I guess those patches aren't quite fully baked yet, unfortunately, or haven't been written with your precise case in mind.

-- Keir

#5 lore raw

Ahh. Well, I'm building xen-3.1.3-rc1 right now and I'll see how that goes.

Keir, have you seen this issue before? Where one cannot xm save/migrate a 32-bit domU on a 64-bit dom0? Or is this expected to work and just doesn't go well for me?

Quoted 20 lines · Keir Fraser
Quoted 7 lines · Joshua West

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen 3.1.3-rc1 w/o patches.

Kurt, Keir, everybody else... any ideas as to why "xm save" (and thus "xm migrate") of 32-bit domU's does not work on 64-bit dom0's? Has anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its pretty unlikely to work without considerable code modification. I guess those patches aren't quite fully baked yet, unfortunately, or haven't been written with your precise case in mind.

-- Keir

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#6 lore raw

Looking at the issues that need to be handled to support this, it cannot be expected to work.

-- Keir

Quoted 28 lines · Joshua West

Ahh. Well, I'm building xen-3.1.3-rc1 right now and I'll see how that goes.

Keir, have you seen this issue before? Where one cannot xm save/migrate a 32-bit domU on a 64-bit dom0? Or is this expected to work and just doesn't go well for me?

Quoted 20 lines · Keir Fraser
Quoted 7 lines · Joshua West

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen 3.1.3-rc1 w/o patches.

Kurt, Keir, everybody else... any ideas as to why "xm save" (and thus "xm migrate") of 32-bit domU's does not work on 64-bit dom0's? Has anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its pretty unlikely to work without considerable code modification. I guess those patches aren't quite fully baked yet, unfortunately, or haven't been written with your precise case in mind.

-- Keir

#7 lore raw

Dang, doesn't work in Xen 3.1.3-rc1 (like you said/expected), with or without Kurt's patches.

Hmm... I thought 32-bit paravirtualized domU's on 64-bit dom0's were supported in Xen 3.1.x? Or am I mistaken?

Perhaps standard features such as start/shutdown/pause of 32-bit PV domU's on 64-bit dom0's are supported, but not the more advanced management features like save and migrate - and I was just unclear from the beginning?

And of course... the final question that all developers hate... when s/could one _hope_ (not expect!) to see save/migrate functionality of 32-bit PV domU's on 64-bit dom0's? :-D

Our whole reason for moving to 64-bit dom0's was to utilize 32GB of memory, instead of the 16GB limitation on 32-bit PAE dom0's. We can't convert all of our virtual machines (100+) to 64-bit linux as its too much work and some actually have to be 32-bit due to vendor supplied software (Oracle, Zimbra, etc). I suppose we'll wait to move to 64-bit until [live] migration is available, as its used quite frequently in our machine rooms.

Thanks for all of your help Keir and Kurt.

Quoted 41 lines · Keir Fraser

Looking at the issues that need to be handled to support this, it cannot be expected to work.

-- Keir

Quoted 30 lines · Joshua West

Ahh. Well, I'm building xen-3.1.3-rc1 right now and I'll see how that goes.

Keir, have you seen this issue before? Where one cannot xm save/migrate a 32-bit domU on a 64-bit dom0? Or is this expected to work and just doesn't go well for me?

Quoted 22 lines · Keir Fraser
Quoted 8 lines · Joshua West

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen 3.1.3-rc1 w/o patches.

Kurt, Keir, everybody else... any ideas as to why "xm save" (and thus "xm migrate") of 32-bit domU's does not work on 64-bit dom0's? Has anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its pretty unlikely to work without considerable code modification. I guess those patches aren't quite fully baked yet, unfortunately, or haven't been written with your precise case in mind.

-- Keir

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#8 lore raw
Quoted 3 lines · Joshua West

And of course... the final question that all developers hate... when s/could one _hope_ (not expect!) to see save/migrate functionality of 32-bit PV domU's on 64-bit dom0's? :-D

The Oracle patches look like they should get a lot of the way there. Hopefully it's just a few bugs to be shaken out of those patches.

-- Keir

#10 lore raw
In reply to Joshua West

Joshua --

Why do you need so much memory on dom0? Are you thinking that the total memory available to guests is limited to what dom0 has? Or are you running some memory-hungry applications on dom0?

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Dan

Quoted 105 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Joshua West
Sent: Friday, January 18, 2008 4:06 PM
To: Keir Fraser
Cc: Kurt Hackel; [email protected]
Subject: Re: [Xen-devel] Migrate/Save of 32-bit domU Broken on Xen 3.1.2
64-bit dom0

Dang, doesn't work in Xen 3.1.3-rc1 (like you said/expected), with or without Kurt's patches.

Hmm... I thought 32-bit paravirtualized domU's on 64-bit dom0's were supported in Xen 3.1.x? Or am I mistaken?

Perhaps standard features such as start/shutdown/pause of 32-bit PV domU's on 64-bit dom0's are supported, but not the more advanced management features like save and migrate - and I was just unclear from
the beginning?

And of course... the final question that all developers hate... when s/could one _hope_ (not expect!) to see save/migrate functionality of 32-bit PV domU's on 64-bit dom0's? :-D

Our whole reason for moving to 64-bit dom0's was to utilize 32GB of memory, instead of the 16GB limitation on 32-bit PAE dom0's. We can't convert all of our virtual machines (100+) to 64-bit linux as its too much work and some actually have to be 32-bit due to vendor supplied software (Oracle, Zimbra, etc). I suppose we'll wait to move to 64-bit
until [live] migration is available, as its used quite frequently in our
machine rooms.

Thanks for all of your help Keir and Kurt.

Quoted 1 line · Keir Fraser

Looking at the issues that need to be handled to support

this, it cannot be

Quoted 8 lines

expected to work.

-- Keir

Quoted 1 line · Joshua West

Ahh. Well, I'm building xen-3.1.3-rc1 right now and I'll

see how that goes.

Quoted 2 lines
Quoted 2 lines

Keir, have you seen this issue before? Where one cannot

xm save/migrate

Quoted 1 line
Quoted 1 line

a 32-bit domU on a 64-bit dom0? Or is this expected to

work and just

Quoted 10 lines
Quoted 10 lines

doesn't go well for me?

Quoted 6 lines · Keir Fraser
Quoted 2 lines · Joshua West

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen

3.1.3-rc1 w/o patches.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Kurt, Keir, everybody else... any ideas as to why "xm

save" (and thus

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"xm migrate") of 32-bit domU's does not work on 64-bit

dom0's? Has

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its

pretty unlikely to

Quoted 1 line
Quoted 1 line
Quoted 1 line

work without considerable code modification. I guess

those patches aren't

Quoted 1 line
Quoted 1 line
Quoted 1 line

quite fully baked yet, unfortunately, or haven't been

written with your

Quoted 10 lines
Quoted 7 lines
Quoted 7 lines

precise case in mind.

-- Keir

--
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#9 lore raw
In reply to Keir Fraser
Quoted 8 lines · Keir Fraser
Quoted 4 lines · Joshua West

And of course... the final question that all developers hate... when s/could one _hope_ (not expect!) to see save/migrate functionality of 32-bit PV domU's on 64-bit dom0's? :-D

Quoted 5 lines

The Oracle patches look like they should get a lot of the way there. Hopefully it's just a few bugs to be shaken out of those patches.

-- Keir

Excellent.

Kurt, I'd like to help but I'm no kernel developer. However, I can compile and test all day long like nobody's business, so if you're willing to push these patches through to completion, I'll definitely help on the testing side of things.

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#11 lore raw
In reply to Dan Magenheimer
Quoted 4 lines · Dan Magenheimer

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Worth checking in then?

-- Keir

#16 lore raw
In reply to Dan Magenheimer

Hi Dan,

Quoted 7 lines · Dan Magenheimer

Joshua --

Why do you need so much memory on dom0? Are you thinking that the total memory available to guests is limited to what dom0 has? Or are you running some memory-hungry applications on dom0?

Hmm, I thought that a 32-bit dom0 system can only have up to 16GB of memory available to it and its domU's -- and a 64-bit dom0 can have a max of 32GB. I only allocate ~512MB of memory to the dom0's themselves. "xm info" shows us the rest of whats available for use by domU's.

Thus, even if I have 32GB of RAM in a server, the total memory that will be used in dom0 + all domU's can only add up to 16GB. Am I just plain old wrong?

Quoted 5 lines

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Interesting. For some reason I thought that the Hypervisor had to match the dom0's kernel. So you're saying that if I compile the Xen Hypervisor as 64-bit and my dom0 + domU's both as 32-bit, I can reach the full capacity of my servers with respect to RAM (32GB) instead of being limited to 16GB? (And this only works with Kurt's patches?).

Quoted 128 lines

Dan

Quoted 123 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Joshua West
Sent: Friday, January 18, 2008 4:06 PM
To: Keir Fraser
Cc: Kurt Hackel; [email protected]
Subject: Re: [Xen-devel] Migrate/Save of 32-bit domU Broken on Xen 3.1.2 64-bit dom0

Dang, doesn't work in Xen 3.1.3-rc1 (like you said/expected), with or without Kurt's patches.

Hmm... I thought 32-bit paravirtualized domU's on 64-bit dom0's were supported in Xen 3.1.x? Or am I mistaken?

Perhaps standard features such as start/shutdown/pause of 32-bit PV domU's on 64-bit dom0's are supported, but not the more advanced management features like save and migrate - and I was just unclear from the beginning?

And of course... the final question that all developers hate... when s/could one _hope_ (not expect!) to see save/migrate functionality of 32-bit PV domU's on 64-bit dom0's? :-D

Our whole reason for moving to 64-bit dom0's was to utilize 32GB of memory, instead of the 16GB limitation on 32-bit PAE dom0's. We can't convert all of our virtual machines (100+) to 64-bit linux as its too much work and some actually have to be 32-bit due to vendor supplied software (Oracle, Zimbra, etc). I suppose we'll wait to move to 64-bit until [live] migration is available, as its used quite frequently in our machine rooms.

Thanks for all of your help Keir and Kurt.

Quoted 2 lines · Keir Fraser

Looking at the issues that need to be handled to support

this, it cannot be

Quoted 10 lines

expected to work.

-- Keir

Quoted 2 lines · Joshua West

Ahh. Well, I'm building xen-3.1.3-rc1 right now and I'll

see how that goes.

Quoted 2 lines
Quoted 2 lines

Keir, have you seen this issue before? Where one cannot

xm save/migrate

Quoted 2 lines
Quoted 2 lines

a 32-bit domU on a 64-bit dom0? Or is this expected to

work and just

Quoted 5 lines
Quoted 5 lines

doesn't go well for me?

Keir Fraser wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines · Joshua West
Quoted 7 lines

Just to make sure the patches aren't the cause of this new error message, I'm going to see what happens with Xen

3.1.3-rc1 w/o patches.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Kurt, Keir, everybody else... any ideas as to why "xm

save" (and thus

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"xm migrate") of 32-bit domU's does not work on 64-bit

dom0's? Has

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

anybody found this to be successful in the past?

The extent of the patches that Kurt posted indicate its

pretty unlikely to

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

work without considerable code modification. I guess

those patches aren't

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

quite fully baked yet, unfortunately, or haven't been

written with your

Quoted 10 lines
Quoted 8 lines
Quoted 8 lines

precise case in mind.

-- Keir

--
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#17 lore raw
Quoted 15 lines · Joshua West

Hi Dan,

Quoted 7 lines · Dan Magenheimer

Joshua --

Why do you need so much memory on dom0? Are you thinking that the total memory available to guests is limited to what dom0 has? Or are you running some memory-hungry applications on dom0?

Hmm, I thought that a 32-bit dom0 system can only have up to 16GB of memory available to it and its domU's -- and a 64-bit dom0 can have a max of 32GB. I only allocate ~512MB of memory to the dom0's themselves. "xm info" shows us the rest of whats available for use by domU's.

Thus, even if I have 32GB of RAM in a server, the total memory that will be used in dom0 + all domU's can only add up to 16GB. Am I just plain old wrong?

Quoted 7 lines
Quoted 5 lines

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Interesting. For some reason I thought that the Hypervisor had to match the dom0's kernel. So you're saying that if I compile the Xen Hypervisor as 64-bit and my dom0 + domU's both as 32-bit, I can reach the full capacity of my servers with respect to RAM (32GB) instead of being limited to 16GB? (And this only works with Kurt's patches?).

Sorry about this second question. Looks like you already answered it in your first message :-/ I'm going to give it a whirl (64-bit Xen Hypervisor, 32-bit dom0, 64-bit and 32-bit domU's -- all with Kurt's patches). Thanks.

Quoted 4 lines
Quoted 2 lines

Dan

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#12 lore raw
In reply to Keir Fraser
Quoted 10 lines · Keir Fraser
Quoted 4 lines · Dan Magenheimer

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Worth checking in then?

-- Keir

If you're willing to take the patches as-is to support 32-bit dom0/64-bit guest case, yes. We'll have to continue working on the opposite case, but at least there is some way of supporting save/restore/migrate for all guest types today.

thanks
kurt

#18 lore raw
In reply to Joshua West
Quoted 9 lines · Joshua West

Thus, even if I have 32GB of RAM in a server, the total memory that will be used in dom0 + all domU's can only add up to 16GB. Am I just plain old wrong?

Quoted 4 lines

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Quoted 5 lines

Interesting. For some reason I thought that the Hypervisor had to match the dom0's kernel. So you're saying that if I compile the Xen Hypervisor as 64-bit and my dom0 + domU's both as 32-bit, I can reach the full capacity of my servers with respect to RAM (32GB) instead of being limited to 16GB? (And this only works with Kurt's patches?).

As long as you run 64-bit Xen you can run 32-bit dom0 and domUs and use the full memory of your system. The 32-bit guests are not even limited to 16GB each, let alone jointly. This is true even without Kurt's patches. What Kurt's patches fix is save/restore/migrate of a 64-bit domU from a 32-bit dom0.

-- Keir

#13 lore raw
In reply to Kurt Hackel
Quoted 15 lines · Kurt Hackel
Quoted 12 lines · Keir Fraser
Quoted 5 lines · Dan Magenheimer

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Worth checking in then?

-- Keir

Quoted 8 lines

If you're willing to take the patches as-is to support 32-bit dom0/64-bit guest case, yes. We'll have to continue working on the opposite case, but at least there is some way of supporting save/restore/migrate for all guest types today.

thanks
kurt

Hey Keir,

Any thoughts on if these patches will be accepted for 3.1.3?

Signature · 4 lines
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu
#14 lore raw
Quoted 5 lines · Joshua West
Quoted 5 lines

If you're willing to take the patches as-is to support 32-bit dom0/64-bit guest case, yes. We'll have to continue working on the opposite case, but at least there is some way of supporting save/restore/migrate for all guest types today.

Quoted 7 lines
Quoted 3 lines

thanks
kurt

Hey Keir,

Any thoughts on if these patches will be accepted for 3.1.3?

Unlikely. 3.1 branch is now two steps behind development tip. It's in the freezer.

-- Keir

#15 lore raw

Re: Migrate/Save of 32-bit domU Broken on Xen 3.1.264-bit dom0

In reply to Kurt Hackel
Quoted 13 lines
Quoted 1 line
Quoted 1 line · Kurt Hackel
Quoted 10 lines · Keir Fraser
Quoted 4 lines · Dan Magenheimer

Note that 64-bit Xen + 32-bit Dom0 will support both 32-bit and 64-bit domU's. (Oracle VM uses this configuration by default on 64-bit capable machines.) And save/restore/migration has been tested to work for this (with the patch Kurt posted).

Worth checking in then?

-- Keir

Quoted 7 lines

If you're willing to take the patches as-is to support 32-bit dom0/64-bit guest case, yes. We'll have to continue working on the opposite case, but at least there is some way of supporting save/restore/migrate for all guest types today.

thanks
kurt

Has there been any further progress made on either case?

- Bruce