qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] SVM IOIO intercept does not check all bits
@ 2007-12-06 19:31 Bernhard Kauer
  2007-12-07 13:10 ` Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Kauer @ 2007-12-06 19:31 UTC (permalink / raw)
  To: qemu-devel

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

The SVM IOIO intercept does not check all bits in the IO permission map
for in/outs with word or long operand size. The attached patch fix this.


        Bernhard Kauer

[-- Attachment #2: qemu_ioio.diff --]
[-- Type: text/x-diff, Size: 563 bytes --]

Index: target-i386/helper.c
--- target-i386/helper.c	18 Nov 2007 01:44:38 -0000	1.95
+++ target-i386/helper.c	6 Dec 2007 19:22:55 -0000
@@ -4250,8 +4331,8 @@
             uint64_t addr = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.iopm_base_pa));
             uint16_t port = (uint16_t) (param >> 16);
 
-            if(ldub_phys(addr + port / 8) & (1 << (port % 8)))
-                vmexit(type, param);
+	    if(ldub_phys(addr + port / 8) & (((1 << ((param >> 4) & 0x7)) - 1) << (port % 8)))
+	      vmexit(type, param);
         }
         break;
 

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

end of thread, other threads:[~2007-12-08 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 19:31 [Qemu-devel] [PATCH] SVM IOIO intercept does not check all bits Bernhard Kauer
2007-12-07 13:10 ` Alexander Graf
2007-12-07 14:20   ` Bernhard Kauer
2007-12-07 15:16     ` Alexander Graf
2007-12-08 20:50       ` Bernhard Kauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).