From: Pranjal Shrivastava <praan@google.com>
To: Daniel Mentz <danielmentz@google.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Mostafa Saleh <smostafa@google.com>,
Nicolin Chen <nicolinc@nvidia.com>,
iommu@lists.linux.dev, Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v5 0/3] iommu/arm-smmu-v3: Parse out event records
Date: Wed, 20 Nov 2024 11:43:33 +0000 [thread overview]
Message-ID: <Zz3LZaYh_-Ut-mMQ@google.com> (raw)
In-Reply-To: <CAN6iL-SwmwgiyhvCkGV__Q4D_K4TRD+6ZD1O4YJS2qtamW1k_g@mail.gmail.com>
On Wed, Nov 20, 2024 at 12:24:43PM +0530, Pranjal Shrivastava wrote:
> Hi Daniel,
>
> On Wed, Nov 20, 2024 at 10:15 AM Daniel Mentz <danielmentz@google.com> wrote:
> >
> > On Tue, Nov 12, 2024 at 12:30 AM Pranjal Shrivastava <praan@google.com> wrote:
> > >
> > > Enhance the arm-smmu-v3 driver to parse out useful information from
> > > event records into a structure for better event handling & logging.
> >
> > Hi Pranjal,
> >
> > Thank you for putting this together.
> >
> > >
> > > Some sample events, powered by QEMU:
> >
> > > 4. Translation Fault:
> > >
> > > [ 7.586428] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x10 received:
> > > [ 7.587012] arm-smmu-v3 arm-smmu-v3.0.auto: 0x0000000800000010
> > > [ 7.587504] arm-smmu-v3 arm-smmu-v3.0.auto: 0x0000020000000000
> > > [ 7.587986] arm-smmu-v3 arm-smmu-v3.0.auto: 0x00000000fffff040
> > > [ 7.588745] arm-smmu-v3 arm-smmu-v3.0.auto: 0x0000000000000000
> > > [ 7.589219] arm-smmu-v3 arm-smmu-v3.0.auto: Event 0x10 received: F_TRANSLATION
> > > [ 7.589219] client: 0000:00:01.0 sid: 0x8 ssid: 0x0
> > > [ 7.589219] iova 0xfffff040 ipa 0x0
> > > [ 7.589219] Unpriv | Data | Write | S1 | Input address caused fault
> > > [ 7.589219] STAG: 0x0
> >
> > I find that "Event 0x10" is redundant and recommend removing it. Maybe
> > print just "Event F_TRANSLATION"
>
I agree, however, in the past reviews [1] we've been asked to keep the
existing log "as is" unless there's a particularly compelling reason.
>
> >
> > Not printing the prefix "arm-smmu-v3 arm-smmu-v3.0.auto:" on
> > subsequent lines appears to be inconsistent with how the raw event
> > bits are dumped. Also, I typically run a command like "grep
> > 'arm-smmu-v3 arm-smmu-v3.0.auto' uart.log" while I'm developing smmu
> > driver code, and with the proposed change, the grep command wouldn't
> > print most of the event details, because they are not prefixed by
> > "arm-smmu-v3 arm-smmu-v3.0.auto"
>
> I see. The prefix isn't getting picked up because I'm trying to print
> all the lines in
> a single `dev_err` in order to avoid other logs inter-mingling with
> these ones. I can add
> that if we are okay with using multiple `dev_err` calls (i.e.
> potentially allowing other logs
> to mix-in). Otherwise, let me see how we can manually add the dev_fmt
> string in the log.
>
> >
> > The words "client", "sid" and "ssid" are followed by a colon (":") but
> > iova and ipa are not.
> >
>
> Ack. Will fix that.
>
> > Can you put everything up to and including iova on the first line and
> > the rest on the second line?
Finally my email client is fine.
Did you mean something like the following:
[ 7.589219] arm-smmu-v3 arm-smmu-v3.0.auto: Event 0x10 received: F_TRANSLATION
[ 7.589219] arm-smmu-v3 arm-smmu-v3.0.auto: client: 0000:00:01.0 sid: 0x8 ssid: 0x0 iova: 0xfffff040 ipa: 0x0
[ 7.589219] arm-smmu-v3 arm-smmu-v3.0.auto: Unpriv | Data | Write | S1 | Input address caused fault | STAG: 0x0
Thanks.
Praan
[1] https://lore.kernel.org/all/08498356-d892-4756-89e1-45b2654faa42@arm.com/#:~:text=safest%20to%20leave%20any%20existing%20%0Amessages%20exactly
next prev parent reply other threads:[~2024-11-20 11:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 8:30 [PATCH v5 0/3] iommu/arm-smmu-v3: Parse out event records Pranjal Shrivastava
2024-11-12 8:30 ` [PATCH v5 1/3] iommu/arm-smmu-v3: Introduce struct arm_smmu_event Pranjal Shrivastava
2024-11-12 23:30 ` Nicolin Chen
2024-11-15 13:13 ` Pranjal Shrivastava
2024-11-15 21:34 ` Nicolin Chen
2024-11-18 16:24 ` Jason Gunthorpe
2024-11-19 9:03 ` Will Deacon
2024-11-19 9:27 ` Pranjal Shrivastava
2024-11-20 9:56 ` Will Deacon
2024-11-20 11:46 ` Pranjal Shrivastava
2024-11-27 3:25 ` Daniel Mentz
2024-11-27 9:25 ` Pranjal Shrivastava
2024-11-27 19:42 ` Daniel Mentz
2024-11-27 20:53 ` Pranjal Shrivastava
2024-11-28 23:40 ` Daniel Mentz
2024-11-29 12:56 ` Pranjal Shrivastava
2024-11-12 8:30 ` [PATCH v5 2/3] iommu/arm-smmu-v3: Log better event records Pranjal Shrivastava
2024-11-12 8:30 ` [PATCH v5 3/3] iommu/arm-smmu-v3: Avoid redundant master lookup in events Pranjal Shrivastava
2024-11-12 23:52 ` Nicolin Chen
2024-11-15 13:26 ` Pranjal Shrivastava
2024-11-15 21:46 ` Nicolin Chen
2024-11-20 4:45 ` [PATCH v5 0/3] iommu/arm-smmu-v3: Parse out event records Daniel Mentz
2024-11-20 6:54 ` Pranjal Shrivastava
2024-11-20 7:12 ` Pranjal Shrivastava
2024-11-20 11:43 ` Pranjal Shrivastava [this message]
2024-11-22 23:33 ` Daniel Mentz
2024-11-26 9:30 ` Pranjal Shrivastava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zz3LZaYh_-Ut-mMQ@google.com \
--to=praan@google.com \
--cc=danielmentz@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=smostafa@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox