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

[Xen-changelog] [xen staging] gnttab/ARM: properly implement gnttab_create_status_page()



commit a9e9837f54973ac45488c24e93ed34cbf20e4c66
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Aug 16 09:30:59 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Aug 16 09:30:59 2018 +0200

    gnttab/ARM: properly implement gnttab_create_status_page()
    
    Prevent the "BUG_ON(page_get_owner(pg) != d)" in
    gnttab_unpopulate_status_frames() from triggering.
    
    Reported-by: ç??ç£? <lei19.wang@xxxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/include/asm-arm/grant_table.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xen/include/asm-arm/grant_table.h 
b/xen/include/asm-arm/grant_table.h
index 756c6be2d6..5113b9156c 100644
--- a/xen/include/asm-arm/grant_table.h
+++ b/xen/include/asm-arm/grant_table.h
@@ -21,7 +21,6 @@ int create_grant_host_mapping(unsigned long gpaddr, mfn_t mfn,
 int replace_grant_host_mapping(unsigned long gpaddr, mfn_t mfn,
                                unsigned long new_gpaddr, unsigned int flags);
 void gnttab_mark_dirty(struct domain *d, mfn_t mfn);
-#define gnttab_create_status_page(d, t, i) do {} while (0)
 #define gnttab_release_host_mappings(domain) 1
 
 /*
@@ -80,6 +79,12 @@ static inline unsigned int gnttab_dom0_max(void)
             virt_to_page((char *)(t)->shared_raw[i]), d, SHARE_rw);      \
     } while ( 0 )
 
+#define gnttab_create_status_page(d, t, i)                               \
+    do {                                                                 \
+        share_xen_page_with_guest(                                       \
+            virt_to_page((char *)(t)->status[i]), d, SHARE_rw);          \
+    } while ( 0 )
+
 #define gnttab_shared_gmfn(d, t, i)                                      \
     gfn_x(((i) >= nr_grant_frames(t)) ? INVALID_GFN : (t)->arch.shared_gfn[i])
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
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®.