On 6/3/24 19:30, Thomas Huth wrote:
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote:
X86CPU::kvm_no_smi_migration was only used by the
pc-i440fx-2.3 machine, which got removed. Remove it
and simplify kvm_put_vcpu_events().
Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
target/i386/cpu.h | 3 ---
target/i386/cpu.c | 2 --
target/i386/kvm/kvm.c | 6 ------
3 files changed, 11 deletions(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 42970ab046..571cbbf1fc 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -4344,12 +4344,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int
level)
events.smi.pending = 0;
events.smi.latched_init = 0;
}
- /* Stop SMI delivery on old machine types to avoid a reboot
- * on an inward migration of an old VM.
- */
- if (!cpu->kvm_no_smi_migration) {
- events.flags |= KVM_VCPUEVENT_VALID_SMM;
- }
Shouldn't it be the other way round, i.e. that the flag is now always set?
Oops you are right, good catch!
pc_compat_2_3[] had:
{ TYPE_X86_CPU, "kvm-no-smi-migration", "on" },
... so I think kvm_no_smi_migration was set to true for the old machines?
Thomas