From: David Woodhouse <dwmw2@infradead.org>
To: Jan Beulich <JBeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Tim Deegan <tim@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen/mm: Alter is_iomem_page() to use mfn_t
Date: Mon, 06 Feb 2017 14:48:56 +0000 [thread overview]
Message-ID: <1486392536.5110.80.camel@infradead.org> (raw)
In-Reply-To: <589895B70200007800136F0F@prv-mh.provo.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1490 bytes --]
On Mon, 2017-02-06 at 07:26 -0700, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 06.02.17 at 14:55, <andrew.cooper3@citrix.com> wrote:
> > Switch its return type to bool to match its use, and simplify the
> > ARM
> > implementation slightly.
> >
> > No functional change.
> >
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
> And perhaps that's what should be used in epte_get_entry_emt()
> instead of !mfn_valid() in David's patch. David, would you be okay
> with your patch changed to that effect upon commit?
I don't think that works, at least not literally
s/!mfn_valid()/is_iomem_page()/
In my patch, mfn_valid() is checked *after* we've processed the
'direct_mmio' case that all MMIO should hit. In a sane world I think
it's *only* actually catching INVALID_MFN, and probably should never
match on any other value of mfn.
I don't quite understand why we pass 'direct_mmio' in as a separate
argument. Perhaps there's scope for doing a sanity check that
'direct_mmio == is_iomem_page(mfn)' — because when would that *not* be
true?
But sanity checks are of dubious utility because it must be noted that
we have no way to return failure for order==0 anyway; that 'return -1'
idiom is dangerous in epte_get_entry_emt(), and that's why I gave it an
extra comment.
So if we can use is_iomem_page() do we ditch the direct_mmio argument
to the function entirely?
--
dwmw2
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 4938 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-06 14:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 13:55 [PATCH] xen/mm: Alter is_iomem_page() to use mfn_t Andrew Cooper
2017-02-06 14:02 ` Julien Grall
2017-02-06 14:11 ` George Dunlap
2017-02-06 14:26 ` Jan Beulich
2017-02-06 14:48 ` David Woodhouse [this message]
2017-02-06 15:38 ` Jan Beulich
2017-02-08 7:31 ` Tian, Kevin
2017-02-08 17:05 ` Jan Beulich
2017-02-09 8:27 ` Chao Gao
2017-02-09 8:56 ` Jan Beulich
2017-02-09 3:54 ` Chao Gao
2017-02-09 11:10 ` David Woodhouse
2017-02-09 9:01 ` David Woodhouse
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=1486392536.5110.80.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).