| 1 |
In order to know whether qemu supports a specific backend type libxl |
| 2 |
needs a way to obtain this information. |
| 3 |
|
| 4 |
As each qemu instance owns a path (named $QEMU from now on) in |
| 5 |
Xenstore, the backend information is presented there. $QEMU is built |
| 6 |
from the domain id where the qemu instance is running $BACKEND_DOM, |
| 7 |
and the domain id of the target domain of the qemu process $DOMID: |
| 8 |
|
| 9 |
$QEMU = /local/domain/$BACKEND_DOM/device-model/$DOMID |
| 10 |
|
| 11 |
Before signalling qemu is running by writing "running" to $QEMU/state |
| 12 |
qemu will create a Xenstore node for each supported backend under |
| 13 |
$QEMU/backends with the backend type as name (e.g. $QEMU/backends/qdisk |
| 14 |
for the qdisk backend). In case qemu is running de-privileged (not as |
| 15 |
user root) the backend nodes must be written before qemu is dropping |
| 16 |
privileges. |
| 17 |
|
| 18 |
libxl can assume a backend of a specific type $TYPE is supported if: |
| 19 |
- $QEMU/backends/$TYPE is existing in Xenstore |
| 20 |
- or $QEMU/backends is not existing and $TYPE is one of: |
| 21 |
"console", "vkbd", "vfb", "qdisk", "qnic" |