All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Huang <wei.huang2@amd.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: bo ma <kyle.ma83@gmail.com>, xen-devel@lists.xensource.com
Subject: Re: NPT and EPT question
Date: Mon, 17 Nov 2008 16:27:42 -0600	[thread overview]
Message-ID: <4921EFDE.3050506@amd.com> (raw)
In-Reply-To: <20081117134123.GI25331@york.uk.xensource.com>

I think Tim is right. On my spec (24593, Dec 2005), it is explained as 
the following:

"Table walks for guest page tables are always treated as user writes at 
the host level. For this reason,
* the page must be writable by user at the host level, or else a 
#VMEXIT(NPF) is raised, and
* the dirty and accessed bits are always set in the host page table 
entries that were touched during nested page table walks for guest page 
table entries"

As explained in the second one, CPU needs to update guest table entries 
(A and D bits, especially A bit) when it walks through guest table. That 
is why the dirty and accessed bits are set in host table.

-Wei



Tim Deegan wrote:
> Hi,
> 
> At 21:23 +0800 on 17 Nov (1226957017), bo ma wrote:
>> Recent I read AMD specification about NPT,and met with a question about a
>> sentence.
>>
>> The sentence is : Note that host table walks for guest page tables are
>> always treated as data writes.I don't know why treated as data writes?
> 
> Possibly because the guest-table walker might have to set the A and D
> bits, and the hardware doesn't know whether it will do that until
> _after_ it's done the host-table walk.
> 
> Maybe someone from AMD can clarify. 
> 
>> In intel EPT ,is it the same? or treated as data reads?
> 
> My impression is that EPT only requires write permissions if it actually
> writes back an A or D bit, but I'm not sure.   It should be easy to check.
> 
> Cheers,
> 
> Tim
> 

  reply	other threads:[~2008-11-17 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17 13:23 NPT and EPT question bo ma
2008-11-17 13:41 ` Tim Deegan
2008-11-17 22:27   ` Wei Huang [this message]
2008-11-18  1:13     ` bo ma

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=4921EFDE.3050506@amd.com \
    --to=wei.huang2@amd.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=kyle.ma83@gmail.com \
    --cc=xen-devel@lists.xensource.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 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.