]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Nov 2018 15:43:03 +0000 (16:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Nov 2018 15:43:03 +0000 (16:43 +0100)
Writes to such pages would need to be handed to the emulator, which we're
not prepared to do at this point.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c

index 65ab6a9b23775d3b9cb192e51d3e8ac0b5f28d35..0bc676cd94d8ef57bffb7267c4fbf11224627142 100644 (file)
@@ -2558,7 +2558,8 @@ static void *_hvm_map_guest_frame(unsigned long gfn, bool_t permanent,
 
     if ( writable )
     {
-        if ( unlikely(p2m_is_discard_write(p2mt)) )
+        if ( unlikely(p2m_is_discard_write(p2mt)) ||
+             unlikely(p2mt == p2m_ioreq_server) )
             *writable = 0;
         else if ( !permanent )
             paging_mark_pfn_dirty(d, _pfn(gfn));