OSDN Git Service

x86/kvm: Teardown PV features on boot CPU as well
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 14 Apr 2021 12:35:41 +0000 (14:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 May 2021 10:05:36 +0000 (06:05 -0400)
commit8b79feffeca28c5459458fe78676b081e87c93a4
tree3a57061527094f12520280e68a545ac85963272d
parent0a269a008f837e76ce285679ab3005059fadc2a6
x86/kvm: Teardown PV features on boot CPU as well

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: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210414123544.1060604-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvm.c