From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "pbonzini@redhat.com" <pbonzini@redhat.com>,
"karahmed@amazon.de" <karahmed@amazon.de>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bp@suse.de" <bp@suse.de>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"x86@kernel.org" <x86@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"dvlasenk@redhat.com" <dvlasenk@redhat.com>,
"rkrcmar@redhat.com" <rkrcmar@redhat.com>
Subject: Re: [PATCH] kvm, x86: Properly check whether a pfn is an MMIO or not
Date: Thu, 15 Sep 2016 16:04:18 +0000 [thread overview]
Message-ID: <1473955392.2092.76.camel@hpe.com> (raw)
In-Reply-To: <a063d76e-940c-5c68-bfca-fc0d99305411@redhat.com>
On Thu, 2016-09-15 at 08:22 +0200, Paolo Bonzini wrote:
>
> On 15/09/2016 07:54, Raslan, KarimAllah wrote:
> >
> >
> > >
> > > On Jun 22, 2016, at 3:41 PM, Paolo Bonzini <pbonzini@redhat.com>
> > > wrote:
> > >
> > >
> > >
> > > On 22/06/2016 04:34, KarimAllah Ahmed wrote:
> > > >
> > > > pfn_valid check is not sufficient because it only checks if a
> > > > page has a struct page or not, if for example "mem=" was passed
> > > > to the kernel some valid pages won't have a struct page. This
> > > > means that if guests were assigned valid memory that lies after
> > > > the mem= boundary it will be passed uncached to the guest no
> > > > matter what the guest caching attributes are for this memory.
> > >
> > > How can you pass memory after the mem= boundary to the guest?
> >
> > Does my previous reply answer your question?
>
> Yes, but I'm not sure it's the right way to do it. Looking at the
> e820 memory map seems pretty hacky.
Can you use region_intersects() for this check? See memremap() as an
example using this interface.
-Toshi
next prev parent reply other threads:[~2016-09-15 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 2:34 [PATCH] kvm, x86: Properly check whether a pfn is an MMIO or not KarimAllah Ahmed
2016-06-22 13:41 ` Paolo Bonzini
2016-06-22 14:11 ` Raslan, KarimAllah
2016-09-15 5:54 ` Raslan, KarimAllah
2016-09-15 6:22 ` Paolo Bonzini
2016-09-15 16:04 ` Kani, Toshimitsu [this message]
2016-09-15 16:22 ` Paolo Bonzini
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=1473955392.2092.76.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=karahmed@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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