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] string mmio/pio across page boundaries

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] string mmio/pio across page boundaries
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Thu, 23 Nov 2006 19:36:08 +0800
Delivery-date: Thu, 23 Nov 2006 03:36:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccO6UxS+AV3Dd2VSNuy9z/ANVYAdQABsfTw
Thread-topic: [Xen-devel] string mmio/pio across page boundaries
>
>When preparing arguments for send_mmio_req() or send_pio_req() in hvm
>where a single iteration crosses a page boundary, the value to 
>be written is copied from guest memory, but I can't see where the value

>read is copied to guest memory. Is this case simply missing?
>

in send_mmio_req or send_pio_req, there is no request crossing a page
boundary, since it's already converted.


>Also, a long while back the logic to calculate when wrapping occurs was
>changed with two subsequent patches. As I'm looking at the code now it
>seems like - only the first patch got applied to handle_mmio() (i.e.,
the 
>logic is still broken - neither patch got applied to
{svm,vmx}_io_instruction().
>
>Further, there is a comment in handle_mmio() now saying "We need to
>make sure we advance to the point where the next request will be on a
>different page.  If we're going down, that means advancing until one
>byte before the start of the page, hence +1." This wasn't applied
>similarly to {svm,vmx}_io_instruction(). And the actual code seems
>wrong: If e.g. addr is on a page boundary, count will become zero. I
>would think that the +1 must be outside of the division.
>
>Was this intentional in some way? Otherwise, I'll prepare a patch to
>address all of these.
>

Are you using an old source tree, I don't see such code, and we have
sent a patch to clean that code before xen 3.0.3.
I think the logic is correct now.
-Xin

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