]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc726a8f0afa35154f4ae1b16b9e88cfaefb7a094
tree3a57061527094f12520280e68a545ac85963272d
parentfab07884c97e5438fe93de60711892b462f119af
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