Corrected a bug in the stdvga code where it did not properly handle 32 bit operations. The buf_ioreq_t can now store 32 bits of data. Because this increases its size to 8 bytes, only 510 elements fit in the buffered_iopage (down from 672 elements). Signed-off-by: Robert Phillips <rphillips@virtualiron.com> Signed-off-by: Ben Guthro <bguthro@virtualiron.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Oct-31 21:59 UTC
Re: [Xen-devel] [PATCH] Fix stdvga performance for 32bit ops
511 entries? 511*8 + 8 bytes for the read/write pointers == 4096? -- Keir On 31/10/07 20:28, "Ben Guthro" <bguthro@virtualiron.com> wrote:> Corrected a bug in the stdvga code where it did not > properly handle 32 bit operations. > The buf_ioreq_t can now store 32 bits of data. > Because this increases its size to 8 bytes, > only 510 elements fit in the buffered_iopage > (down from 672 elements)._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Robert Phillips
2007-Oct-31 23:37 UTC
Re: [Xen-devel] [PATCH] Fix stdvga performance for 32bit ops
Yes, it should be 511. Thanks. -- rsp On 10/31/07, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> > 511 entries? 511*8 + 8 bytes for the read/write pointers == 4096? > > -- Keir > > On 31/10/07 20:28, "Ben Guthro" <bguthro@virtualiron.com> wrote: > > Corrected a bug in the stdvga code where it did not > properly handle 32 bit operations. > The buf_ioreq_t can now store 32 bits of data. > Because this increases its size to 8 bytes, > only 510 elements fit in the buffered_iopage > (down from 672 elements). > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alex Williamson
2007-Nov-01 16:33 UTC
Re: [Xen-devel] [PATCH] Fix stdvga performance for 32bit ops
On Wed, 2007-10-31 at 21:59 +0000, Keir Fraser wrote:> 511 entries? 511*8 + 8 bytes for the read/write pointers == 4096? > > -- Keir > > On 31/10/07 20:28, "Ben Guthro" <bguthro@virtualiron.com> wrote: > > Corrected a bug in the stdvga code where it did not > properly handle 32 bit operations. > The buf_ioreq_t can now store 32 bits of data. > Because this increases its size to 8 bytes, > only 510 elements fit in the buffered_iopage > (down from 672 elements).Aren''t we relying on some compiler dependent packing to get this to 8 bytes? I think it''d be best if we were more explicit in the definition. Thanks, Alex Signed-off-by: Alex Williamson <alex.williamson@hp.com> --- diff -r 4255ca79f9d9 xen/include/public/hvm/ioreq.h --- a/xen/include/public/hvm/ioreq.h Thu Nov 01 09:07:16 2007 -0600 +++ b/xen/include/public/hvm/ioreq.h Thu Nov 01 09:45:47 2007 -0600 @@ -78,10 +78,10 @@ typedef struct shared_iopage shared_iopa typedef struct shared_iopage shared_iopage_t; struct buf_ioreq { - uint8_t type; /* I/O type */ - uint8_t dir:1; /* 1=read, 0=write */ - uint8_t size:2; /* 0=>1, 1=>2, 2=>4, 3=>8. If 8, use two buf_ioreqs */ uint32_t addr:20;/* physical address */ + uint32_t type:8; /* I/O type */ + uint32_t dir:1; /* 1=read, 0=write */ + uint32_t size:2; /* 0=>1, 1=>2, 2=>4, 3=>8. If 8, use two buf_ioreqs */ uint32_t data; /* data */ }; typedef struct buf_ioreq buf_ioreq_t; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Nov-01 17:28 UTC
Re: [Xen-devel] [PATCH] Fix stdvga performance for 32bit ops
On 1/11/07 16:33, "Alex Williamson" <alex.williamson@hp.com> wrote:>> Corrected a bug in the stdvga code where it did not >> properly handle 32 bit operations. >> The buf_ioreq_t can now store 32 bits of data. >> Because this increases its size to 8 bytes, >> only 510 elements fit in the buffered_iopage >> (down from 672 elements). > > Aren''t we relying on some compiler dependent packing to get this to 8 > bytes? I think it''d be best if we were more explicit in the definition. > Thanks,If gcc gets it right, that''s good enough. We always build Xen and ioemu with gcc. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel