[libvirt] [PATCH v2 3/9] Add iommu group number info to virPCIDevice

Peter Krempa pkrempa at redhat.com
Mon Nov 2 08:46:49 UTC 2015


On Mon, Nov 02, 2015 at 03:21:13 +0530, Shivaprasad G Bhat wrote:
> The iommu group number need not be fetched from the sysfs
> everytime as it remains constant. Fetch it once during
> allocation. Add a helper to set the value to set it from tests.
> 
> Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> ---
>  src/libvirt_private.syms |    1 +
>  src/util/virpci.c        |   11 +++++++++++
>  src/util/virpci.h        |    2 ++
>  3 files changed, 14 insertions(+)
> 

[...]

> diff --git a/src/util/virpci.c b/src/util/virpci.c
> index be1b6de..f401e1d 100644
> --- a/src/util/virpci.c
> +++ b/src/util/virpci.c
> @@ -75,6 +75,7 @@ struct _virPCIDevice {
>      bool          has_pm_reset;
>      bool          managed;
>      char          *stubDriver;
> +    int  iommuGroup;

This is misaligned. It either should go with the alignment of the rest
of the fields or have exactly one space between the type and name.

>  
>      /* used by reattach function */
>      bool          unbind_from_stub;

[...]

> @@ -1723,6 +1728,12 @@ virPCIDeviceSetStubDriver(virPCIDevicePtr dev, const char *driver)
>      return VIR_STRDUP(dev->stubDriver, driver);
>  }
>  
> +void
> +virPCIDeviceSetIommuGroup(virPCIDevicePtr dev, int iommu)

This accessor is used only in virpci.c. Is it really worth adding it?

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151102/a52192c2/attachment-0001.sig>


More information about the libvir-list mailing list