x86/p2m: Allow p2m_get_page_from_gfn to return shared entries
authorTamas K Lengyel <tamas.lengyel@intel.com>
Mon, 10 Feb 2020 19:21:25 +0000 (11:21 -0800)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Feb 2020 13:22:55 +0000 (13:22 +0000)
commitc1739b8ccdecce663e1c07f21290e3e48c33e699
treea76d31ad928bfe19cedc82a249094dd63dd63483
parentb4d752e2ba0675875a26ca6aa559cb62c0f44cd7
x86/p2m: Allow p2m_get_page_from_gfn to return shared entries

The owner domain of shared pages is dom_cow, use that for get_page
otherwise the function fails to return the correct page under some
situations. The check if dom_cow should be used was only performed in
a subset of use-cases. Fixing the error and simplifying the existing check
since we can't have any shared entries with dom_cow being NULL.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/p2m.c