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

[Xen-devel] Re: [Qemu-devel] [PATCH 5/7] xen: add block device backend d

To: Blue Swirl <blauwirbel@xxxxxxxxx>
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH 5/7] xen: add block device backend driver.
From: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Date: Mon, 04 Aug 2008 21:50:50 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx
Delivery-date: Mon, 04 Aug 2008 12:51:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f43fc5580808041026t49c8962fhe6ef926608e3db6c@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1217865045-10722-1-git-send-email-kraxel@xxxxxxxxxx> <1217865045-10722-6-git-send-email-kraxel@xxxxxxxxxx> <f43fc5580808041026t49c8962fhe6ef926608e3db6c@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080501)
Blue Swirl wrote:
> On 8/4/08, Gerd Hoffmann <kraxel@xxxxxxxxxx> wrote:
>>  +/* i386 protocol version */
>>  +#pragma pack(push, 4)
> 
> What's wrong with __attribute__(__aligned__)?

That one is tricky because we must be binary compatible with xen.  And
the block driver protocol has a small design flaw:  It has a 64bit value
 which is not aligned on a 64bit border.  This leads to different struct
layouts on i386 and x86_64 due to different alignment rules.  Unless you
force them into something else, like we do in that header file to deal
with it.  Which is needed to run 32bit guests on 64bit hosts.

>>  +    RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&blkdev->rings.common, 
>> send_notify);
> 
> EUGLY_LONG_NAME_WITH_ALL_CAPS

Xen API, no way around that, sorry.

>>  +       mode   = O_RDONLY;
>>  +       qflags = BDRV_O_RDONLY;
>>  +       info  |= VDISK_READONLY | VDISK_REMOVABLE | VDISK_CDROM;
> 
> Does this mean that all read-only disks are assumed to be CDROMs or
> that all removable disks are read-only?

I'll double-check, but I think there is no media=[disk|cdrom] indicator
in xenstore.  So that was the best I could come up with ...

> Why IF_XEN?

I've seen you've noticed meanwhile in patch #7 ;)

> Why different protocols for i386 and x86_64?

See above.

> Would I need to add
> Sparc32 and Sparc64 versions some day?

Not sure whenever the same 32/64bit ABI issue exists on sparc.  If so,
the code handling this on x86 should work for sparc too.

cheers,
  Gerd

-- 
http://kraxel.fedorapeople.org/xenner/

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

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