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

[Xen-changelog] Fix MOVS instruction emulation for HVM MMIO.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 42eee0575ab746baf967d4a15ad583a2a4cba83c
# Parent  9c1f1e609d4fd82716849c50cd344f7cb7906a3e
Fix MOVS instruction emulation for HVM MMIO.
From: Gerd Hoffman
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   10003:7fdc4a8b782b1e17fc473d418236ab44cc31b35f
xen-unstable date:        Tue May 16 19:50:23 2006 +0100
---
 xen/arch/x86/hvm/platform.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 9c1f1e609d4f -r 42eee0575ab7 xen/arch/x86/hvm/platform.c
--- a/xen/arch/x86/hvm/platform.c       Tue May 16 09:41:36 2006 +0100
+++ b/xen/arch/x86/hvm/platform.c       Tue May 16 19:52:53 2006 +0100
@@ -865,7 +865,7 @@ void handle_mmio(unsigned long va, unsig
          * copy ourself. After this copy succeeds, "rep movs" is executed
          * again.
          */
-        if ((addr & PAGE_MASK) != ((addr + size - 1) & PAGE_MASK)) {
+        if ((addr & PAGE_MASK) != ((addr + sign * (size - 1)) & PAGE_MASK)) {
             unsigned long value = 0;
 
             mmio_opp->flags |= OVERLAP;
@@ -876,7 +876,7 @@ void handle_mmio(unsigned long va, unsig
                 hvm_copy(&value, addr, size, HVM_COPY_IN);
             send_mmio_req(IOREQ_TYPE_COPY, gpa, 1, size, value, dir, 0);
         } else {
-            if ((addr & PAGE_MASK) != ((addr + count * size - 1) & PAGE_MASK)) 
{
+            if ((addr & PAGE_MASK) != ((addr + sign * (count * size - 1)) & 
PAGE_MASK)) {
                 regs->eip -= inst_len; /* do not advance %eip */
 
                 if (sign > 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®.