From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D53FC433F5 for ; Sat, 29 Jan 2022 13:27:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243084AbiA2N12 (ORCPT ); Sat, 29 Jan 2022 08:27:28 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:41852 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243032AbiA2N12 (ORCPT ); Sat, 29 Jan 2022 08:27:28 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 29CE8B827B6 for ; Sat, 29 Jan 2022 13:27:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5685DC340E5; Sat, 29 Jan 2022 13:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643462845; bh=8AVbhcDnOl9/mgPoe2d4xXGZusbCeg+ACgzOTlyIbdM=; h=Subject:To:Cc:From:Date:From; b=QEQlt7Yj+E07oYiD0oTiRmOzRG5qWpW1Dj2OmRfHHpOIBYwwnt/FGQueQJu6j0dDn zCPi3eAIrR+6Hh6LUAUWLFxL/IM5HVlBWRDEyMkjJP+el6po/eZi2V1R4HnSYM9NHu 85hyrVVVsV/6upuwHqSaAW8ciQJqB5pJ8lNu7Q74= Subject: FAILED: patch "[PATCH] KVM: x86: Keep MSR_IA32_XSS unchanged for INIT" failed to apply to 4.19-stable tree To: xiaoyao.li@intel.com, pbonzini@redhat.com, seanjc@google.com Cc: From: Date: Sat, 29 Jan 2022 14:27:12 +0100 Message-ID: <1643462832161240@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From be4f3b3f82271c3193ce200a996dc70682c8e622 Mon Sep 17 00:00:00 2001 From: Xiaoyao Li Date: Wed, 26 Jan 2022 17:22:24 +0000 Subject: [PATCH] KVM: x86: Keep MSR_IA32_XSS unchanged for INIT It has been corrected from SDM version 075 that MSR_IA32_XSS is reset to zero on Power up and Reset but keeps unchanged on INIT. Fixes: a554d207dc46 ("KVM: X86: Processor States following Reset or INIT") Cc: stable@vger.kernel.org Signed-off-by: Xiaoyao Li Signed-off-by: Sean Christopherson Message-Id: <20220126172226.2298529-2-seanjc@google.com> Signed-off-by: Paolo Bonzini diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a50baf4c5bff..b6d60c296eda 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11266,6 +11266,7 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) vcpu->arch.msr_misc_features_enables = 0; vcpu->arch.xcr0 = XFEATURE_MASK_FP; + vcpu->arch.ia32_xss = 0; } /* All GPRs except RDX (handled below) are zeroed on RESET/INIT. */ @@ -11282,8 +11283,6 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) cpuid_0x1 = kvm_find_cpuid_entry(vcpu, 1, 0); kvm_rdx_write(vcpu, cpuid_0x1 ? cpuid_0x1->eax : 0x600); - vcpu->arch.ia32_xss = 0; - static_call(kvm_x86_vcpu_reset)(vcpu, init_event); kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);