diff mbox series

x86/shim: fix ballooning down the guest

Message ID 20190926133618.24083-1-sergey.dyasli@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/shim: fix ballooning down the guest | expand

Commit Message

Sergey Dyasli Sept. 26, 2019, 1:36 p.m. UTC
Currently ballooning down a pvshim guest causes the following errors
inside the shim:

    d3v0 failed to reserve 512 extents of order 512 for offlining

And the ballooned-out pages stay inside shim and don't reach L0 Xen.

Fix this by passing the correct arguments to pv_shim_offline_memory()
during a XENMEM_decrease_reservation request.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
---
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Roger Pau Monné Sept. 26, 2019, 1:51 p.m. UTC | #1
On Thu, Sep 26, 2019 at 02:36:18PM +0100, Sergey Dyasli wrote:
> Currently ballooning down a pvshim guest causes the following errors
> inside the shim:
> 
>     d3v0 failed to reserve 512 extents of order 512 for offlining
> 
> And the ballooned-out pages stay inside shim and don't reach L0 Xen.
> 
> Fix this by passing the correct arguments to pv_shim_offline_memory()
> during a XENMEM_decrease_reservation request.
> 

This is missing:

Fixes: b2245acc60c3 ('xen/pvshim: memory hotplug')

> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Also adding Juergen for a release Ack.

Thanks, Roger.
Jan Beulich Sept. 26, 2019, 2:08 p.m. UTC | #2
On 26.09.2019 15:51, Roger Pau Monné  wrote:
> On Thu, Sep 26, 2019 at 02:36:18PM +0100, Sergey Dyasli wrote:
>> Currently ballooning down a pvshim guest causes the following errors
>> inside the shim:
>>
>>     d3v0 failed to reserve 512 extents of order 512 for offlining
>>
>> And the ballooned-out pages stay inside shim and don't reach L0 Xen.
>>
>> Fix this by passing the correct arguments to pv_shim_offline_memory()
>> during a XENMEM_decrease_reservation request.
>>
> 
> This is missing:
> 
> Fixes: b2245acc60c3 ('xen/pvshim: memory hotplug')
> 
>> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
Jürgen Groß Sept. 26, 2019, 3:22 p.m. UTC | #3
On 26.09.19 15:51, Roger Pau Monné  wrote:
> On Thu, Sep 26, 2019 at 02:36:18PM +0100, Sergey Dyasli wrote:
>> Currently ballooning down a pvshim guest causes the following errors
>> inside the shim:
>>
>>      d3v0 failed to reserve 512 extents of order 512 for offlining
>>
>> And the ballooned-out pages stay inside shim and don't reach L0 Xen.
>>
>> Fix this by passing the correct arguments to pv_shim_offline_memory()
>> during a XENMEM_decrease_reservation request.
>>
> 
> This is missing:
> 
> Fixes: b2245acc60c3 ('xen/pvshim: memory hotplug')
> 
>> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Also adding Juergen for a release Ack.
> 
> Thanks, Roger.
> 

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 7364fd2c33..309e872edf 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1225,7 +1225,7 @@  long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
              * hypercall has failed and only part of the extents where
              * processed.
              */
-            pv_shim_offline_memory(args.nr_extents, args.nr_done);
+            pv_shim_offline_memory(args.nr_done, args.extent_order);
 #endif
 
         break;