diff options
author | Michael Roth <michael.roth@amd.com> | 2021-12-16 20:13:54 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-01-07 18:44:46 +0300 |
commit | 405329fc9aeef1e3e2eccaadf32b539ad6c7120f (patch) | |
tree | dd8be0f01d94130ad82ea54e3dd6b51808c796e8 /block/Kconfig.iosched | |
parent | 907d139318b5109e5b676b32b0f4a2c666a8d9ac (diff) | |
download | linux-405329fc9aeef1e3e2eccaadf32b539ad6c7120f.tar.xz |
KVM: SVM: include CR3 in initial VMSA state for SEV-ES guests
Normally guests will set up CR3 themselves, but some guests, such as
kselftests, and potentially CONFIG_PVH guests, rely on being booted
with paging enabled and CR3 initialized to a pre-allocated page table.
Currently CR3 updates via KVM_SET_SREGS* are not loaded into the guest
VMCB until just prior to entering the guest. For SEV-ES/SEV-SNP, this
is too late, since it will have switched over to using the VMSA page
prior to that point, with the VMSA CR3 copied from the VMCB initial
CR3 value: 0.
Address this by sync'ing the CR3 value into the VMCB save area
immediately when KVM_SET_SREGS* is issued so it will find it's way into
the initial VMSA.
Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Message-Id: <20211216171358.61140-10-michael.roth@amd.com>
[Remove vmx_post_set_cr3; add a remark about kvm_set_cr3 not calling the
new hook. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/Kconfig.iosched')
0 files changed, 0 insertions, 0 deletions