WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [PATCH] [PATCH] VMX: bad PIO/MMIO effective address comp

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [PATCH] [PATCH] VMX: bad PIO/MMIO effective address computations
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 23 May 2005 08:51:36 +0000
Delivery-date: Mon, 23 May 2005 09:01:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
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 <=