From: Bernhard Kauer <kauer@os.inf.tu-dresden.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] SVM IOIO intercept does not check all bits
Date: Thu, 6 Dec 2007 20:31:47 +0100 [thread overview]
Message-ID: <20071206193147.GA4033@chrom.inf.tu-dresden.de> (raw)
[-- 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;
next reply other threads:[~2007-12-06 19:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 19:31 Bernhard Kauer [this message]
2007-12-07 13:10 ` [Qemu-devel] [PATCH] SVM IOIO intercept does not check all bits Alexander Graf
2007-12-07 14:20 ` Bernhard Kauer
2007-12-07 15:16 ` Alexander Graf
2007-12-08 20:50 ` Bernhard Kauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071206193147.GA4033@chrom.inf.tu-dresden.de \
--to=kauer@os.inf.tu-dresden.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).