diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2012-04-04 16:06:42 +0100 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2012-04-04 16:06:42 +0100 |
commit | abda66fdb0eaa1b7ec33e97e3e0e375f948dc651 (patch) | |
tree | b3bee62f8dc1249e0eaa239e657204de0baf0415 /tools/libxl/libxlu_pci.c | |
parent | 543e95e992087a26e2e4e3a1a763ffc348bb6f30 (diff) | |
download | xen-abda66fdb0eaa1b7ec33e97e3e0e375f948dc651.tar.gz xen-abda66fdb0eaa1b7ec33e97e3e0e375f948dc651.tar.bz2 xen-abda66fdb0eaa1b7ec33e97e3e0e375f948dc651.zip |
xl, libxl: Add per-device and global permissive config options for pci passthrough
By default pciback only allows PV guests to write "known safe" values into
PCI config space. But many devices require writes to other areas of config
space in order to operate properly. One way to do that is with the "quirks"
interface, which specifies areas known safe to a particular device; the
other way is to mark a device as "permissive", which tells pciback to allow
all config space writes for that domain and device.
This adds a "permissive" flag to the libxl_pci struct and teaches libxl how
to write the appropriate value into sysfs to enable the permissive feature for
devices being passed through. It also adds the permissive config options either
on a per-device basis, or as a global option in the xl command-line.
Because of the potential stability and security implications of enabling
permissive, the flag is left off by default.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxlu_pci.c')
-rw-r--r-- | tools/libxl/libxlu_pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/libxl/libxlu_pci.c b/tools/libxl/libxlu_pci.c index cc70d9fdf5..f5dee93b79 100644 --- a/tools/libxl/libxlu_pci.c +++ b/tools/libxl/libxlu_pci.c @@ -139,6 +139,8 @@ int xlu_pci_parse_bdf(XLU_Config *cfg, libxl_device_pci *pcidev, const char *str pcidev->msitranslate = atoi(tok); }else if ( !strcmp(optkey, "power_mgmt") ) { pcidev->power_mgmt = atoi(tok); + }else if ( !strcmp(optkey, "permissive") ) { + pcidev->permissive = atoi(tok); }else{ XLU__PCI_ERR(cfg, "Unknown PCI BDF option: %s", optkey); } |