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-devel

Re: [Xen-devel] VT/ioemu: vga memory access?

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Subject: Re: [Xen-devel] VT/ioemu: vga memory access?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 16 May 2006 17:57:32 +0100
Cc: Gerd Hoffmann <kraxel@xxxxxxx>, Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 16 May 2006 10:02:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0BA7FC75@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <907625E08839C4409CE5768403633E0BA7FC75@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 16 May 2006, at 17:20, Petersson, Mats wrote:

I think I found the bug.  It's actually in handle_mmio() ;)
The "case INSTR_MOVS" has code which deals with page
boundaries.  The code allways _adds_ the count (ecx) to
figure whenever the "repz movsb" crosses a page boundary or
not.  In case the direction flag is set this isn't correct,
it should subtract instead.  Subsequently it mis-calculates
count, making it _larger_ than it was because the copy
wouldn't have crossed a page boundary, leading to the
negative ecx value in the register dump ...

I think you're right...

I'll write some simple test code to check it out, and let you know...

Hmmm... wouldn't it be nice if we didn't have a bespoke, buggy & incomplete emulator for hvm mmio. ;-)

 -- Keir


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