Design document | |
---|---|
Revision | v1 |
Status | released (8.3) |
Review | create new issue |
GPU passthrough is already available in XAPI, this document proposes to also offer passthrough for all PCI devices through XAPI.
New methods for PCI object:
PCI.enable_dom0_access
PCI.disable_dom0_access
PCI.get_dom0_access_status
: compares the outputs of /opt/xensource/libexec/xen-cmdline
and /proc/cmdline
to produce one of the four values that can be currently contained
in the PGPU.dom0_access
field:
How do determine the expected dom0 access state:
If the device id is present in both pciback.hide
of /proc/cmdline
and xen-cmdline
: enabled
If the device id is present not in both pciback.hide
of /proc/cmdline
and xen-cmdline
: disabled
If the device id is present in the pciback.hide
of /proc/cmdline
but not in the one of xen-cmdline
: disabled_on_reboot
If the device id is not present in the pciback.hide
of /proc/cmdline
but is in the one of xen-cmdline
: enabled_on_reboot
A function rather than a field makes the data always accurate and even accounts for
changes made by users outside XAPI, directly through /opt/xensource/libexec/xen-cmdline
With these generic methods available, the following field and methods will be deprecated:
PGPU.enable_dom0_access
PGPU.disable_dom0_access
PGPU.dom0_access
(DB field)They would still be usable and up to date with the same info as for the PCI methods.
PCI.disable_dom0_access
on an enabled
PCIdisabled_on_reboot
disabled
PCI.enable_dom0_access
on an disabled
PCIenabled_on_reboot
enabled
enabled
PCI, make sure the get_dom0_access_status
returns enabled
get_dom0_access_status
returns disabled_on_reboot
get_dom0_access_status
returns disabled
get_dom0_access_status
returns enabled_on_reboot
get_dom0_access_status
returns enabled