[libvirt] [PATCH 1/3] Tests for ACS in PCIe switches
Daniel P. Berrange
berrange at redhat.com
Mon Dec 21 19:11:15 UTC 2009
On Mon, Dec 21, 2009 at 02:27:17PM +0100, Jiri Denemark wrote:
> New pciDeviceIsAssignable() function for checking whether a given PCI
> device can be assigned to a guest was added. Currently it only checks
> for ACS being enabled on all PCIe switches between root and the PCI
> device. In the future, it could be the right place to check whether a
> device is unbound or bound to a stub driver.
>
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
> src/libvirt_private.syms | 3 +
> src/util/pci.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++
> src/util/pci.h | 7 ++
> 3 files changed, 157 insertions(+), 0 deletions(-)
>
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index f90f269..7073e0c 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -438,6 +438,9 @@ pciDeviceListGet;
> pciDeviceListLock;
> pciDeviceListUnlock;
> pciDeviceListSteal;
> +pciDeviceSetPermissive;
> +pciDeviceGetPermissive;
> +pciDeviceIsAssignable;
>
>
> # processinfo.h
> diff --git a/src/util/pci.c b/src/util/pci.c
> index 1e003c2..113299e 100644
> --- a/src/util/pci.c
> +++ b/src/util/pci.c
> @@ -64,6 +64,7 @@ struct _pciDevice {
> unsigned has_flr : 1;
> unsigned has_pm_reset : 1;
> unsigned managed : 1;
> + unsigned permissive : 1;
> };
Rather than the generic term 'permissive' I think we should be
explicitly referring to the 'acs' feature. So perhaps call it
'strict_acs_check', or something along those lines. Likewise
for the method names.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list