From patchwork Tue Mar 5 13:42:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 778016 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c8:0:b0:33e:474f:8c56 with SMTP id p8csp439639wrs; Tue, 5 Mar 2024 05:46:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVPHwENxGP8Ol8VeSZ47Susu+EdOTpwEX5urtACKBNvhVOnsEMT2NFSmcDq5GdKckbYWcv67o7SSStoh2+p9LEJ X-Google-Smtp-Source: AGHT+IHdbjqtuKSRuhorlWlBQv+QAnw9x16oXb8pSNIYNaDFxQXWgX4EVI2pYXUDvWWuul2L/h3w X-Received: by 2002:a05:620a:884:b0:788:22e4:8c56 with SMTP id b4-20020a05620a088400b0078822e48c56mr1886035qka.18.1709646398551; Tue, 05 Mar 2024 05:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709646398; cv=none; d=google.com; s=arc-20160816; b=Q3+L8NBhoOyPNlqJkZ1sJfHg5PB/x9mNnYDSGA1QbUESRKLmOc+ajtxJlDNl7OzxpR 1cMFHwO17FY7tu1IPaEmEBRoYn4Z9pTsaYRFbC5vj4v1qL6w9lEp/JXUul1uW0mGq+Gy dYi93kK4OXcSwN7MBI6FFg7S1cUlWKqIDf6Ek3nnneYYQTwzpavQfMyv3HM1NXiq/ZY6 UYFDacT4DKu9a8t3hDaA96CyQUewJTV+KXkQsajph5oj2540EC1g0iwCrVrssJyx3yF1 nCNlKUNelcUyQFCMDXOKsrbba5401qs1mMiGMERJ52PB4xBb2ZmHsh2rkcmQ4z1wRE4Y +OIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gi5x0OedtFiXYvl8cpQZIwBhtQ9Cn2QNkroxyToz+PA=; fh=FNfxLoT4pSSq5+cU1rLLwo41UEEAj6PvLoQV64MLsZQ=; b=UkOIYoxmH9opKdMDpDMF2y/0e928eF8MxEhFFYwDj/Wb64vGxz1UesAKnV1Np1GMhr efWs1J4S6fGTvmZ0atyw1m8dvJED0nnwfidoB7Qt0CEt4dDKtPgwDPtOC6e3cicnqe2R 2rrTZM/c9+mQWUS+0MPZdUvJjCfFji4chPTUHURq42tTvKEiflMQRqIQMOx2tOSlo7wA zqxxvLkdHprW6x6F+Qgz9rbJD94oSwOVJrumVN7+TpNbmcOxdXAdZ9OdD74ucw6kO4La i4+8YHgHEx065SLbhot7nKNeeNNzZIrv9gMsCx8tdvIrKiwM3qT4FUh5sIdlcWQhWlwH f1CQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ovOXZhSo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ou24-20020a05620a621800b00787c6ff2d1dsi11682635qkn.212.2024.03.05.05.46.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2024 05:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ovOXZhSo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV6W-00055g-Iq; Tue, 05 Mar 2024 08:45:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhV5n-0004F5-Rp for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:29 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV5m-0004IW-1V for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:27 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33d6f26ff33so3678951f8f.0 for ; Tue, 05 Mar 2024 05:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646264; x=1710251064; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gi5x0OedtFiXYvl8cpQZIwBhtQ9Cn2QNkroxyToz+PA=; b=ovOXZhSojUVL7f/nmL4H7vG7WdNZKQUGL3G08M922lVyQzRB8lo41ss1vr5bxXdWh6 O33Q6epATFlWD/BUuY1PpGF/Sdj0WEAQBjUm9Ga/yJ+qQkrEG6qvBnHtd5LdtRI0/erR 2njraWTmFey4oS6fyR1IY1KbTg7WKwwzBduK3wowe0S5YR/7kndZpicdMV1M6ByZjJWb vap9pWW6NkghkY3hIeyD1F2DGw3BtbfNhGyOL6LPyX+0pnFeIAX5WYZSwM8g36eh8riR ZVId/BYqPsxFkandzamfqEolf9hv9juZ0gNwJQgm5jGIa+HLwNyH3WajRdT3ZyqBXqk5 eD5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646264; x=1710251064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gi5x0OedtFiXYvl8cpQZIwBhtQ9Cn2QNkroxyToz+PA=; b=huGZdffapXLtnumLy6NVNUKD4p6qf96PkhybHlOvlM3PA6Un7lRhkIh8eiGBi0GOiN K2Qs+aBWxmPwjN9uoH32cgn9Z8He8F75vPu6JaKO9cKp4sRh+Z/XLLGWu7NHBK5NpCGB 45WWyHmHOSTQ9NhgC+z3AICkaKT7hV3Rp6QAe0TNuvt3Uuq7te0l9jFmquG9eFEnuPlg 6GfIPKvCfyXhg0xnJSthNIEvyjHtf1/qoW6P4YhUyXxz/PNNckvjOj+mbWxUwplNXnBV A4RbK+128duU6QwHkqBi8gjK4xHd4leeWM/wpDX4V1i7QIMOTp0yamrqS1vFyHnaLdcA Uq/g== X-Gm-Message-State: AOJu0YzMZ4uOuFQOHNdxhOflaXqS0zcipx5paXyk1gfEJvKZyVqumaso WvauFSvtfpXh2IbwjiSaFBZsP+KVyKyjz1w9cRGfV2HLGFTkA3Q5LYUa0lmke2koc9Mcrn8Rl9/ Q X-Received: by 2002:adf:e5c5:0:b0:33d:274b:ffc7 with SMTP id a5-20020adfe5c5000000b0033d274bffc7mr9419456wrn.46.1709646264430; Tue, 05 Mar 2024 05:44:24 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id v13-20020adfd04d000000b0033d202abf01sm14937659wrh.28.2024.03.05.05.44.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 17/18] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Tue, 5 Mar 2024 14:42:19 +0100 Message-ID: <20240305134221.30924-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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/cpu.h b/target/i386/cpu.h index 952174bb6f..bdc640e844 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2018,9 +2018,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2666ef3808..0e3ad8db2b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7905,8 +7905,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), 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; - } } if (level >= KVM_PUT_RESET_STATE) {