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

Re: [Xen-devel] [PATCH 0/5] pvSCSI (SCSI pass through) driver


  • To: Jun Kamada <kama@xxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcgVcb3O/EuYEIFkEdyZ5wAX8io7RQ==
  • Thread-topic: [Xen-devel] [PATCH 0/5] pvSCSI (SCSI pass through) driver

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


 


Rackspace

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