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

[Xen-changelog] [xen stable-4.5] x86/hvm: explicitly mark ioreq server pages dirty



commit 1e44c921c6adc0400ac71fb86667618ec407ba45
Author:     Paul Durrant <paul.durrant@xxxxxxxxxx>
AuthorDate: Wed Feb 18 16:40:30 2015 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Feb 18 16:40:30 2015 +0100

    x86/hvm: explicitly mark ioreq server pages dirty
    
    ...when they are added back into the guest physmap, when an ioreq
    server is disabled. If this is not done then the pages are missed
    during migration, causing ioreq server creation to fail on the remote end.
    
    This problem only manifests if the ioreq server is non-default because in
    the default case the pages are never removed from the guest physmap.
    
    Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    master commit: 70f691130081324a8efb97b23c504d8abc5421db
    master date: 2015-02-10 13:29:51 +0100
---
 xen/arch/x86/hvm/hvm.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 5bf8c3d..55077f9 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -532,9 +532,16 @@ static void hvm_remove_ioreq_gmfn(
 static int hvm_add_ioreq_gmfn(
     struct domain *d, struct hvm_ioreq_page *iorp)
 {
+    int rc;
+
     clear_page(iorp->va);
-    return guest_physmap_add_page(d, iorp->gmfn,
-                                  page_to_mfn(iorp->page), 0);
+
+    rc = guest_physmap_add_page(d, iorp->gmfn,
+                                page_to_mfn(iorp->page), 0);
+    if ( rc == 0 )
+        paging_mark_dirty(d, page_to_mfn(iorp->page));
+
+    return rc;
 }
 
 static int hvm_print_line(
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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