EPT Violation On a PTE free

EPT Violation On a PTE free

 Hi All,

       Is it possible to configure EPT Entries or VMCS such that whenever a guest frees a page

the host can instantaneously become aware of this. I have checked out the intel software developer

manual 3B. But the closest I could  get is by causing a write violation in the EPT paging structure.

But again, it did not seem proper as such writing violation can arise because of many other reasons

as well. Besides, the whole performance of EPT would be destroyed if the guest does cache-writethrough.

     I was testing this stuff with KVM and I could see that the host is not aware of  deallocations that  take

place in the guest after allocations.


Saptarshi Sen





3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

I got a feedback from an expert:

"I assume that, when the poster writes about the situation when "a guest frees a page," he or she means something like "the guest writes a PTE to clear the present (P) bit."

I do not believe that the only way that host software can configure things to get the desired notifications is to do as the poster indicates:  use EPT to mark all the guest page tables as read-only.  The poster is correct that doing so would have serious performance consequences.

If the goal is for the host to re-used pages freed by a guest for other purposes (e.g., to assign to another guest), the host could always choose to do so independent of the guest's usage.  (It could save the page's data when doing so - see below.)  If it does so with a page that the guest has freed (without the host's knowledge), the desired result is achieved.  If the guest has not freed the page in question, the guest will eventually incur an EPT violation, giving the host the opportunity to restore the page to the guest.

If running on more recent parts, EPT A/D bits could be used to perform this operation more efficiently.  That is, the host could periodically clear EPT A bits to determine which guest pages were used most recently (by seeing which EPT A bits are set later on).

Perhaps the poster seeks knowledge of which pages have been freed (by the guest) to avoid the need to save the page's data when re-assigning a page from one guest to another.  I am not sure whether this is generally a safe strategy.  Its validity probably depends on specifics of the guest operating system."

Hope this helps,

A new blog was created to provide resources for sw developers: Resources for Software Developers: Intel® Virtualization Technology (Intel® VT)


Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui