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] About block device mapping for guests

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] About block device mapping for guests
From: Mark Williamson <Mark.Williamson@xxxxxxxxxxxx>
Date: Wed, 22 Dec 2004 14:19:21 +0000
Cc: Nuutti Kotivuori <naked@xxxxxx>
Delivery-date: Wed, 22 Dec 2004 14:20:18 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <874qiexwwx.fsf@xxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <874qiexwwx.fsf@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.7.1
OK, here goes:

> So, from this I would conclude that you can specify the major and
> minor device number, which will map to the device you specify.

Yup.

> Now, can these numbers be picked arbitrarily? I know I can mimic an
> entire disk (hda) or just a partition (hda1), for either IDE or SCSI -
> but is there any difference on the Xen side? Does Xen behave
> differently depending on the minor and major that I specify?

Yes you can choose an arbitrary IDE or SCSI drive's major / minor pair and 
export as that.  There's no difference to the backend driver, the frontend in 
the guest uses different blocksize for fake IDE vs fake SCSI, I think.

> Then, are the exported devices just plain block devices with nothing
> special to configure?

Yes

> But do any
> special ioctl's or something like that pass through?

Nope.  Ioctls are handled in the guest.

> If I export an 
> entire hard disk, can the parameters for it tuned from inside the
> guest?

The guest can tune its own parameters for the virtual drive but the parameters 
for the real disk are unaffected.

> What about CD/DVD/etc. drives? Do media insert notifications go 
> through? Could I use a CD-burner from a guest?

You can e.g. export ISOs or whole disks to the guest but things like media 
insert notifications and the various controls required for CD burners are not 
part of the virtual disk interface and so won't work at the moment.

It's technically possible to make the frontend behave more like a CD drive, 
it's just that there's not a lot of demand for this, so it's not implemented.

> And yet more, how do these devices play along with devfs? Does the Xen 
> blockdev frontend driver automatically create some nodes for devfs?

Guest domains can't use devfs because the frontend driver doesn't support it.  
The developers feeling is that since devfs is deprecated, it's probably not 
worth the pain of adding support for.

> How about udev? Does udev get boottime events to initialize the
> device nodes for the block devices? And what about sysfs?

Yes, all Xen virtual devices should appear in SysFS in the guest, which udev 
will use to do the right thing - this should all work fine.

> Is there a 
> sysfs interface to see what has been mapped where and with what major
> and minor numbers?

In the guest, sysfs will show block devices with whatever major / minor was 
specified.  It won't tell you what the drive is mapped to in dom0.

State regarding which block devices in dom0 are mapped to what in the guests 
is maintained inside Xend.

> So, how is this all handled in Xen?

HTH,
Mark

>
> -- Naked
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/xen-devel


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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