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] [PATCH] Fix stdvga performance for 32bit ops

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix stdvga performance for 32bit ops
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 01 Nov 2007 10:33:59 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Robert Phillips <rphillips@xxxxxxxxxxxxxxx>, Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Delivery-date: Thu, 01 Nov 2007 09:35:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C34EAB28.FB8C%Keir.Fraser@xxxxxxxxxxxx>
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>
Organization: HP OSLO R&D
References: <C34EAB28.FB8C%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>