All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH v2] x86/p2m-pt: tighten conditions of IOMMU mapping updates
Date: Thu, 1 Oct 2015 17:16:40 +0100	[thread overview]
Message-ID: <560D5C68.10109@citrix.com> (raw)
In-Reply-To: <560D261D02000078000A760A@prv-mh.provo.novell.com>

On 01/10/15 11:25, Jan Beulich wrote:
> Whether the MFN changes does not depend on the new entry being valid
> (but solely on the old one), and the need to update or TLB-flush also
> depends on permission changes.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

> ---
> v2: Split from larger patch. Fix logic determining whether to update/
>     flush IOMMU mappings.
> ---
> TBD: As already mentioned on the large-page-MMIO-mapping patch, there
>      is an apparent inconsistency with PoD handling: 2M mappings get
>      valid entries created, while 4k mappings don't. It would seem to
>      me that the 4k case needs changing, even if today this may only
>      be a latent bug. Question of course is why we don't rely on
>      p2m_type_to_flags() doing its job properly and instead special
>      case certain P2M types.

The inconsistency in the conditionals there is a bit strange; but I'm
pretty sure that in the 2MB case it is (at the moment) superfluous,
because at the moment it seems that when setting a page with type
p2m_populate_on_demand, it's always passing in _mfn(0), which is valid.

(It used to pass a magic MFN, but Tim Deegan switched it to _mfn(0) at
some point without comment.)

  parent reply	other threads:[~2015-10-01 16:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 10:25 [PATCH v2] x86/p2m-pt: tighten conditions of IOMMU mapping updates Jan Beulich
2015-10-01 13:34 ` Andrew Cooper
2015-10-01 14:36   ` Jan Beulich
2015-10-01 14:42     ` Andrew Cooper
2015-10-01 14:55 ` Wei Liu
2015-10-01 16:16 ` George Dunlap [this message]
2015-10-02  7:31   ` Jan Beulich
2015-10-02  9:16     ` Wei Liu
2015-10-02  9:25       ` Jan Beulich
2015-10-02  9:44       ` George Dunlap
2015-10-02  9:47     ` George Dunlap
2015-10-02 11:23       ` Jan Beulich
2015-10-02 12:19     ` Tim Deegan

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=560D5C68.10109@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --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.