All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] VMX: don't allow PVH to reach handle_mmio()
@ 2014-12-08  9:12 Jan Beulich
  2014-12-08 22:12 ` Mukesh Rathor
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jan Beulich @ 2014-12-08  9:12 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian, Eddie Dong, Jun Nakajima, Roger Pau Monne

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

PVH guests accessing I/O ports via string ops is not supported yet.

Reported-by: Roger Pau Monné<roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: handle_pio() is already safe (pointed out by Mukesh), so only refuse
    entering handle_mmio().
Note: Only compile tested so far.

--- unstable.orig/xen/arch/x86/hvm/vmx/vmx.c	2014-11-27 09:37:27.000000000 +0100
+++ unstable/xen/arch/x86/hvm/vmx/vmx.c	2014-12-08 10:04:27.000000000 +0100
@@ -3086,7 +3086,8 @@ void vmx_vmexit_handler(struct cpu_user_
         if ( exit_qualification & 0x10 )
         {
             /* INS, OUTS */
-            if ( !handle_mmio() )
+            if ( unlikely(is_pvh_vcpu(v)) /* PVH fixme */ ||
+                 !handle_mmio() )
                 hvm_inject_hw_exception(TRAP_gp_fault, 0);
         }
         else



[-- Attachment #2: VMX-PVH-no-emulated-IO-string-ops.patch --]
[-- Type: text/plain, Size: 848 bytes --]

PVH guests accessing I/O ports via string ops is not supported yet.

Reported-by: Roger Pau Monné<roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: handle_pio() is already safe (pointed out by Mukesh), so only refuse
    entering handle_mmio().
Note: Only compile tested so far.

--- unstable.orig/xen/arch/x86/hvm/vmx/vmx.c	2014-11-27 09:37:27.000000000 +0100
+++ unstable/xen/arch/x86/hvm/vmx/vmx.c	2014-12-08 10:04:27.000000000 +0100
@@ -3086,7 +3086,8 @@ void vmx_vmexit_handler(struct cpu_user_
         if ( exit_qualification & 0x10 )
         {
             /* INS, OUTS */
-            if ( !handle_mmio() )
+            if ( unlikely(is_pvh_vcpu(v)) /* PVH fixme */ ||
+                 !handle_mmio() )
                 hvm_inject_hw_exception(TRAP_gp_fault, 0);
         }
         else

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-10 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08  9:12 [PATCH v2] VMX: don't allow PVH to reach handle_mmio() Jan Beulich
2014-12-08 22:12 ` Mukesh Rathor
2014-12-09 17:01 ` Roger Pau Monné
2014-12-09 17:19   ` Jan Beulich
2014-12-09 17:49     ` Roger Pau Monné
2014-12-10  9:07       ` Jan Beulich
2014-12-10 17:08   ` Konrad Rzeszutek Wilk
2014-12-10  5:07 ` Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.