]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: LAPIC: Keep stored TMCCT register value 0 after KVM_SET_LAPIC
authorWanpeng Li <wanpengli@tencent.com>
Wed, 9 Jun 2021 07:16:40 +0000 (00:16 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 18:26:11 +0000 (14:26 -0400)
commit2b280ad84e94b301515e4a81774b0cf589f0efa4
tree99dd8cd73bfd3b5d86f8f91a395a33ea2f2b6b56
parent2ec2ff8d96a665841f8f4cd7b7153f6a810830a2
KVM: LAPIC: Keep stored TMCCT register value 0 after KVM_SET_LAPIC

KVM_GET_LAPIC stores the current value of TMCCT and KVM_SET_LAPIC's memcpy
stores it in vcpu->arch.apic->regs, KVM_SET_LAPIC could store zero in
vcpu->arch.apic->regs after it uses it, and then the stored value would
always be zero. In addition, the TMCCT is always computed on-demand and
never directly readable.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1623223000-18116-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c