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 4/7] VT-d: replace find_ats_dev_drhd()
Date: Thu, 8 Feb 2024 18:31:38 +0100 [thread overview]
Message-ID: <ZcUP-t5gFx2v31at@macbook> (raw)
In-Reply-To: <a75bef32-8bbb-4471-b26b-981b06173cd5@suse.com>
On Mon, Feb 05, 2024 at 02:56:36PM +0100, Jan Beulich wrote:
> All callers only care about boolean outcome. For this there's no point
> in allocating a duplicate of the respective DRHD structure; a simple
> boolean suffices (which eventually may wantg to become a count, such
^ want
> that the "any ATS devices assigned state" can also clear again). With
> that boolean, remove respective parameters from internal helper
> functions right away, as those have access to the flag through another
> parameter.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
AFAICT the intention is that this is a non-functional change?
>
> --- a/xen/drivers/passthrough/vtd/extern.h
> +++ b/xen/drivers/passthrough/vtd/extern.h
> @@ -65,8 +65,6 @@ struct acpi_drhd_unit *ioapic_to_drhd(un
> struct acpi_drhd_unit *hpet_to_drhd(unsigned int hpet_id);
> struct acpi_rhsa_unit *drhd_to_rhsa(const struct acpi_drhd_unit *drhd);
>
> -struct acpi_drhd_unit *find_ats_dev_drhd(struct vtd_iommu *iommu);
> -
> int ats_device(const struct pci_dev *, const struct acpi_drhd_unit *);
>
> int dev_invalidate_iotlb(struct vtd_iommu *iommu, u16 did,
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -624,8 +624,7 @@ int cf_check vtd_flush_iotlb_reg(
> }
>
> static int __must_check iommu_flush_iotlb_global(struct vtd_iommu *iommu,
> - bool flush_non_present_entry,
> - bool flush_dev_iotlb)
> + bool flush_non_present_entry)
> {
> int status;
>
> @@ -633,7 +632,7 @@ static int __must_check iommu_flush_iotl
> vtd_ops_preamble_quirk(iommu);
>
> status = iommu->flush.iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH,
> - flush_non_present_entry, flush_dev_iotlb);
> + flush_non_present_entry, iommu->flush_dev_iotlb);
Any reason to not also remove the parameter from here also? As the handler
gets iommu passed as the first parameter anyway.
Thanks, Roger.
next prev parent reply other threads:[~2024-02-08 17:31 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é
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é [this message]
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=ZcUP-t5gFx2v31at@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.