Commit 127d0b8f authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Zheng Zengkai
Browse files

x86/kvm: Teardown PV features on boot CPU as well

mainline inclusion
from mainline-v5.13-rc2
commit 8b79feff
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I990AA
CVE: CVE-2021-47112

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b79feffeca28c5459458fe78676b081e87c93a4



---------------------------

Various PV features (Async PF, PV EOI, steal time) work through memory
shared with hypervisor and when we restore from hibernation we must
properly teardown all these features to make sure hypervisor doesn't
write to stale locations after we jump to the previously hibernated kernel
(which can try to place anything there). For secondary CPUs the job is
already done by kvm_cpu_down_prepare(), register syscore ops to do
the same for boot CPU.

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210414123544.1060604-3-vkuznets@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7875dd00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment