All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Sander Eikelenboom <linux@eikelenboom.it>
Subject: Re: [Xen-devel] [PATCH 1/3] AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page
Date: Thu, 7 Nov 2019 11:13:44 +0100	[thread overview]
Message-ID: <e9a13cff-0a01-b3f0-375f-0d92e4579130@suse.com> (raw)
In-Reply-To: <60e91912-1271-8b85-a11a-ed7f58366d1c@citrix.com>

On 06.11.2019 18:12, Andrew Cooper wrote:
> On 06/11/2019 15:18, Jan Beulich wrote:
>> Unmapping a page which has never been mapped should be a no-op (note how
>> it already is in case there was no root page table allocated).
> 
> Which function are you talking about here?  iommu_pde_from_dfn() will
> BUG() if no root was set up.

amd_iommu_unmap_page() has such a check first thing.

>> There's
>> in particular no need to grow the number of page table levels in use,
>> and there's also no need to allocate intermediate page tables except
>> when needing to split a large page.
> 
> To be honest, I've never been convinced that dynamically changing the
> number of levels in the AMD IOMMU tables is clever.  It should be fixed
> at 4 (like everything else) and suddenly a lot of runtime complexity
> disappears.  (I'm fairly confident that we'll need a domain create
> parameter to support 5 level paging in a rational way, so we won't even
> include walk-length gymnastics then either.)

5-level paging for the CPU 1st-stage-translation is imo pretty orthogonal
to needing 5 levels of paging for 2nd-stage-translation (which also is
what the IOMMU code here is about).

>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks, Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-11-07 10:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 15:16 [Xen-devel] [PATCH 0/3] AMD/IOMMU: re-work mode updating Jan Beulich
2019-11-06 15:18 ` [Xen-devel] [PATCH 1/3] AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page Jan Beulich
2019-11-06 17:12   ` Andrew Cooper
2019-11-07 10:13     ` Jan Beulich [this message]
2019-11-07 12:04   ` Paul Durrant
2019-11-12  9:59   ` Jürgen Groß
2019-11-06 15:19 ` [Xen-devel] [PATCH 2/3] introduce GFN notification for translated domains Jan Beulich
2019-11-07 11:35   ` George Dunlap
2019-11-07 11:47     ` Jan Beulich
2019-11-07 12:10       ` George Dunlap
2019-11-07 12:45         ` Jan Beulich
2019-11-06 15:19 ` [Xen-devel] [PATCH 3/3] AMD/IOMMU: use notify_dfn() hook to update paging mode Jan Beulich
2019-11-06 17:31 ` [Xen-devel] [PATCH 0/3] AMD/IOMMU: re-work mode updating Andrew Cooper
2019-11-07  7:36   ` Jan Beulich
2019-11-07 12:49     ` Andrew Cooper
2019-11-07 13:17       ` Jan Beulich
2019-11-06 18:29 ` Sander Eikelenboom
2019-11-07  7:32   ` Jan Beulich

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=e9a13cff-0a01-b3f0-375f-0d92e4579130@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=linux@eikelenboom.it \
    --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.