RE: Does KVM use one EPT table per Guest CR3?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks again. 

I understand that the table can change over time, but it doesn't explain why the top-most table gets zapped and seemingly recreated with a different page frame (and thus the different EPTP values) so frequently. Why isn't the table being updated instead of being destroyed and then recreated? Which piece of the puzzle and I missing?

Thanks.


________________________________________
From: Anthony Liguori [anthony@xxxxxxxxxxxxx]
Sent: Tuesday, December 07, 2010 5:11 PM
To: Lok Kwong Yan
Cc: kvm@xxxxxxxxxxxxxxx
Subject: Re: Does KVM use one EPT table per Guest CR3?

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@xxxxxxxxxxxxx]
> Sent: Tuesday, December 07, 2010 4:57 PM
> To: Lok Kwong Yan
> Cc: kvm@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux