Re: [PATCH RFC 09/19] iommu/amd: Access/Dirty bit support in IOPTEs

2022-05-31 Thread Joao Martins
On 5/31/22 12:34, Suravee Suthikulpanit wrote: > Joao, > > On 4/29/22 4:09 AM, Joao Martins wrote: >> . >> +static int amd_iommu_set_dirty_tracking(struct iommu_domain *domain, >> +bool enable) >> +{ >> +struct protection_domain *pdomain = to_pdomain(dom

Re: [PATCH RFC 09/19] iommu/amd: Access/Dirty bit support in IOPTEs

2022-05-31 Thread Baolu Lu
Hi Suravee , On 2022/5/31 19:34, Suravee Suthikulpanit wrote: On 4/29/22 4:09 AM, Joao Martins wrote: . +static int amd_iommu_set_dirty_tracking(struct iommu_domain *domain, +    bool enable) +{ +    struct protection_domain *pdomain = to_pdomain(domain); +    struct iommu_d

Re: [PATCH RFC 09/19] iommu/amd: Access/Dirty bit support in IOPTEs

2022-05-31 Thread Suravee Suthikulpanit via iommu
Joao, On 4/29/22 4:09 AM, Joao Martins wrote: . +static int amd_iommu_set_dirty_tracking(struct iommu_domain *domain, + bool enable) +{ + struct protection_domain *pdomain = to_pdomain(domain); + struct iommu_dev_data *dev_data; + bool

[PATCH RFC 09/19] iommu/amd: Access/Dirty bit support in IOPTEs

2022-04-28 Thread Joao Martins
IOMMU advertises Access/Dirty bits if the extended feature register reports it. Relevant AMD IOMMU SDM ref[0] "1.3.8 Enhanced Support for Access and Dirty Bits" To enable it set the DTE flag in bits 7 and 8 to enable access, or access+dirty. With that, the IOMMU starts marking the D and A flags on