Writes to guests' page table pages + mem_events
Hello,
looking at pages 6 and 7 of this document:
http://www-archive.xenproject.org/files/summit_3/XenSummit_Shadow2.pdf
I see that instructions writing to the page table pages of a guest are emulated by Xen.
Does this mean that, assuming that I make a page table page read-only, I will _not_ receive a mem_event if the guest tries to write to said page?
Thanks.
Quoted 6 lines · Razvan Cojocaru
Hello,
looking at pages 6 and 7 of this document:
http://www-archive.xenproject.org/files/summit_3/XenSummit_Shadow2.pdf
Quoted 8 lines
I see that instructions writing to the page table pages of a guest are emulated by Xen.
Does this mean that, assuming that I make a page table page read-only, I will _not_ receive a
mem_eventif the guest tries to write to said page?Thanks.
A PV guest never has write access to its pagetables. A PV guest able to modify its own pagetables without audit from Xen would be a serious security vulnerability.
An HVM guest completely controls its own pagetables, and protection is provided by HAP. Shadow is a little more awkward where a guest has pagetables which it believes it owns but doesn't. A shadow guest will fault on pagetable access but Xen will fix up.
~Andrew
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Hi,
Quoted 9 lines · Razvan Cojocaru
looking at pages 6 and 7 of this document:
http://www-archive.xenproject.org/files/summit_3/XenSummit_Shadow2.pdf
I see that instructions writing to the page table pages of a guest are emulated by Xen.
Does this mean that, assuming that I make a page table page read-only, I will _not_ receive a
mem_eventif the guest tries to write to said page?
No, it doesn't. That document describes the shadow-pagetable mechanism, which is currently incompatible with mem_event (the mem_event hypercalls check that the guest is using HAP).
Aravindh is looking into making (some parts of) mem_event work with PV guests in shadow mode; that will prbably use a quite different mechanims, closer to how log-dirty mode works.
Cheers,
Tim.