xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating guests
Subsystems (3)
PATCH 1/1 xen: Fix {set,clear}_foreign_p2m_mapping on autotranslating guests
Commit 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called by grant-table.c also on PVH/HVM guests.
--- arch/x86/xen/p2m.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/xen/p2m.c +6 -0
@@ -694,6 +694,9 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,int i, ret =0 ;pte_t *pte; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +if (kmap_ops) { ret =HYPERVISOR_grant_table_op (GNTTABOP_map_grant_ref, kmap_ops, count);
@@ -736,6 +739,9 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, {int i, ret =0 ; +if (xen_feature (XENFEAT_auto_translated_physmap)) +return 0 ; +for (i =0 ; i < count; i++) {unsigned long mfn =__pfn_to_mfn (page_to_pfn (pages[i]));unsigned long pfn =page_to_pfn (pages[i]);
Signature · 1 line
2.15.1
Juergen Gross
maintainerQuoted 8 lines · Simon Gaiser
Commit
82616f9599a7("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called bygrant-table.calso on PVH/HVM guests.Cc <[email protected]> # 4.14Fixes 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths")Signed-off-by Simon Gaiser <[email protected]>Reviewed-by Juergen Gross <[email protected]>
Committed to xen.tip for-linus-4.16
Juergen
Juergen Gross
maintainerRe: [PATCH] xen: Fix {set, clear}_foreign_p2m_mapping on autotranslating guests
In reply to Simon GaiserQuoted 8 lines · Simon Gaiser
Commit
82616f9599a7("xen: remove tests for pvh mode in pure pv paths") removed the check for autotranslation from {set,clear}_foreign_p2m_mapping but those are called bygrant-table.calso on PVH/HVM guests.Cc <[email protected]> # 4.14Fixes 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths")Signed-off-by Simon Gaiser <[email protected]>Reviewed-by Juergen Gross <[email protected]>
Committed to xen.tip for-linus-4.16
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel