aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-12-02 12:55:00 -0500
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-02-25 11:43:05 -0500
commitc80a420995e721099906607b07c09a24543b31d9 (patch)
tree14b5a0b6b7af7b183e6d8f3f7623591de09872dd /include/xen
parentcff520b9c2ee1486ea9ff1dbc774510c62e5ecb9 (diff)
xen-blkfront: handle Xen major numbers other than XENVBD
This patch makes sure blkfront handles correctly virtual device numbers corresponding to Xen emulated IDE and SCSI disks: in those cases blkfront translates the major number to XENVBD and the minor number to a low xvd minor. Note: this behaviour is different from what old xenlinux PV guests used to do: they used to steal an IDE or SCSI major number and use it instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/interface/io/blkif.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h
index c2d1fa4dc1ee..68dd2b49635c 100644
--- a/include/xen/interface/io/blkif.h
+++ b/include/xen/interface/io/blkif.h
@@ -91,4 +91,25 @@ DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response);
91#define VDISK_REMOVABLE 0x2 91#define VDISK_REMOVABLE 0x2
92#define VDISK_READONLY 0x4 92#define VDISK_READONLY 0x4
93 93
94/* Xen-defined major numbers for virtual disks, they look strangely
95 * familiar */
96#define XEN_IDE0_MAJOR 3
97#define XEN_IDE1_MAJOR 22
98#define XEN_SCSI_DISK0_MAJOR 8
99#define XEN_SCSI_DISK1_MAJOR 65
100#define XEN_SCSI_DISK2_MAJOR 66
101#define XEN_SCSI_DISK3_MAJOR 67
102#define XEN_SCSI_DISK4_MAJOR 68
103#define XEN_SCSI_DISK5_MAJOR 69
104#define XEN_SCSI_DISK6_MAJOR 70
105#define XEN_SCSI_DISK7_MAJOR 71
106#define XEN_SCSI_DISK8_MAJOR 128
107#define XEN_SCSI_DISK9_MAJOR 129
108#define XEN_SCSI_DISK10_MAJOR 130
109#define XEN_SCSI_DISK11_MAJOR 131
110#define XEN_SCSI_DISK12_MAJOR 132
111#define XEN_SCSI_DISK13_MAJOR 133
112#define XEN_SCSI_DISK14_MAJOR 134
113#define XEN_SCSI_DISK15_MAJOR 135
114
94#endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ 115#endif /* __XEN_PUBLIC_IO_BLKIF_H__ */