Skip to contentSkip to conversation

x86: fix guest migration after c/s 20892:d311d1efc25e

PATCH In review Jan Beulich 2 participants 2 messages Jul 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix guest migration after c/s 20892:d311d1efc25e

Guests would not manage to run successfully after being migrated to a host having sufficiently much more memory than the host they were originally started on.

Subsequently the plan is to re-enable the changes behavior under the control of a guest kernel announced feature flag.

xen/arch/x86/mm.c +1 -1
@@ -4861,7 +4861,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug )
+        if ( !mem_hotplug && current->domain == dom0 )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;

Guests would not manage to run successfully after being migrated to a host having sufficiently much more memory than the host they were originally started on.

Subsequently the plan is to re-enable the changes behavior under the control of a guest kernel announced feature flag.

xen/arch/x86/mm.c +1 -1
@@ -4861,7 +4861,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug )
+        if ( !mem_hotplug && current->domain == dom0 )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;

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

Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jan Beulich

Guests would not manage to run successfully after being migrated to a host having sufficiently much more memory than the host they were originally started on.

Subsequently the plan is to re-enable the changes behavior under the control of a guest kernel announced feature flag.

Thanks Jan, I think this is a good workaround for the time being.

Quoted 15 lines
xen/arch/x86/mm.c +1 -1
@@ -4861,7 +4861,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug )
+        if ( !mem_hotplug && current->domain == dom0 )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;