x86: cpuhp: prevent guest crash on CPU hotplug when broadcast SMI is in use
commitc5be7517d658ae787de6d0ccc8e93db01fdf60a1
authorIgor Mammedov <imammedo@redhat.com>
Wed, 23 Sep 2020 09:46:41 +0000 (23 05:46 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 29 Sep 2020 06:15:24 +0000 (29 02:15 -0400)
treec6ee2833973a11a6ae1868407fb25b2a73569f59
parent00dc02d284eab0890936ec47c0b7baba5e3b4e37
x86: cpuhp: prevent guest crash on CPU hotplug when broadcast SMI is in use

There were reports of guest crash on CPU hotplug, when using q35 machine
type and OVMF with SMM, due to hotplugged CPU trying to process SMI at
default SMI handler location without it being relocated by firmware first.

Fix it by refusing hotplug if firmware hasn't negotiated CPU hotplug with
SMI support while SMI broadcast is in use.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200923094650.1301166-3-imammedo@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/ich9.c
hw/i386/x86.c