|
|
76daa3 |
From 0ed92ca843fec14757ea7b59f4c83ed52b91b815 Mon Sep 17 00:00:00 2001
|
|
|
76daa3 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
76daa3 |
Date: Wed, 22 Mar 2017 11:26:40 +0100
|
|
|
76daa3 |
Subject: x86: Work around SMI breakages
|
|
|
76daa3 |
|
|
|
76daa3 |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
76daa3 |
Message-id: <20170322112640.5933-1-dgilbert@redhat.com>
|
|
|
76daa3 |
Patchwork-id: 74427
|
|
|
76daa3 |
O-Subject: [RHEL-7.4 qemu-kvm-rhev PATCH v2] x86: Work around SMI breakages
|
|
|
76daa3 |
Bugzilla: 1420679
|
|
|
76daa3 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
76daa3 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
76daa3 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
76daa3 |
|
|
|
76daa3 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
76daa3 |
|
|
|
76daa3 |
This enables the fix added upstream in fc3a1fd7 on 7.3 machine types
|
|
|
76daa3 |
and earlier.
|
|
|
76daa3 |
|
|
|
76daa3 |
The reported symptom was that a 7.2->7.4 migration failed with the
|
|
|
76daa3 |
guest rebooting on the destination; 7.2->7.3 worked as did 7.3->7.4
|
|
|
76daa3 |
|
|
|
76daa3 |
7.2,7.3,7.4 all have different levels of support for SMI's:
|
|
|
76daa3 |
7.2 basically doesn't support it, but knows enough to set the
|
|
|
76daa3 |
CPU_INTERRUPT_SMI flag.
|
|
|
76daa3 |
|
|
|
76daa3 |
7.3 thought it supported SMIs but fails to deliver SMI interrupts
|
|
|
76daa3 |
(see upstream 68c6efe07a) - but it does clear the
|
|
|
76daa3 |
CPU_INTERRUPT_SMI flag when it tries.
|
|
|
76daa3 |
|
|
|
76daa3 |
7.4 apparently supports SMIs
|
|
|
76daa3 |
|
|
|
76daa3 |
On 7.2 something tries an SMI, but the interrupt never happens,
|
|
|
76daa3 |
but it does leave the CPU_INTERRUPT_SMI flag set - this ends up
|
|
|
76daa3 |
in the migration stream, but it's ignored by 7.2.
|
|
|
76daa3 |
|
|
|
76daa3 |
7.2->7.3 sees the CPU_INTERRUPT_SMI, clears the flag but fails
|
|
|
76daa3 |
to actually enter the SMI code. Everything seems to survive,
|
|
|
76daa3 |
but perhaps this explains some of the bugs we hit until we
|
|
|
76daa3 |
disabled the SMI in Seabios in 7.3
|
|
|
76daa3 |
|
|
|
76daa3 |
7.2->7.4 sees the CPU_INTERRUPT_SMI and actually takes the SMI,
|
|
|
76daa3 |
landing in what I think is empty SMRAM space, eventually falling
|
|
|
76daa3 |
off the end, triple faulting and rebooting - which is what we hit
|
|
|
76daa3 |
here.
|
|
|
76daa3 |
|
|
|
76daa3 |
The (nasty) fix is to reinstate the 7.3 bug for machine types older
|
|
|
76daa3 |
than 7.4; that should keep us compatible with 7.3 and get
|
|
|
76daa3 |
lucky in the same way as we did with 7.2.
|
|
|
76daa3 |
|
|
|
76daa3 |
Note: We still have to be careful in the ROMs we provide with 7.4
|
|
|
76daa3 |
because the ROM contents will get migrated whenever we do
|
|
|
76daa3 |
7.4->7.3/7.2 migrates.
|
|
|
76daa3 |
|
|
|
76daa3 |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
76daa3 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
76daa3 |
(cherry picked from commit c094723a6ed544df512c4c3fd22d0eec71262886)
|
|
|
76daa3 |
---
|
|
|
76daa3 |
include/hw/i386/pc.h | 5 +++++
|
|
|
76daa3 |
1 file changed, 5 insertions(+)
|
|
|
76daa3 |
|
|
|
76daa3 |
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
|
|
76daa3 |
index c88c46a..b69e53c 100644
|
|
|
76daa3 |
--- a/include/hw/i386/pc.h
|
|
|
76daa3 |
+++ b/include/hw/i386/pc.h
|
|
|
76daa3 |
@@ -1042,6 +1042,11 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
|
|
|
76daa3 |
.driver = TYPE_X86_CPU,\
|
|
|
76daa3 |
.property = "cpuid-0xb",\
|
|
|
76daa3 |
.value = "off",\
|
|
|
76daa3 |
+ },\
|
|
|
76daa3 |
+ { /* PC_RHEL7_3_COMPAT */ \
|
|
|
76daa3 |
+ .driver = TYPE_X86_CPU,\
|
|
|
76daa3 |
+ .property = "kvm-no-smi-migration",\
|
|
|
76daa3 |
+ .value = "on",\
|
|
|
76daa3 |
},
|
|
|
76daa3 |
|
|
|
76daa3 |
#define PC_RHEL7_2_COMPAT \
|
|
|
76daa3 |
--
|
|
|
76daa3 |
1.8.3.1
|
|
|
76daa3 |
|