x86/shim: fix ballooning up the guest
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Wed, 18 Mar 2020 11:55:54 +0000 (12:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Mar 2020 11:55:54 +0000 (12:55 +0100)
args.preempted is meaningless here as it doesn't signal whether the
hypercall was preempted before. Use start_extent instead which is
correct (as long as the hypercall was invoked in a "normal" way).

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/common/memory.c

index 444c081d112a1fd1a149ba3a2d16947cc4147103..6e4b85674d9017017e50754c544f155d1640d8dd 100644 (file)
@@ -1191,8 +1191,8 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         }
 
 #ifdef CONFIG_X86
-        if ( pv_shim && op != XENMEM_decrease_reservation && !args.preempted )
-            /* Avoid calling pv_shim_online_memory when preempted. */
+        if ( pv_shim && op != XENMEM_decrease_reservation && !start_extent )
+            /* Avoid calling pv_shim_online_memory when in a continuation. */
             pv_shim_online_memory(args.nr_extents, args.extent_order);
 #endif