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 0/5] pvSCSI (SCSI pass through) driver

To: Jun Kamada <kama@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/5] pvSCSI (SCSI pass through) driver
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 23 Oct 2007 13:39:24 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 23 Oct 2007 05:40:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071023201112.FD97.KAMA@xxxxxxxxxxxxxx>
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: AcgVcb3O/EuYEIFkEdyZ5wAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH 0/5] pvSCSI (SCSI pass through) driver
User-agent: Microsoft-Entourage/11.3.6.070618
On 23/10/07 12:35, "Jun Kamada" <kama@xxxxxxxxxxxxxx> wrote:

>> Another question about the original patches: did you test that a 64-bit
>> backend can communicate with 32-bit frontend (and vice versa)? Either you
>> need to make sure that all the shared-memory structures defined in vscsiif.h
>> compile identically for 32-bit and 64-bit mode, or you need to detect the
>> frontend's 'bitness' in scsiback and optionally do 32-to-64 or 64-to-32
>> conversion. I think it's obvious which is less hassle. ;-)
> 
> I suppose that the VBD uses the later method. (Is it right?) However,
> the later method requires 'optimize level of frontend on compile time'
> in addition to the 'bitness'. If the frontend is optimized for space,
> members in structure are packed. On the other hand, if the frontend is
> optimized for speed, each members are aligned on word boundary. (padding
> will be inserted.)
> How do you think about this?

The layout of structures is part of the C ABI on the target system:
optimising compilation for space cannot change that (without explicit
pragmas or attributes being added to the code).

Anyway, the right answer is to ensure that your structures compile the same
whether compiled with 32-bit or 64-bit gcc. Check the structure sizes,
fields sizes and field offsets.

 -- Keir



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

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