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: Andrew Cooper <andrew.cooper3@citrix.com>, Paul Durrant <paul@xen.org>
Subject: [PATCH] AMD/IOMMU: don't leave page table mapped when unmapping ...
Date: Thu, 19 Aug 2021 10:03:41 +0200	[thread overview]
Message-ID: <dfc83bb9-66f4-e8da-20c6-e4730e0fecde@suse.com> (raw)

... an already not mapped page. With all other exit paths doing the
unmap, I have no idea how I managed to miss that aspect at the time.

Fixes: ad591454f069 ("AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/amd/iommu_map.c	2021-07-22 08:07:12.501229386 +0200
+++ b/xen/drivers/passthrough/amd/iommu_map.c	2021-07-22 08:08:02.360893418 +0200
@@ -243,7 +243,10 @@ static int iommu_pde_from_dfn(struct dom
         else if ( !pde->pr )
         {
             if ( !map )
+            {
+                unmap_domain_page(next_table_vaddr);
                 return 0;
+            }
 
             if ( next_table_mfn == 0 )
             {



             reply	other threads:[~2021-08-19  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  8:03 Jan Beulich [this message]
2021-08-19 18:55 ` [PATCH] AMD/IOMMU: don't leave page table mapped when unmapping Paul Durrant

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=dfc83bb9-66f4-e8da-20c6-e4730e0fecde@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.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.