mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e21a712a96
commit
b9c6ff94e4
3 changed files with 82 additions and 24 deletions
|
@ -184,6 +184,9 @@ extern int amd_iommu_register_ga_log_notifier(int (*notifier)(u32));
|
|||
extern int
|
||||
amd_iommu_update_ga(int cpu, bool is_run, void *data);
|
||||
|
||||
extern int amd_iommu_activate_guest_mode(void *data);
|
||||
extern int amd_iommu_deactivate_guest_mode(void *data);
|
||||
|
||||
#else /* defined(CONFIG_AMD_IOMMU) && defined(CONFIG_IRQ_REMAP) */
|
||||
|
||||
static inline int
|
||||
|
@ -198,6 +201,15 @@ amd_iommu_update_ga(int cpu, bool is_run, void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int amd_iommu_activate_guest_mode(void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int amd_iommu_deactivate_guest_mode(void *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* defined(CONFIG_AMD_IOMMU) && defined(CONFIG_IRQ_REMAP) */
|
||||
|
||||
#endif /* _ASM_X86_AMD_IOMMU_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue