Skip to contentSkip to conversation

x86/mm: fix the check in get_pg_owner

PATCH In review Wei Liu 2 participants 2 messages Mar 24, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH v2 1/1 x86/mm: fix the check in get_pg_owner

PVH (both v1 and v2) guest is actually an translated guest. It should be able to manipulate page table for other domains when acting as Dom0.

The removal of PVHv1 deleted the special case for PVH guest but didn't add a check for HVM guest.

---
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm.c +1 -1
index a6b2649cda..4dbd24ff87 100644
@@ -3041,7 +3041,7 @@ static struct domain *get_pg_owner(domid_t domid)
         goto out;
     }
 
-    if ( unlikely(paging_mode_translate(curr)) )
+    if ( !is_hvm_domain(curr) && unlikely(paging_mode_translate(curr)) )
     {
         MEM_LOG("Cannot mix foreign mappings with translated domains");
         goto out;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 24.03.17 at 12:34, <[email protected]> wrote:

PVH (both v1 and v2) guest is actually an translated guest. It should be able to manipulate page table for other domains when acting as Dom0.

The removal of PVHv1 deleted the special case for PVH guest but didn't add a check for HVM guest.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel