From: Anthony Liguori <anthony@codemonkey.ws>
To: Lok Kwong Yan <loyan@syr.edu>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Does KVM use one EPT table per Guest CR3?
Date: Tue, 07 Dec 2010 16:11:50 -0600 [thread overview]
Message-ID: <4CFEB126.6070409@codemonkey.ws> (raw)
In-Reply-To: <562744ED4DABB345A26E01CB5D34F51031930BF9@BL2PRD0103MB033.prod.exchangelabs.com>
On 12/07/2010 04:00 PM, Lok Kwong Yan wrote:
> Thanks for the quick response. It is greatly appreciated.
>
> Can you please point me in the right direction on finding out why the EPTP (EPT_POINTER& mmu.root_hpa) have so many different values?
>
The table is built dynamically as memory is faulted in so it changes
over time. But the rate is significantly less than the rate you'd see
with shadow paging.
Unlike Xen, KVM doesn't just built an EPT table all at once and leave it
alone. The has to be updated as the guest is swapped in and out of memory.
Regards,
Anthony Liguori
> Thanks again.
>
> ________________________________________
> From: Anthony Liguori [anthony@codemonkey.ws]
> Sent: Tuesday, December 07, 2010 4:57 PM
> To: Lok Kwong Yan
> Cc: kvm@vger.kernel.org
> Subject: Re: Does KVM use one EPT table per Guest CR3?
>
> On 12/07/2010 03:47 PM, Lok Kwong Yan wrote:
>
>> After some testing and digging around the 2.6.32-26 Kernel, Ubuntu port, , it seems to me that KVM creates a separate EPT table for each separate guest CR3 value. So, if there are 100 guest processes, there are essentially 100 EPT tables. Is this correct?
>>
> No, it's not correct.
>
> Regards,
>
> Anthony Liguori
>
>
>> If so, can someone please tell me where these tables are actually being created? Is this design decision a historical artifact from how QEMU/KVM (without EPT/NPT) created multiple shadow page tables so that each guest/virtual CR3 value has a corresponding real CR3 value so that memory based separation for the guest is enforced?
>>
>> Thanks!--
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>>
>
next prev parent reply other threads:[~2010-12-07 22:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 21:47 Does KVM use one EPT table per Guest CR3? Lok Kwong Yan
2010-12-07 21:57 ` Anthony Liguori
2010-12-07 22:00 ` Lok Kwong Yan
2010-12-07 22:11 ` Anthony Liguori [this message]
2010-12-10 7:44 ` Lok Kwong Yan
2010-12-12 10:47 ` Avi Kivity
2010-12-16 22:14 ` Lok Kwong Yan
2010-12-17 15:24 ` Avi Kivity
2010-12-19 14:31 ` Avi Kivity
2010-12-22 21:56 ` Lok Kwong Yan
2011-02-10 20:47 ` Lok Kwong Yan
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=4CFEB126.6070409@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kvm@vger.kernel.org \
--cc=loyan@syr.edu \
/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