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

Re: [Xen-devel] [PATCH 1/9] AMD/IOMMU: use bit field for extended feature register



>>> On 17.06.19 at 21:07, <Brian.Woods@xxxxxxx> wrote:
> On Thu, Jun 13, 2019 at 07:22:31AM -0600, Jan Beulich wrote:
>> --- a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
>> +++ b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
>> @@ -346,26 +346,57 @@ struct amd_iommu_dte {
>>  #define IOMMU_EXCLUSION_LIMIT_HIGH_MASK             0xFFFFFFFF
>>  #define IOMMU_EXCLUSION_LIMIT_HIGH_SHIFT    0
>>  
>> -/* Extended Feature Register*/
>> +/* Extended Feature Register */
>>  #define IOMMU_EXT_FEATURE_MMIO_OFFSET                   0x30
>> -#define IOMMU_EXT_FEATURE_PREFSUP_SHIFT                 0x0
>> -#define IOMMU_EXT_FEATURE_PPRSUP_SHIFT                  0x1
>> -#define IOMMU_EXT_FEATURE_XTSUP_SHIFT                   0x2
>> -#define IOMMU_EXT_FEATURE_NXSUP_SHIFT                   0x3
>> -#define IOMMU_EXT_FEATURE_GTSUP_SHIFT                   0x4
>> -#define IOMMU_EXT_FEATURE_IASUP_SHIFT                   0x6
>> -#define IOMMU_EXT_FEATURE_GASUP_SHIFT                   0x7
>> -#define IOMMU_EXT_FEATURE_HESUP_SHIFT                   0x8
>> -#define IOMMU_EXT_FEATURE_PCSUP_SHIFT                   0x9
>> -#define IOMMU_EXT_FEATURE_HATS_SHIFT                    0x10
>> -#define IOMMU_EXT_FEATURE_HATS_MASK                     0x00000C00
>> -#define IOMMU_EXT_FEATURE_GATS_SHIFT                    0x12
>> -#define IOMMU_EXT_FEATURE_GATS_MASK                     0x00003000
>> -#define IOMMU_EXT_FEATURE_GLXSUP_SHIFT                  0x14
>> -#define IOMMU_EXT_FEATURE_GLXSUP_MASK                   0x0000C000
>>  
>> -#define IOMMU_EXT_FEATURE_PASMAX_SHIFT                  0x0
>> -#define IOMMU_EXT_FEATURE_PASMAX_MASK                   0x0000001F
>> +union amd_iommu_ext_features {
>> +    uint64_t raw;
>> +    struct {
>> +        unsigned int pref_sup:1;
>> +        unsigned int ppr_sup:1;
>> +        unsigned int xt_sup:1;
>> +        unsigned int nx_sup:1;
>> +        unsigned int gt_sup:1;
>> +        unsigned int gappi_sup:1;
>> +        unsigned int ia_sup:1;
>> +        unsigned int ga_sup:1;
>> +        unsigned int he_sup:1;
>> +        unsigned int pc_sup:1;
>> +        unsigned int hats:2;
>> +        unsigned int gats:2;
>> +        unsigned int glx_sup:2;
>> +        unsigned int smif_sup:2;
>> +        unsigned int smif_rc:3;
>> +        unsigned int gam_sup:3;
>> +        unsigned int dual_ppr_log_sup:2;
>> +        unsigned int :2;
>> +        unsigned int dual_event_log_sup:2;
> 
>> +        unsigned int sat_sup:1;
>> +        unsigned int :1;
> I think these might be flipped.

Oh, indeed. And I've also omitted an 's' from the name. Thanks for
noticing.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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