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

[xen staging-4.13] x86/shim: fix ballooning up the guest



commit e9fdf6a455da1d3ab7e7d127738afc6456b13914
Author:     Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
AuthorDate: Thu Apr 9 09:09:40 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Apr 9 09:09:40 2020 +0200

    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 <igor.druzhinin@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    master commit: 76dbabb59eeaa78e9f57407e5b15a6606488333e
    master date: 2020-03-18 12:55:54 +0100
---
 xen/common/memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 309e872edf..3c085a0cd0 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1190,8 +1190,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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.13



 


Rackspace

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