Bug 53611
Summary: | nVMX: Add nested EPT | ||
---|---|---|---|
Product: | Virtualization | Reporter: | Nadav Har'El (nyh) |
Component: | kvm | Assignee: | virtualization_kvm |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bonzini |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.19 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 94971, 53601 | ||
Attachments: | Nested EPT patches, v2 |
Description
Nadav Har'El
2013-02-11 12:49:05 UTC
In addition to the known issues list in the "announce" file attached above, I thought of several more issues that should be considered: 1. When switching back and forth between L1 and L2 it will be a waste to throw away the EPT table already built. So I hope (need to check...) that the EPT table is cached. But what is the cache key - the cr3? But cr3 has a different meaning in L2 and L1, so it might not be correct to use that as the key. 2. When L0 swaps out pages, it needs to remove these entries in all EPT tables, including the cached EPT02 even if not currently used. Does this happen correctly? 3. If L1 uses EPT ("nested EPT") and gives us a malformed EPT12 table, we may need to inject an EPT_MISCONFIGURATION exit when building the merged EPT02 entry. Typically, we do this building (see "fetch" in paging_tmpl.h) when handling an EPT violation exit from L2, so if we encounter this problem instead of reentering L2 immediately, we should exit to L1 with an EPT misconfigration. I'm not sure exactly how to notice this problem. Perhaps the pagetable walking code, which in our case walks EPT12 already notices a problem and does something (#GP perhaps?) and we need to have it do the EPT misconfig instead. But it is possible we need to add additional tests that are not done for normal page tables - in particularly regarding reserved bits, and especially bit 5 (in EPT it is reserved, in normal page tables it is the accessed bit). This issue is low priority, as it only deals with the error path; A well-written L1 will not caused EPT configurations anyway. Fixed by commit afa61f752ba6 (Advertise the support of EPT to the L1 guest, through the appropriate MSR., 2013-08-07) |