Download presentation
Presentation is loading. Please wait.
1
Shadow pagetables update
Tim Deegan, XenSource UK © Copyright , XenSource, Inc. All rights reserved. Xen, XenSource, XenEnterprise, XenServer and XenExpress are either registered trademarks or trademarks of XenSource Inc. in the United States and/or other countries. 12/28/2018
2
Shadow (II) architecture
Shadow pages on demand #PF, MOV CR3 Revoke guest write access to shadowed page Unshadow by refcount, memory pressure, or bogus contents Trap and emulate writes Atomically update original and shadows Per-domain “shadow lock” 12/28/2018
3
Don’t maintain shadows of PAE L3 tables
What’s changed? Don’t maintain shadows of PAE L3 tables Problems with shared-use pages Complex “sub-shadow” mechanisms Snapshot on MOV CR3 instead Fast unshadow Keep a single upward link in each shadow Fast write-access revocation Heuristics: guest’s linear maps, 1–1 maps 12/28/2018
4
Fast-path for MMIO, not-present
What’s changed? Fast-path for MMIO, not-present Use reserved bits in shadow PTEs Handle these faults without taking the lock Prefetching PTEs Interface cleanup Allow other “paging assistance” modes Shadow lock now entirely private p2m code split from shadow code 12/28/2018
5
(Office Productivity)
What’s changed? SysMark (Office Productivity) A: Not optimized B: Optimized Most of the benefit in this benchmark is from the fast-path and prefetch 12/28/2018
6
Cache guest virt-to-phys translations
Coming soon… Cache guest virt-to-phys translations Faster lookups in MMIO + emulation Invalidate on guest TLB flush or invlpg Emulate-ahead in PAE mode Guest that writes 32 bits to a PAE pagetable will soon write the “other half” x86_emulate now complete enough to run through a few instructions in between 12/28/2018
7
Re-introduce out-of-sync shadows
Not so soon… Re-introduce out-of-sync shadows Only for pages with heavy churn Spot many (~8) writes to the same page Keep trap-and-emulate for demand-paging Finer-grained shadow locking Per-page locks and top-down ordering Not until we know the shadow lock is the bottleneck 12/28/2018
8
Questions? 12/28/2018
9
Init/teardown of domains, vcpus. Domctl hypercall
Paging interface Init/teardown of domains, vcpus. Domctl hypercall Mem alloc’n, mode changes, log-dirty ops Calls for MMU programming events #PF, MOV CR3, MOV CR0/4, INVLPG Writes/cmpxchgs of pagetables Writes to p2m Reading/walking guest pagetables 12/28/2018
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.