All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Paul Durrant <paul@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>
Subject: [PATCH v2 3/4] VT-d: replace flush_all_cache()
Date: Thu, 27 Jan 2022 15:49:04 +0100	[thread overview]
Message-ID: <2a39cb48-7d38-6d7e-0557-fd93d377a31b@suse.com> (raw)
In-Reply-To: <4b7db7ae-eb84-7ecc-4334-fe5f0f7ef46b@suse.com>

Let's use infrastructure we have available instead of an open-coded
wbinvd() invocation.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/extern.h
+++ b/xen/drivers/passthrough/vtd/extern.h
@@ -78,8 +78,6 @@ int __must_check qinval_device_iotlb_syn
                                           struct pci_dev *pdev,
                                           u16 did, u16 size, u64 addr);
 
-void flush_all_cache(void);
-
 uint64_t alloc_pgtable_maddr(unsigned long npages, nodeid_t node);
 void free_pgtable_maddr(u64 maddr);
 void *map_vtd_domain_page(u64 maddr);
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -623,7 +623,8 @@ static int __must_check iommu_flush_all(
     bool_t flush_dev_iotlb;
     int rc = 0;
 
-    flush_all_cache();
+    flush_local(FLUSH_CACHE);
+
     for_each_drhd_unit ( drhd )
     {
         int context_rc, iotlb_rc;
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -46,8 +46,3 @@ void unmap_vtd_domain_page(const void *v
 {
     unmap_domain_page(va);
 }
-
-void flush_all_cache()
-{
-    wbinvd();
-}



  parent reply	other threads:[~2022-01-27 14:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 14:46 [PATCH v2 0/4] (mainly) IOMMU hook adjustments Jan Beulich
2022-01-27 14:47 ` [PATCH v2 1/4] IOMMU/x86: switch to alternatives-call patching in further instances Jan Beulich
2022-01-28  9:28   ` Durrant, Paul
2022-01-28 10:36     ` Jan Beulich
2022-01-28 10:54       ` Andrew Cooper
2022-01-28 10:40   ` Rahul Singh
2022-01-27 14:48 ` [PATCH v2 2/4] VT-d / x86: re-arrange cache syncing Jan Beulich
2022-01-28  9:32   ` Durrant, Paul
2022-02-18  5:34   ` Tian, Kevin
2022-01-27 14:49 ` Jan Beulich [this message]
2022-01-28  9:33   ` [PATCH v2 3/4] VT-d: replace flush_all_cache() Durrant, Paul
2022-02-18  5:35   ` Tian, Kevin
2022-01-27 14:49 ` [PATCH v2 4/4] IOMMU/PCI: propagate get_device_group_id() failure Jan Beulich
2022-01-28  9:37   ` Durrant, Paul
2022-02-18  5:42   ` Tian, Kevin

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=2a39cb48-7d38-6d7e-0557-fd93d377a31b@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.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.