|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [PATCH] [PATCH] VMX: bad PIO/MMIO effective address comp
ChangeSet 1.1509, 2005/05/23 09:51:36+01:00, leendert@xxxxxxxxxxxxxx
[PATCH] [PATCH] VMX: bad PIO/MMIO effective address computations
The PIO/MMIO effective address computations in VMX for partitions
running
in VM8086 mode are wrong. This bug prevented FreeDOS and Lilo to work
under
VMX. The following patches fix this.
Leendert
Signed-Off-By: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
vmx.c | 5 ++---
vmx_platform.c | 8 ++++----
2 files changed, 6 insertions(+), 7 deletions(-)
diff -Nru a/xen/arch/x86/vmx.c b/xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c 2005-05-23 05:02:38 -04:00
+++ b/xen/arch/x86/vmx.c 2005-05-23 05:02:38 -04:00
@@ -366,18 +366,17 @@
if (p->dir == IOREQ_WRITE) {
__vmread(GUEST_DS_SELECTOR, &seg);
p->u.pdata = (void *)
- ((seg << 4) | (regs->esi & 0xFFFF));
+ ((seg << 4) + (regs->esi & 0xFFFF));
} else {
__vmread(GUEST_ES_SELECTOR, &seg);
p->u.pdata = (void *)
- ((seg << 4) | (regs->edi & 0xFFFF));
+ ((seg << 4) + (regs->edi & 0xFFFF));
}
} else {
p->u.pdata = (void *) ((p->dir == IOREQ_WRITE) ?
regs->esi : regs->edi);
}
p->u.pdata = (void *) gva_to_gpa(p->u.data);
-
if (test_bit(5, &exit_qualification))
p->count = vm86 ? regs->ecx & 0xFFFF : regs->ecx;
diff -Nru a/xen/arch/x86/vmx_platform.c b/xen/arch/x86/vmx_platform.c
--- a/xen/arch/x86/vmx_platform.c 2005-05-23 05:02:38 -04:00
+++ b/xen/arch/x86/vmx_platform.c 2005-05-23 05:02:38 -04:00
@@ -544,7 +544,7 @@
if (vm86) {
__vmread(GUEST_CS_SELECTOR, &cs);
- inst_addr = (cs << 4) | eip;
+ inst_addr = (cs << 4) + eip;
} else
inst_addr = eip; /* XXX should really look at GDT[cs].base too */
@@ -592,13 +592,13 @@
unsigned long seg;
__vmread(GUEST_ES_SELECTOR, &seg);
- if (((seg << 4) | (inst_decoder_regs->edi & 0xFFFF)) == va) {
+ if (((seg << 4) + (inst_decoder_regs->edi & 0xFFFF)) == va) {
dir = IOREQ_WRITE;
__vmread(GUEST_DS_SELECTOR, &seg);
- addr = (seg << 4) | (inst_decoder_regs->esi & 0xFFFF);
+ addr = (seg << 4) + (inst_decoder_regs->esi & 0xFFFF);
} else {
dir = IOREQ_READ;
- addr = (seg << 4) | (inst_decoder_regs->edi & 0xFFFF);
+ addr = (seg << 4) + (inst_decoder_regs->edi & 0xFFFF);
}
} else { /* XXX should really look at GDT[ds/es].base too */
if (va == inst_decoder_regs->edi) {
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [PATCH] [PATCH] VMX: bad PIO/MMIO effective address computations,
BitKeeper Bot <=
|
|
|
|
|