On Mon, Jul 25, 2016 at 04:32:08AM -0500, Suthikulpanit, Suravee wrote:
> From: Suravee Suthikulpanit <[email protected]>
> 
> Introduce struct iommu_dev_data.use_vapic flag, which IOMMU driver
> uses to determine if it should enable vAPIC support, by setting
> the ga_mode bit in the device's interrupt remapping table entry.
> 
> Currently, it is enabled for all pass-through device if vAPIC mode
> is enabled.
> 
> Signed-off-by: Suravee Suthikulpanit <[email protected]>
> ---
>  drivers/iommu/amd_iommu.c       | 44 
> +++++++++++++++++++++++++++++++++--------
>  drivers/iommu/amd_iommu_init.c  | 12 ++++++++++-
>  drivers/iommu/amd_iommu_types.h |  2 +-
>  3 files changed, 48 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index a044ce4..155b4a6 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -105,6 +105,7 @@ struct iommu_dev_data {
>       bool pri_tlp;                     /* PASID TLB required for
>                                            PPR completions */
>       u32 errata;                       /* Bitmap for errata to apply */
> +     u32 use_vapic;                    /* Enable device to use vapic mode */

bool is a better choice here.

Reply via email to