Hi, Can anyone tell me how to decide the number in the Xenstore key path for a DomU''s front driver? In Mini-OS, the block front driver write the key-value to "* device/vbd/768/[ring-ref|event-channelprotocol|...]*" according to the code mini-os/blkfront.c. So why does it use the number "768" in the path here? Can this number be another one? For a new DomU''s block front driver, how to decide this number? Thank you very much. Best Regards, Bei Guan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On Sat, 2012-08-25 at 12:15 +0100, Bei Guan wrote:> Hi, > > > Can anyone tell me how to decide the number in the Xenstore key path > for a DomU''s front driver? > In Mini-OS, the block front driver write the key-value to > "device/vbd/768/[ring-ref|event-channelprotocol|...]" according to the > code mini-os/blkfront.c. > So why does it use the number "768" in the path here? Can this number > be another one? For a new DomU''s block front driver, how to decide > this number?It is the VBD number, as described in docs/misc/vbd-interface.txt. 768 is "3<<8 | 0" per the "Concrete encoding in the VBD interface (in xenstore)" section. You (as frontend driver author) don''t need to decide it since it is provided by the toolstack/guest config. You should just process each sub-directory of "device/vbd" as a separate disk. Ian.
2012/8/28 Ian Campbell <Ian.Campbell@citrix.com>> On Sat, 2012-08-25 at 12:15 +0100, Bei Guan wrote: > > Hi, > > > > > > Can anyone tell me how to decide the number in the Xenstore key path > > for a DomU''s front driver? > > In Mini-OS, the block front driver write the key-value to > > "device/vbd/768/[ring-ref|event-channelprotocol|...]" according to the > > code mini-os/blkfront.c. > > So why does it use the number "768" in the path here? Can this number > > be another one? For a new DomU''s block front driver, how to decide > > this number? > > It is the VBD number, as described in docs/misc/vbd-interface.txt. 768 > is "3<<8 | 0" per the "Concrete encoding in the VBD interface (in > xenstore)" section. > > You (as frontend driver author) don''t need to decide it since it is > provided by the toolstack/guest config. You should just process each > sub-directory of "device/vbd" as a separate disk. >Ok, I got it. Thank you so much. Thanks, Bei Guan> > Ian. > > > >-- Best Regards, Bei Guan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel