Bug 7521 - Add support for Xen devices
Summary: Add support for Xen devices
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 06:20 UTC by Mark McLoughlin
Modified: 2006-08-02 13:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
hal-xen.patch (5.65 KB, patch)
2006-07-14 06:21 UTC, Mark McLoughlin
Details | Splinter Review

Description Mark McLoughlin 2006-07-14 06:20:39 UTC
Attaching a patch which handles devices under /sys/devices/xen
Comment 1 Mark McLoughlin 2006-07-14 06:21:24 UTC
Created attachment 6225 [details] [review]
hal-xen.patch
Comment 2 David Zeuthen (not reading bugmail) 2006-08-02 08:10:55 UTC
Hi, this looks pretty good to me and we should commit it to HEAD.

I'm curious how it works - so e.g. for virtualized block devices there is an
entry in /sys/block with a link to the xen bus device? Also, IIRC xen block
devices are not partitioned; the file system is on the topmost block device yes?

(sorry for being slow, I pay a lot more attention to the mailing list than the bugs)
Comment 3 Mark McLoughlin 2006-08-02 08:25:23 UTC
(In reply to comment #2)

> I'm curious how it works - so e.g. for virtualized block devices there is an
> entry in /sys/block with a link to the xen bus device? Also, IIRC xen block
> devices are not partitioned; the file system is on the topmost block device 
> yes?

Best way to explain is just to show it, I guess :-)

$> ls -l /sys/block/xvda/
total 0
-r--r--r-- 1 root root 4096 Aug  2 16:15 dev
lrwxrwxrwx 1 root root    0 Aug  2 16:15 device -> ../../devices/xen/vbd-51712
drwxr-xr-x 2 root root    0 Aug  2 16:15 holders
drwxr-xr-x 3 root root    0 Aug  2 16:15 queue
-r--r--r-- 1 root root 4096 Aug  2 16:15 range
-r--r--r-- 1 root root 4096 Aug  2 16:15 removable
-r--r--r-- 1 root root 4096 Aug  2 16:15 size
drwxr-xr-x 2 root root    0 Aug  2 16:15 slaves
-r--r--r-- 1 root root 4096 Aug  2 16:15 stat
lrwxrwxrwx 1 root root    0 Aug  2 16:15 subsystem -> ../../block
--w------- 1 root root 4096 Aug  2 16:15 uevent
drwxr-xr-x 3 root root    0 Aug  2 16:17 xvda1
drwxr-xr-x 3 root root    0 Aug  2 16:15 xvda2
drwxr-xr-x 3 root root    0 Aug  2 16:15 xvda3

As you can see, they can be partitioned ... this one has three partitions.

$> ls -l /sys/block/xvda/xvda1/
total 0
-r--r--r-- 1 root root 4096 Aug  2 16:15 dev
drwxr-xr-x 2 root root    0 Aug  2 16:15 holders
-r--r--r-- 1 root root 4096 Aug  2 16:17 size
-r--r--r-- 1 root root 4096 Aug  2 16:17 start
-r--r--r-- 1 root root 4096 Aug  2 16:17 stat
lrwxrwxrwx 1 root root    0 Aug  2 16:15 subsystem -> ../../../block
--w------- 1 root root 4096 Aug  2 16:15 uevent

$> ls -l /sys/devices/xen/vbd-51712/
total 0
lrwxrwxrwx 1 root root    0 Aug  2 16:15 block:xvda -> ../../../block/xvda
lrwxrwxrwx 1 root root    0 Aug  2 16:15 bus -> ../../../bus/xen
-r--r--r-- 1 root root 4096 Aug  2 16:15 devtype
lrwxrwxrwx 1 root root    0 Aug  2 16:15 driver -> ../../../bus/xen/drivers/vbd
-r--r--r-- 1 root root 4096 Aug  2 16:15 nodename
drwxr-xr-x 2 root root    0 Aug  2 16:15 power
lrwxrwxrwx 1 root root    0 Aug  2 16:15 subsystem -> ../../../bus/xen
--w------- 1 root root 4096 Aug  2 16:15 uevent

$> cat /sys/devices/xen/vbd-51712/nodename
device/vbd/51712
$> cat /sys/devices/xen/vbd-51712/devtype
vbd

Virtual network interfaces work similarly.
Comment 4 David Zeuthen (not reading bugmail) 2006-08-02 13:01:16 UTC
Committed

 http://gitweb.freedesktop.org/?p=hal;a=commit;h=9512652670bbb48a4b5c64547047617296e57d19

Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.