aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/include/x86_64/vmx.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-09-26 18:47:59 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-09-27 13:13:39 +0200
commit1f4e5fc83a4217fc61b23370b07573827329d7bd (patch)
tree6cb2512b2573c31d94e5cc2cf2ce62a637c6e533 /tools/testing/selftests/kvm/include/x86_64/vmx.h
parentKVM: x86: assign two bits to track SPTE kinds (diff)
downloadlinux-dev-1f4e5fc83a4217fc61b23370b07573827329d7bd.tar.xz
linux-dev-1f4e5fc83a4217fc61b23370b07573827329d7bd.zip
KVM: x86: fix nested guest live migration with PML
Shadow paging is fundamentally incompatible with the page-modification log, because the GPAs in the log come from the wrong memory map. In particular, for the EPT page-modification log, the GPAs in the log come from L2 rather than L1. (If there was a non-EPT page-modification log, we couldn't use it for shadow paging because it would log GVAs rather than GPAs). Therefore, we need to rely on write protection to record dirty pages. This has the side effect of bypassing PML, since writes now result in an EPT violation vmexit. This is relatively easy to add to KVM, because pretty much the only place that needs changing is spte_clear_dirty. The first access to the page already goes through the page fault path and records the correct GPA; it's only subsequent accesses that are wrong. Therefore, we can equip set_spte (where the first access happens) to record that the SPTE will have to be write protected, and then spte_clear_dirty will use this information to do the right thing. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64/vmx.h')
0 files changed, 0 insertions, 0 deletions