diff options
author | Suthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com> | 2019-07-23 22:00:37 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-08-09 18:30:40 +0300 |
commit | b9c6ff94e43a0ee053e0c1d983fba1ac4953b762 (patch) | |
tree | d2e9958a900cbc336afcd1153b66c2479b257acf /drivers/iommu/amd_iommu_types.h | |
parent | e21a712a9685488f5ce80495b37b9fdbe96c230d (diff) | |
download | linux-b9c6ff94e43a0ee053e0c1d983fba1ac4953b762.tar.xz |
iommu/amd: Re-factor guest virtual APIC (de-)activation code
Re-factore the logic for activate/deactivate guest virtual APIC mode (GAM)
into helper functions, and export them for other drivers (e.g. SVM).
to support run-time activate/deactivate of SVM AVIC.
Cc: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_types.h')
-rw-r--r-- | drivers/iommu/amd_iommu_types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h index 64edd5a9694c..9ac229e92b07 100644 --- a/drivers/iommu/amd_iommu_types.h +++ b/drivers/iommu/amd_iommu_types.h @@ -873,6 +873,15 @@ struct amd_ir_data { struct msi_msg msi_entry; void *entry; /* Pointer to union irte or struct irte_ga */ void *ref; /* Pointer to the actual irte */ + + /** + * Store information for activate/de-activate + * Guest virtual APIC mode during runtime. + */ + struct irq_cfg *cfg; + int ga_vector; + int ga_root_ptr; + int ga_tag; }; struct amd_irte_ops { |