From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Kay, Allen M" <allen.m.kay@intel.com>,
kvm@vger.kernel.org, Amit Shah <amit.shah@qumranet.com>,
Ben-Ami Yassour1 <BENAMI@il.ibm.com>,
Avi Kivity <avik@qumranet.com>, Chris Wright <chrisw@redhat.com>,
"Han, Weidong" <weidong.han@intel.com>
Subject: Re: [PATCH 4/4][VTD] vt-d specific files in KVM
Date: Tue, 10 Jun 2008 17:56:38 +0300 [thread overview]
Message-ID: <20080610145638.GF6702@il.ibm.com> (raw)
In-Reply-To: <484E8EFC.10007@codemonkey.ws>
On Tue, Jun 10, 2008 at 09:26:04AM -0500, Anthony Liguori wrote:
>> Checking against pfn_valid() isn't enough to differentiate between
>> RAM and MMIO areas. I think the consensus was that we also need to
>> check PageReserved(), i.e.,
>>
>> if (pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn))) ...
>>
>
> When checking the error return of gfn_to_pfn(), you should use
> is_error_pfn(). There's no need to differentiate mmio/ram pages in
> the code, the goal is just error checking.
I'd have to check the exact semantics of is_error_pfn() to see if it
fits, since strictly speaking what we are doing is not checking
pfn_to_page() for errors. We need to differentiate between gfns which
represent RAM (which needs to be mapped into the VT-d page tables) and
gfns which don't (e.g, slots which represent an MMIO region), which
should not be mapped in the VT-d page tables.
Cheers,
Muli
next prev parent reply other threads:[~2008-06-10 14:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 0:43 [PATCH 4/4][VTD] vt-d specific files in KVM Kay, Allen M
2008-06-10 10:27 ` Muli Ben-Yehuda
2008-06-10 14:26 ` Anthony Liguori
2008-06-10 14:56 ` Muli Ben-Yehuda [this message]
2008-06-10 15:02 ` Anthony Liguori
2008-06-10 15:15 ` Muli Ben-Yehuda
2008-06-10 15:24 ` Anthony Liguori
2008-06-10 16:07 ` Muli Ben-Yehuda
2008-06-20 18:24 ` Avi Kivity
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=20080610145638.GF6702@il.ibm.com \
--to=muli@il.ibm.com \
--cc=BENAMI@il.ibm.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@qumranet.com \
--cc=anthony@codemonkey.ws \
--cc=avik@qumranet.com \
--cc=chrisw@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=weidong.han@intel.com \
/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