]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Remove defunct setting of CR0.ET for guests during vCPU create
authorSean Christopherson <seanjc@google.com>
Tue, 21 Sep 2021 00:02:57 +0000 (17:02 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Sep 2021 08:27:06 +0000 (04:27 -0400)
commiteb9c3d4f4feea8c94ae2adfcb24e2deb439a89cd
tree2e1ebad87c23e83a8707fc4c35a63c6707ffdeb2
parentf5fafe077f0abe585391b3318cab4fc30019f737
KVM: x86: Remove defunct setting of CR0.ET for guests during vCPU create

Drop code to set CR0.ET for the guest during initialization of the guest
FPU.  The code was added as a misguided bug fix by commit 155459039134
("KVM Set the ET flag in CR0 after initializing FX") to resolve an issue
where vcpu->cr0 (now vcpu->arch.cr0) was not correctly initialized on SVM
systems.  While init_vmcb() did set CR0.ET, it only did so in the VMCB,
and subtly did not update vcpu->cr0.  Stuffing CR0.ET worked around the
immediate problem, but did not fix the real bug of vcpu->cr0 and the VMCB
being out of sync.  That underlying bug was eventually remedied by commit
5b03e2f5f77c ("KVM: SVM: Reset cr0 properly on vcpu reset").

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210921000303.400537-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c