[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/38] x86: Check for machine state object class before typecastin
From: |
Paolo Bonzini |
Subject: |
[PULL 01/38] x86: Check for machine state object class before typecasting it |
Date: |
Wed, 8 Jan 2020 13:32:18 +0100 |
From: Michal Privoznik <address@hidden>
In ed9e923c3c ("x86: move SMM property to X86MachineState", 2019-12-17)
In v4.2.0-246-ged9e923c3c the SMM property was moved from PC
machine class to x86 machine class. Makes sense, but the change
was too aggressive: in target/i386/kvm.c:kvm_arch_init() it
altered check which sets SMRAM if given machine has SMM enabled.
The line that detects whether given machine object is class of
PC_MACHINE was removed from the check. This makes qemu try to
enable SMRAM for all machine types, which is not what we want.
Signed-off-by: Michal Privoznik <address@hidden>
Fixes: ed9e923c3c ("x86: move SMM property to X86MachineState", 2019-12-17)
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/kvm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 0b51190..7ee3202 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2173,6 +2173,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
}
if (kvm_check_extension(s, KVM_CAP_X86_SMM) &&
+ object_dynamic_cast(OBJECT(ms), TYPE_X86_MACHINE) &&
x86_machine_is_smm_enabled(X86_MACHINE(ms))) {
smram_machine_done.notify = register_smram_listener;
qemu_add_machine_init_done_notifier(&smram_machine_done);
--
1.8.3.1
- [PULL 00/38] Misc patches for 2020-01-08, Paolo Bonzini, 2020/01/08
- [PULL 01/38] x86: Check for machine state object class before typecasting it,
Paolo Bonzini <=
- [PULL 03/38] hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35, Paolo Bonzini, 2020/01/08
- [PULL 02/38] accel/kvm: Make "kernel_irqchip" default on, Paolo Bonzini, 2020/01/08
- [PULL 04/38] replay: check other timers for icount limit, Paolo Bonzini, 2020/01/08
- [PULL 05/38] replay: record and replay random number sources, Paolo Bonzini, 2020/01/08
- [PULL 06/38] hw/i386/x86-iommu: Add missing stubs, Paolo Bonzini, 2020/01/08
- [PULL 07/38] hw/i386/pc: fix regression in parsing vga cmdline parameter, Paolo Bonzini, 2020/01/08
- [PULL 08/38] hw/timer/Kconfig: Intel 8254 PIT depends of ISA bus, Paolo Bonzini, 2020/01/08
- [PULL 09/38] hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled, Paolo Bonzini, 2020/01/08
- [PULL 10/38] hw/intc/i8259: Fix Kconfig dependency on ISA bus, Paolo Bonzini, 2020/01/08
- [PULL 11/38] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config, Paolo Bonzini, 2020/01/08