[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 2/4] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH



On 25.05.2021 10:44, Jan Beulich wrote:
> On 24.05.2021 16:34, Connor Davis wrote:
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -51,9 +51,15 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
>>      return dfn_x(x) == dfn_x(y);
>>  }
>>  
>> -extern bool_t iommu_enable, iommu_enabled;
>> +extern bool_t iommu_enable;
> 
> ... just "bool" used here, as I think I did say before. Can be taken
> care of while committing, I think.

Actually, while preparing to commit this, I realized this would
better be

--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -51,8 +51,12 @@ static inline bool_t dfn_eq(dfn_t x, dfn_t y)
     return dfn_x(x) == dfn_x(y);
 }
 
+#ifdef CONFIG_HAS_PASSTHROUGH
 extern bool_t iommu_enable, iommu_enabled;
 extern bool force_iommu, iommu_quarantine, iommu_verbose;
+#else
+#define iommu_enabled false
+#endif
 
 #ifdef CONFIG_X86
 extern enum __packed iommu_intremap {

Which is what I'm about to commit.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.