field, or the IOMMU won't actually resume logging events.
Signed-off-by: Lennert Buytenhek
---
Tested on v5.15-rc4 on a Ryzen 3700X.
Changes for v2:
- Rate limit event log overflow messages.
drivers/iommu/amd/amd_iommu.h | 1 +
drivers/iommu/amd/amd_iommu_types.h | 1 +
drivers/iommu/
On Tue, Sep 28, 2021 at 10:45:30AM +0200, Joerg Roedel wrote:
> Hi Lennert,
Hi Joerg,
Thanks for your feedback!
> > +/*
> > + * This function restarts event logging in case the IOMMU experienced
> > + * an event log buffer overflow.
> > + */
> > +void amd_iommu_restart_event_logging(struct amd
esent pages.
Signed-off-by: Lennert Buytenhek
---
Tested on v5.15-rc3 on a Ryzen 3700X and on a Ryzen 5950X, where it
has the desired effect.
Changes for v5:
- Code formatting tweaking. (Suggested by Joerg Roedel.)
Changes for v4:
- Unconditionally pass through RW bit, after testing that suggests
esent pages.
Signed-off-by: Lennert Buytenhek
---
Tested on v5.15-rc2 on a Ryzen 3700X, where it has the desired effect.
Changes for v4:
- Unconditionally pass through RW bit, after testing that suggests
that this bit is reliable even for I/O page faults to non-present
pages.
Changes for v3:
-
On Sat, Aug 21, 2021 at 06:44:39PM +0300, Lennert Buytenhek wrote:
> > > - EVENT_FLAG_I unset, but the request was a translation request
> > > (EVENT_FLAG_TR set) or the target page was not present
> > > (EVENT_FLAG_PR unset): call report_iommu_fault(), but the RW
On Thu, Aug 05, 2021 at 11:26:25AM -0500, Suthikulpanit, Suravee wrote:
> Lennert,
Hi Suravee,
> > - EVENT_FLAG_I unset, but the request was a translation request
> > (EVENT_FLAG_TR set) or the target page was not present
> > (EVENT_FLAG_PR unset): call report_iommu_fault(), but the RW
> >
field, or the
IOMMU won't actually resume logging events.
Signed-off-by: Lennert Buytenhek
---
N.B.: I have only tested this change against an older in-house custom
kernel version. (Where it appears to survive stress testing.) This
version of the patch was only compile-tested.
This p
On Fri, Jul 30, 2021 at 05:32:16AM +0300, Lennert Buytenhek wrote:
> > > This patch makes iommu/amd call report_iommu_fault() when an I/O page
> > > fault occurs, which has two effects:
> > >
> > > 1) It allows device drivers to register a callback to be n
de, as the page faults I
encounter are all to non-present (!EVENT_FLAG_PR) mappings, in which
case EVENT_FLAG_RW doesn't make sense.
Signed-off-by: Lennert Buytenhek
---
Changes for v3:
- Test fault flags via macros. (Suggested by Suravee Suthikulpanit.)
Changes for v2:
- Don't call rep
gt; IOMMU:[drvname] :05:00.0 iova=0x914826a0 flags=0x
> >
> > For determining IOMMU_FAULT_{READ,WRITE}, I followed the AMD IOMMU
> > spec, but I haven't tested that bit of the code, as the page faults I
> > encounter are all to non-present (!EVENT_F
de, as the page faults I
encounter are all to non-present (!EVENT_FLAG_PR) mappings, in which
case EVENT_FLAG_RW doesn't make sense.
Signed-off-by: Lennert Buytenhek
---
Changes since v1 RFC:
- Don't call report_iommu_fault() for IRQ remapping faults.
(Suggested by Joerg Roe
On Mon, Jul 26, 2021 at 01:54:49PM +0200, Joerg Roedel wrote:
> Hi Lennert,
Hi Joerg,
> On Mon, Jul 19, 2021 at 12:54:43PM +0300, Lennert Buytenhek wrote:
> > + if (dev_data) {
> > + int report_flags;
> > +
> > + /*
> > +
ce, IO_PAGE_FAULT event is used to communicate various types of
> fault events, why don't we just pass the flags as-is? This way, it can
> be used to report/trace various types of IO_PAGE_FAULT events (e.g.
> for I/O page table, interrupt remapping, and etc).
>
> Interested parties c
On Tue, Jul 20, 2021 at 07:05:50PM -0500, Suthikulpanit, Suravee wrote:
> Hi Lennert,
Hi Suravee,
> > On an AMD system, I/O page faults are usually logged like this:
> >
> > diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> > index 811a49a95d04..7ae426b092f2 100644
> > -
.
}
Suggested-by: Suravee Suthikulpanit
Signed-off-by: Lennert Buytenhek
---
drivers/iommu/amd/iommu.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 811a49a95d04..a7d6d78147b7 100644
---
de, as the page faults I
encounter are all to non-present (!EVENT_FLAG_PR) mappings, in which
case EVENT_FLAG_RW doesn't make sense.
Signed-off-by: Lennert Buytenhek
---
drivers/iommu/amd/amd_iommu_types.h |4
drivers/iommu/amd/iommu.c | 25 +
at check
succeeds, we will log the fault anyway, but in a different format.
Change this to only check printk_ratelimit() if !dev_data, which seems to
be what had been originally intended.
Signed-off-by: Lennert Buytenhek
---
drivers/iommu/amd/iommu.c |2 +-
1 file changed, 1 insertion(+)
17 matches
Mail list logo