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

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@xxxxxxxxxxxxxxx> 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@xxxxxx>
---

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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