@@ -708,19 +708,21 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
{
if ( page )
mfn = page_to_mfn(page);
-#ifdef CONFIG_X86
else
{
- p2m_type_t tp;
struct domain *foreign_dom;
+#ifdef CONFIG_X86
+ p2m_type_t tp;
mfn = mfn_x(get_gfn_query(d, xrfp.gpfn, &tp));
- foreign_dom = page_get_owner(mfn_to_page(mfn));
ASSERT(is_pvh_domain(d));
- ASSERT(d != foreign_dom);
ASSERT(p2m_is_foreign(tp));
- }
+#else
+ mfn = gmfn_to_mfn(d, xrfp.gpfn);
#endif
+ foreign_dom = page_get_owner(mfn_to_page(mfn));
+ ASSERT(d != foreign_dom);
+ }
guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
if (page)
put_page(page);
This patch is here to fix "phv dom0: Add and remove foreign pages", I hope it will be merge to this patch in a later version. Signed-off-by: Julien Grall <julien.grall@linaro.org> Cc: Keir Fraser <keir@xen.org> Cc: Jan Beulich <jbeulich@suse.com> Cc: Mukesh Rathor <mukesh.rathor@oracle.com> --- xen/common/memory.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)