KVM: LAPIC: Keep stored TMCCT register value 0 after KVM_SET_LAPIC
mainline inclusion from mainline-v5.14-rc1 commit 2735886c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4NP0K CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2735886c9ef115fc7b40d27bfe73605c38e9d56b ------------------- 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> Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Zenghui Yu <yuzenghui@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment