~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/amd-iommu.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/amd-iommu.h (Architecture i386) and /include/linux/amd-iommu.h (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Copyright (C) 2007-2010 Advanced Micro Devi      3  * Copyright (C) 2007-2010 Advanced Micro Devices, Inc.
  4  * Author: Joerg Roedel <joerg.roedel@amd.com>      4  * Author: Joerg Roedel <joerg.roedel@amd.com>
  5  *         Leo Duran <leo.duran@amd.com>            5  *         Leo Duran <leo.duran@amd.com>
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef _ASM_X86_AMD_IOMMU_H                        8 #ifndef _ASM_X86_AMD_IOMMU_H
  9 #define _ASM_X86_AMD_IOMMU_H                        9 #define _ASM_X86_AMD_IOMMU_H
 10                                                    10 
 11 #include <linux/types.h>                           11 #include <linux/types.h>
 12                                                    12 
 13 struct amd_iommu;                                  13 struct amd_iommu;
 14                                                    14 
 15 /*                                                 15 /*
 16  * This is mainly used to communicate informat     16  * This is mainly used to communicate information back-and-forth
 17  * between SVM and IOMMU for setting up and te     17  * between SVM and IOMMU for setting up and tearing down posted
 18  * interrupt                                       18  * interrupt
 19  */                                                19  */
 20 struct amd_iommu_pi_data {                         20 struct amd_iommu_pi_data {
 21         u32 ga_tag;                                21         u32 ga_tag;
 22         u32 prev_ga_tag;                           22         u32 prev_ga_tag;
 23         u64 base;                                  23         u64 base;
 24         bool is_guest_mode;                        24         bool is_guest_mode;
 25         struct vcpu_data *vcpu_data;               25         struct vcpu_data *vcpu_data;
 26         void *ir_data;                             26         void *ir_data;
 27 };                                                 27 };
 28                                                    28 
 29 #ifdef CONFIG_AMD_IOMMU                            29 #ifdef CONFIG_AMD_IOMMU
 30                                                    30 
 31 struct task_struct;                                31 struct task_struct;
 32 struct pci_dev;                                    32 struct pci_dev;
 33                                                    33 
 34 extern int amd_iommu_detect(void);                 34 extern int amd_iommu_detect(void);
 35                                                    35 
 36 #else /* CONFIG_AMD_IOMMU */                       36 #else /* CONFIG_AMD_IOMMU */
 37                                                    37 
 38 static inline int amd_iommu_detect(void) { ret     38 static inline int amd_iommu_detect(void) { return -ENODEV; }
 39                                                    39 
 40 #endif /* CONFIG_AMD_IOMMU */                      40 #endif /* CONFIG_AMD_IOMMU */
 41                                                    41 
 42 #if defined(CONFIG_AMD_IOMMU) && defined(CONFI     42 #if defined(CONFIG_AMD_IOMMU) && defined(CONFIG_IRQ_REMAP)
 43                                                    43 
 44 /* IOMMU AVIC Function */                          44 /* IOMMU AVIC Function */
 45 extern int amd_iommu_register_ga_log_notifier(     45 extern int amd_iommu_register_ga_log_notifier(int (*notifier)(u32));
 46                                                    46 
 47 extern int                                         47 extern int
 48 amd_iommu_update_ga(int cpu, bool is_run, void     48 amd_iommu_update_ga(int cpu, bool is_run, void *data);
 49                                                    49 
 50 extern int amd_iommu_activate_guest_mode(void      50 extern int amd_iommu_activate_guest_mode(void *data);
 51 extern int amd_iommu_deactivate_guest_mode(voi     51 extern int amd_iommu_deactivate_guest_mode(void *data);
 52                                                    52 
 53 #else /* defined(CONFIG_AMD_IOMMU) && defined(     53 #else /* defined(CONFIG_AMD_IOMMU) && defined(CONFIG_IRQ_REMAP) */
 54                                                    54 
 55 static inline int                                  55 static inline int
 56 amd_iommu_register_ga_log_notifier(int (*notif     56 amd_iommu_register_ga_log_notifier(int (*notifier)(u32))
 57 {                                                  57 {
 58         return 0;                                  58         return 0;
 59 }                                                  59 }
 60                                                    60 
 61 static inline int                                  61 static inline int
 62 amd_iommu_update_ga(int cpu, bool is_run, void     62 amd_iommu_update_ga(int cpu, bool is_run, void *data)
 63 {                                                  63 {
 64         return 0;                                  64         return 0;
 65 }                                                  65 }
 66                                                    66 
 67 static inline int amd_iommu_activate_guest_mod     67 static inline int amd_iommu_activate_guest_mode(void *data)
 68 {                                                  68 {
 69         return 0;                                  69         return 0;
 70 }                                                  70 }
 71                                                    71 
 72 static inline int amd_iommu_deactivate_guest_m     72 static inline int amd_iommu_deactivate_guest_mode(void *data)
 73 {                                                  73 {
 74         return 0;                                  74         return 0;
 75 }                                                  75 }
 76 #endif /* defined(CONFIG_AMD_IOMMU) && defined     76 #endif /* defined(CONFIG_AMD_IOMMU) && defined(CONFIG_IRQ_REMAP) */
 77                                                    77 
 78 int amd_iommu_get_num_iommus(void);                78 int amd_iommu_get_num_iommus(void);
 79 bool amd_iommu_pc_supported(void);                 79 bool amd_iommu_pc_supported(void);
 80 u8 amd_iommu_pc_get_max_banks(unsigned int idx     80 u8 amd_iommu_pc_get_max_banks(unsigned int idx);
 81 u8 amd_iommu_pc_get_max_counters(unsigned int      81 u8 amd_iommu_pc_get_max_counters(unsigned int idx);
 82 int amd_iommu_pc_set_reg(struct amd_iommu *iom     82 int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn,
 83                 u64 *value);                       83                 u64 *value);
 84 int amd_iommu_pc_get_reg(struct amd_iommu *iom     84 int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn,
 85                 u64 *value);                       85                 u64 *value);
 86 struct amd_iommu *get_amd_iommu(unsigned int i     86 struct amd_iommu *get_amd_iommu(unsigned int idx);
 87                                                    87 
 88 #ifdef CONFIG_KVM_AMD_SEV                          88 #ifdef CONFIG_KVM_AMD_SEV
 89 int amd_iommu_snp_disable(void);                   89 int amd_iommu_snp_disable(void);
 90 #else                                              90 #else
 91 static inline int amd_iommu_snp_disable(void)      91 static inline int amd_iommu_snp_disable(void) { return 0; }
 92 #endif                                             92 #endif
 93                                                    93 
 94 #endif /* _ASM_X86_AMD_IOMMU_H */                  94 #endif /* _ASM_X86_AMD_IOMMU_H */
 95                                                    95 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php