PVH guests are not supposed to access I/O ports they weren't given
access to (there's nothing to handle emulation of such accesses).

Reported-by: Roger Pau Monné<roger....@citrix.com>
Signed-off-by: Jan Beulich <jbeul...@suse.com>
---
Note: Only compile tested so far.

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3082,6 +3082,9 @@ void vmx_vmexit_handler(struct cpu_user_
     }

     case EXIT_REASON_IO_INSTRUCTION:
+        if ( unlikely(is_pvh_vcpu(v)) )
+            goto exit_and_crash;
+
         __vmread(EXIT_QUALIFICATION, &exit_qualification);
         if ( exit_qualification & 0x10 )
         {


VMX: don't allow PVH to reach handle_pio() or handle_mmio()

PVH guests are not supposed to access I/O ports they weren't given
access to (there's nothing to handle emulation of such accesses).

Reported-by: Roger Pau Monné<roger....@citrix.com>
Signed-off-by: Jan Beulich <jbeul...@suse.com>
---
Note: Only compile tested so far.

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3082,6 +3082,9 @@ void vmx_vmexit_handler(struct cpu_user_
     }
 
     case EXIT_REASON_IO_INSTRUCTION:
+        if ( unlikely(is_pvh_vcpu(v)) )
+            goto exit_and_crash;
+
         __vmread(EXIT_QUALIFICATION, &exit_qualification);
         if ( exit_qualification & 0x10 )
         {
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to