]> 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)
commitd9f8c938f5b9d36c1ea0366ee8d47bbf5137406c
tree3a57061527094f12520280e68a545ac85963272d
parent96a9e705673e98ba80b80cb241572c20a844b2a3
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