[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM][VMX] Fix dead loop in PIO handling, introduced in c/s 10894.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 7e7552112954b3eac14b807ad9b7bc3b79917d2f
# Parent  ab86a6f3b5ee3be0550194362f64c3aebfecefbf
[HVM][VMX] Fix dead loop in PIO handling, introduced in c/s 10894.
RIP update is missed for PIO handling.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff -r ab86a6f3b5ee -r 7e7552112954 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Aug 02 15:07:21 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Aug 02 15:42:44 2006 +0100
@@ -1111,9 +1111,10 @@ static void vmx_io_instruction(unsigned 
     memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
     hvm_store_cpu_guest_regs(current, regs, NULL);
 
-    __vmread(GUEST_RIP, &eip);
-    __vmread(GUEST_CS_SELECTOR, &cs);
-    __vmread(GUEST_RFLAGS, &eflags);
+    eip = regs->eip;
+    cs = regs->cs;
+    eflags = regs->eflags;
+
     vm86 = eflags & X86_EFLAGS_VM ? 1 : 0;
 
     HVM_DBG_LOG(DBG_LEVEL_IO,
@@ -1165,7 +1166,7 @@ static void vmx_io_instruction(unsigned 
                 else
                     count = (addr & ~PAGE_MASK) / size;
             } else
-                __update_guest_eip(inst_len);
+                regs->eip += inst_len;
 
             send_pio_req(regs, port, count, size, addr, dir, 1);
         }
@@ -1173,7 +1174,7 @@ static void vmx_io_instruction(unsigned 
         if (port == 0xe9 && dir == IOREQ_WRITE && size == 1)
             hvm_print_line(current, regs->eax); /* guest debug output */
 
-        __update_guest_eip(inst_len);
+        regs->eip += inst_len;
         send_pio_req(regs, port, 1, size, regs->eax, dir, 0);
     }
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.