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

[Xen-changelog] [xen master] libxc: correct max_pfn calculation for saving domain



commit 9daed8321b44c3ca82e412eb130f84e6b6c17dc5
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri Aug 26 13:58:55 2016 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Aug 30 13:43:31 2016 +0100

    libxc: correct max_pfn calculation for saving domain
    
    Commit 91e204d37f44913913776d0a89279721694f8b32 ("libxc: try to find
    last used pfn when migrating") introduced a bug for the case of a
    domain supporting the virtual mapped linear p2m list: the maximum pfn
    of the domain calculated from the p2m memory allocation might be too
    low.
    
    Correct this.
    
    Reported-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Tested-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxc/xc_sr_save_x86_pv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xc_sr_save_x86_pv.c
index 4a29460..7043409 100644
--- a/tools/libxc/xc_sr_save_x86_pv.c
+++ b/tools/libxc/xc_sr_save_x86_pv.c
@@ -430,6 +430,8 @@ static int map_p2m_list(struct xc_sr_context *ctx, uint64_t 
p2m_cr3)
 
         if ( level == 2 )
         {
+            if ( saved_idx == idx_end )
+                saved_idx++;
             max_pfn = ((xen_pfn_t)saved_idx << 9) * fpp - 1;
             if ( max_pfn < ctx->x86_pv.max_pfn )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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