From: Igor Druzhinin Date: Wed, 18 Mar 2020 11:55:54 +0000 (+0100) Subject: x86/shim: fix ballooning up the guest X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~524 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=76dbabb59eeaa78e9f57407e5b15a6606488333e;p=xen.git x86/shim: fix ballooning up the guest 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 Reviewed-by: Jan Beulich Reviewed-by: Roger Pau Monné --- diff --git a/xen/common/memory.c b/xen/common/memory.c index 444c081d11..6e4b85674d 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -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