From 1f04469a0793fb9500d51215ee935849ec74ed56 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 15 Nov 2018 16:43:03 +0100 Subject: [PATCH] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server 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 Reviewed-by: Paul Durrant Acked-by: Andrew Cooper --- xen/arch/x86/hvm/hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 65ab6a9b23..0bc676cd94 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -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)); -- 2.30.2