Skip to contentSkip to conversation

IOPL must be ignored for VM86 mode port I/O emulation

PATCH New Jan Beulich 1 participant 1 message Jun 9, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IOPL must be ignored for VM86 mode port I/O emulation

Instead, to follow hardware behavior, the I/O permission bitmap must always be consulted.

xen/arch/x86/traps.c renamed from xen/arch/x86/traps.c.0 +2 -1
@@ -748,7 +748,8 @@ static inline int guest_io_okay(
 #define TOGGLE_MODE() ((void)0)
 #endif
 
-    if ( v->arch.iopl >= (guest_kernel_mode(v, regs) ? 1 : 3) )
+    if ( !vm86_mode(regs) &&
+         v->arch.iopl >= (guest_kernel_mode(v, regs) ? 1 : 3) )
         return 1;
 
     if ( v->arch.iobmp_limit > (port + bytes) )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel