docs: Document xenstore paths
v2 cover docs: Document xenstore paths
Patch #1 documents paths, some already in used by XenServer, which can be used by guests to advertise contol capabilities.
Patch #2 documents paths which can be used to advertise PV driver versions.
Patch #3 documents paths which can be used by guests to advertise hotplug capabilities.
Patch #4 documents paths which can be used by guests to advertise network addresses.
PATCH v2 1/4 docs: Document control features the can be advertised by guests...
...via xenstore.
XenServer already makes use of ~/control/feature-suspend being written to advertise guest capability of responding to 'suspend' when written to ~/control/shutdown and, since they are derived from XenServer drivers, the Xen Project Windows PV drivers attempt to write this value. The write currently fails for libxl provisioned VMs because ~/control is read-only to the guest (only ~/control/shutdown is writable, for ackowledgement purposes).
This patch documents feature-suspend and also a set of similar control feature flags, so that that they may be added to libxl provisioned guests by subsequent patches:
feature-halt: PV drivers/agent can halt the guest
feature-reboot: PV drivers/agent can reboot the guest
feature-s3: PV drivers/agent can trigger guest sleep (HVM only)
feature-s4: PV drivers/agent can trigger guest hibernate (HVM only)
The patch (bacause it adds features relating to S3 and S4 power states) also clarifies that the initial set of platform properties mentioned are booleans, and updates the specifier accordingly.
--- docs/misc/xenstore-paths.markdown | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
docs/misc/xenstore-paths.markdown +35 -3
@@ -178,9 +178,9 @@ will not relocate guest memory. The BIOS used by this domain. -#### ~/platform/* [HVM,INTERNAL] +#### ~/platform/* = ("0"|"1") [HVM,INTERNAL] -Various platform properties. +Various boolean platform properties. * acpi -- is ACPI enabled for this domain * acpi_s3 -- is ACPI S3 support enabled for this domain
@@ -321,12 +321,44 @@ by udev ("0") or will be run by the toolstack directly ("1"). #### ~/control/shutdown = (""|COMMAND) [w] This is the PV shutdown control node. A toolstack can write various -commands here to cause various guest shutdown, reboot or suspend +commands here to cause various guest halt, reboot or suspend activities. The guest acknowledges a request by writing the empty string back to the command node. The precise protocol is not yet documented. +#### ~/control/feature-halt = (""|"0"|"1") [w] + +This is initialized to "" by the toolstack but may be set to 0 or 1 by +a guest to indicate that it is capable or incapable, respectively, of +halting if 'halt' is written to ~/control/shutdown. + +#### ~/control/feature-reboot = (""|"0"|"1") [w] + +This is initialized to "" by the toolstack but may be set to 0 or 1 by +a guest to indicate that it is capable or incapable, respectively, of +rebooting if 'reboot' is written to ~/control/shutdown. + +#### ~/control/feature-suspend = (""|"0"|"1") [w] + +This is initialized to "" by the toolstack but may be set to 0 or 1 by +a guest to indicate that it is capable or incapable, respectively, of +suspending if 'suspend' is written to ~/control/shutdown. + +#### ~/control/feature-s3 = (""|"0"|"1") [w,HVM] + +This is initialized to "" by the toolstack but may be set to 0 or 1 by +a guest to indicate that it is capable or incapable, respectively, of +triggering a guest sleep if 's3' is written to ~/control/shutdown and +~/platform/acpi_s3 is 1. + +#### ~/control/feature-s4 = (""|"0"|"1") [w,HVM] + +This is initialized to "" by the toolstack but may be set to 0 or 1 by +a guest to indicate that it is capable or incapable, respectively, of +triggering a guest hibernate if 's4' is written to ~/control/shutdown +and ~/platform/acpi_s4 is 1. + #### ~/control/platform-feature-multiprocessor-suspend = (0|1) [] Indicates to the guest that this platform supports the multiprocessor
Signature · 1 line
2.1.4
PATCH v2 2/4 docs: Document a xenstore path for PV driver version information...
In reply to Paul Durrant...to be advertised by a guest.
For domain management purposes it is convenient to be able to see PV driver version information in xenstore. The XAPI toolstack in XenServer has always created a ~/drivers path for this purpose.
This patch documents that path and also adds a specification of how it should be used.
---
v2:
- Modify version specifier to allow for single-part version numbers and also arbitrary string suffix (e.g. '-debug')
--- docs/misc/xenstore-paths.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+)
docs/misc/xenstore-paths.markdown +12 -0
@@ -37,6 +37,8 @@ before regexp expansion: the "other" domain. i.e. ~ refers to the domain providing a service while $DOMID is the consumer of that service. * $UUID -- a UUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +* $NAME -- a string identifying an object within a domain. Typically + comprising only alphanumeric characters. VALUES are strings and can take the following forms:
@@ -51,6 +53,11 @@ VALUES are strings and can take the following forms: * (VALUE | VALUE | ... ) -- a set of alternatives. Alternatives are separated by a "|" and all the alternatives are enclosed in "(" and ")". +* VERSION -- 1, 2 or 3 integers, in decimal form separated by "." + followed by a STRING suffix (starting with the first + non-numeric character). + The integers are a version number of the form MAJOR, + MAJOR.MINOR or MAJOR.MINOR.MICRO respectively. Additional TAGS may follow as a comma separated set of the following tags enclosed in square brackets.
@@ -377,6 +384,11 @@ protocol definition. A domain writable path. Available for arbitrary domain use. +#### ~/drivers/$NAME/version = VERSION [w] + +A domain may write version information for PV driver $NAME using +this path. + ### Paths private to the toolstack #### ~/device-model/$DOMID/state [w]
Signature · 1 line
2.1.4
PATCH v2 3/4 docs: Document xenstore paths for domain hotplug features
In reply to Paul DurrantWithout some indication from a domain it is not possible for a toolstack to know whether instantiation of a new vbd or vif should result in a new PV device of the appropriate type being instantiated in a guest. (In other words whether PV drivers are present and functioning).
This patch documents two paths which vif and vbd frontend drivers can use to advertise their ability to respond to new vif or vbd instantiations.
---
v2:
- Drop HVM restriction
--- docs/misc/xenstore-paths.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+)
docs/misc/xenstore-paths.markdown +12 -0
@@ -389,6 +389,18 @@ A domain writable path. Available for arbitrary domain use. A domain may write version information for PV driver $NAME using this path. +#### ~/feature/hotplug/vif = ("0"|"1") [w] + +An HVM domain can indicate to a toolstack that it is capable +of responding to instantiation of a new vif by bringing online a +new PV network device without the need for a reboot. + +#### ~/feature/hotplug/vbd = ("0"|"1") [w] + +An HVM domain can indicate to a toolstack that it is capable +of responding to instantiation of a new vbd by bringing online a +new PV block device without the need for a reboot. + ### Paths private to the toolstack #### ~/device-model/$DOMID/state [w]
Signature · 1 line
2.1.4
PATCH v2 4/4 docs: Document xenstore paths for domain network address information
In reply to Paul DurrantIt is useful to be able to see the network addresses in use by a domain for a particular vif in xenstore, for example so that ssh can be invoked by a toolstack to log into the guest domain.
This patch documents paths to allow a domain to advertise MAC (unicast and multicast) and IP (versions 4 and 6) address information.
---
v2:
- Allow for compression of IPv6 addresses
--- docs/misc/xenstore-paths.markdown | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
docs/misc/xenstore-paths.markdown +30 -0
@@ -39,6 +39,8 @@ before regexp expansion: * $UUID -- a UUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx * $NAME -- a string identifying an object within a domain. Typically comprising only alphanumeric characters. +* $INDEX -- an integer used as part of a path when listing a set of + values. Typically these integers are contiguous. VALUES are strings and can take the following forms:
@@ -58,6 +60,14 @@ VALUES are strings and can take the following forms: non-numeric character). The integers are a version number of the form MAJOR, MAJOR.MINOR or MAJOR.MINOR.MICRO respectively. +* MAC_ADDRESS -- 6 integers, in hexadecimal form, separated by ':', + specifying an ethernet MAC address. +* IPV4_ADDRESS -- 4 integers, in decimal form, separated by '.', + specifying an IP version 4 address. +* IPV6_ADDRESS -- Up to 8 integers, in hexadecimal form, separated + by ':', specifying an IP version 6 address. + (Zero compression of addresses, using '::' notation, + is allowed but not required). Additional TAGS may follow as a comma separated set of the following tags enclosed in square brackets.
@@ -401,6 +411,26 @@ An HVM domain can indicate to a toolstack that it is capable of responding to instantiation of a new vbd by bringing online a new PV block device without the need for a reboot. +#### ~/attr/vif/$DEVID/name = STRING [w] + +A domain may write its internal 'friendly' name for a network device +using this path. + +#### ~/attr/vif/$DEVID/mac/$INDEX = MAC_ADDRESS [w] + +A domain may write the set of MAC addresses (unicast and multicast) +in use by the network frontend using paths of this form. + +#### ~/attr/vif/$DEVID/ipv4/$INDEX = IPV4_ADDRESS [w] + +A domain may write the set of IP version 4 addresses in use by the +stack bound to the network frontend using paths of this form. + +#### ~/attr/vif/$DEVID/ipv6/$INDEX = IPV6_ADDRESS [w] + +A domain may write the set of IP version 6 addresses in use by the +stack bound to the network frontend using paths of this form. + ### Paths private to the toolstack #### ~/device-model/$DOMID/state [w]
Signature · 1 line
2.1.4