From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Kevin Tian <kevin.tian@intel.com>, Paul Durrant <paul@xen.org>
Subject: Re: [PATCH 1/7] VT-d: parse ACPI "SoC Integrated Address Translation Cache Reporting Structure"s
Date: Mon, 12 Feb 2024 11:06:48 +0100 [thread overview]
Message-ID: <ZcntuO3reX_HcYem@macbook> (raw)
In-Reply-To: <8715f268-be7b-43c6-bb55-4839427014f5@suse.com>
On Mon, Feb 12, 2024 at 10:32:00AM +0100, Jan Beulich wrote:
> On 09.02.2024 10:00, Roger Pau Monné wrote:
> > On Thu, Feb 08, 2024 at 04:29:34PM +0100, Jan Beulich wrote:
> >> On 08.02.2024 10:17, Roger Pau Monné wrote:
> >>> On Mon, Feb 05, 2024 at 02:55:17PM +0100, Jan Beulich wrote:
> >>>> + {
> >>>> + dprintk(XENLOG_WARNING VTDPREFIX,
> >>>> + " Non-existent device (%pp) is reported in SATC scope!\n",
> >>>> + &PCI_SBDF(satcu->segment, b, d, f));
> >>>> + ignore = true;
> >>>
> >>> This is kind of reporting is incomplete: as soon as one device is
> >>> found the loop is exited and no further detection happens. If we want
> >>> to print such information, we should do the full scan and avoid
> >>> exiting early when a populated device is detected.
> >>
> >> Not sure I follow, but first of all - these are dprintk()s only, so
> >> meant to only help in dev environments. Specifically ...
> >>
> >>>> + }
> >>>> + else
> >>>> + {
> >>>> + ignore = false;
> >>>> + break;
> >>>> + }
> >>>> + }
> >>>> +
> >>>> + if ( ignore )
> >>>> + {
> >>>> + dprintk(XENLOG_WARNING VTDPREFIX,
> >>>> + " Ignore SATC for seg %04x as no device under its scope is PCI discoverable!\n",
> >>
> >> ... this message is then issued only bogus entries were found. IOW
> >> when a real device was found, there's no real reason to report N
> >> other bogus ones, I think.
> >
> > I guess it's a question of taste. I do find it odd (asymmetric
> > maybe?) that we stop reporting non-existing devices once a valid
> > device is found. Makes me wonder what's the point of reporting them
> > in the first place, if the list of non-existing devices is not
> > complete?
>
> Since you look to not be taking this into account, let me re-emphasize
> that these are dprintk() only. In the event of an issue, seeing the
> log messages you at least get a hint of one device that poses a
> problem. That may or may not be enough of an indication for figuring
> what's wrong. Making the loop run for longer than necessary when
> especially in a release build there's not going to be any change (but
> the logic would become [slightly] more complex, as after setting
> "ignore" to true we'd need to avoid clearing it back to false) is just
> pointless imo. IOW I view this 1st message as merely a courtesy for
> the case where the 2nd one would end up also being logged.
I will not insist anymore.
> >>>> + satcu = xzalloc(struct acpi_satc_unit);
> >>>> + if ( !satcu )
> >>>> + return -ENOMEM;
> >>>> +
> >>>> + satcu->segment = satc->segment;
> >>>> + satcu->atc_required = satc->flags & 1;
> >>>
> >>> I would add this as a define in actbl2.h:
> >>>
> >>> #define ACPI_DMAR_ATC_REQUIRED (1U << 0)
> >>>
> >>> Or some such (maybe just using plain 1 is also fine).
> >>
> >> I intended to do so, but strictly staying in line with what Linux has.
> >> To my surprise they use a literal number and have no #define. Hence I
> >> didn't add any either.
> >
> > I would prefer the define unless you have strong objections, even if
> > that means diverging from Linux.
>
> I could probably accept such a #define living in one of dmar.[ch]. I'd
> rather not see it go into actbl2.h.
Fine. I think the current open coding of 1 in Linux is wrong. Other
flag fields in DMAR structures have the related defines.
Thanks, Roger.
next prev parent reply other threads:[~2024-02-12 10:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 13:53 [PATCH 0/7] VT-d: SATC handling and ATS tidying Jan Beulich
2024-02-05 13:55 ` [PATCH 1/7] VT-d: parse ACPI "SoC Integrated Address Translation Cache Reporting Structure"s Jan Beulich
2024-02-08 9:17 ` Roger Pau Monné
2024-02-08 15:29 ` Jan Beulich
2024-02-09 9:00 ` Roger Pau Monné
2024-02-12 9:32 ` Jan Beulich
2024-02-12 10:06 ` Roger Pau Monné [this message]
2024-02-05 13:55 ` [PATCH 2/7] IOMMU: rename and re-type ats_enabled Jan Beulich
2024-02-08 11:49 ` Roger Pau Monné
2024-02-08 15:49 ` Jan Beulich
2024-02-12 9:39 ` Roger Pau Monné
2024-02-12 10:45 ` Jan Beulich
2024-02-12 15:38 ` Roger Pau Monné
2024-02-12 15:59 ` Jan Beulich
2024-02-05 13:56 ` [PATCH 3/7] VT-d: respect ACPI SATC's ATC_REQUIRED flag Jan Beulich
2024-02-08 12:42 ` Roger Pau Monné
2024-02-12 11:06 ` Jan Beulich
2024-02-05 13:56 ` [PATCH 4/7] VT-d: replace find_ats_dev_drhd() Jan Beulich
2024-02-08 17:31 ` Roger Pau Monné
2024-02-09 7:06 ` Jan Beulich
2024-02-09 8:11 ` Roger Pau Monné
2024-02-05 13:56 ` [PATCH 5/7] VT-d: move ats_device() to the sole file it's used from Jan Beulich
2024-02-09 8:15 ` Roger Pau Monné
2024-02-05 13:57 ` [PATCH 6/7] VT-d: move dev_invalidate_iotlb() " Jan Beulich
2024-02-09 8:25 ` Roger Pau Monné
2024-02-09 14:44 ` Jan Beulich
2024-02-05 13:57 ` [PATCH 7/7] VT-d: move {,un}map_vtd_domain_page() Jan Beulich
2024-02-09 8:39 ` Roger Pau Monné
2024-02-12 9:46 ` Jan Beulich
2024-02-12 10:11 ` Roger Pau Monné
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=ZcntuO3reX_HcYem@macbook \
--to=roger.pau@citrix.com \
--cc=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=paul@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.