mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
KVM: VMX: do not overwrite uptodate vcpu->arch.cr3 on KVM_SET_SREGS
Only decache guest CR3 value if vcpu->arch.cr3 is stale. Fixes loadvm with live guest. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Tested-by: Markus Schade <markus.schade@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
b72336355b
commit
5233dd51ec
1 changed files with 2 additions and 1 deletions
|
@ -2047,6 +2047,7 @@ static void ept_update_paging_mode_cr0(unsigned long *hw_cr0,
|
||||||
unsigned long cr0,
|
unsigned long cr0,
|
||||||
struct kvm_vcpu *vcpu)
|
struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
if (!test_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail))
|
||||||
vmx_decache_cr3(vcpu);
|
vmx_decache_cr3(vcpu);
|
||||||
if (!(cr0 & X86_CR0_PG)) {
|
if (!(cr0 & X86_CR0_PG)) {
|
||||||
/* From paging/starting to nonpaging */
|
/* From paging/starting to nonpaging */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue