Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4561061ybg; Mon, 8 Jun 2020 10:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd5daISY332GjU6cJF0d7ijwJ3kfpELFPgjqcmzcpvDqbdZynu8w+4Nk6qDze95vYsA1hF X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr21673822ejr.233.1591638928609; Mon, 08 Jun 2020 10:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591638928; cv=none; d=google.com; s=arc-20160816; b=AMdEtgQquBMjvGMj3/WJtKl86kF1Cz9uJoxErEXGyL0mfZ0E4eGTQoXyguANFjn6+y xb9M/84CsYfj2P33zJneAcSZ6iUKOnidQCn6H1sLzN9nt/jg40PfF0DNJ6lNpSJOgtjD 1oYeEheO9XxFG8yu0Y6+EOOrtxJtQ5cIKjIJoPhWiPnUvIQwvxcsfTB90t1k8mh4mJdL xr+VYEKZhwv10ViTPNBgxr0f1h3E4pUYw7cTazMEsk9eRqBTLUIirUltdIsCVvspfoE+ QHDOqeueBie+HBF+C15mNtjuiE4DzrmGKBKsRN9rgSRZiGBReX1gErd0lTf4mRXRdQqc 6Lvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=j2/9HMVXu4wOopxTBapkg6q9FeSKO35ty/5d89cBfFI=; b=cuxUD6WvjYSnwE9VKax1KlY3Q5Xc8pw74nLgFa3t1ZkLEyV2eRNxs5ebdAKD5BW0YA EIdOmhMN0+vNCtfSbIrYPLWDDeDMsEJOrxnjJCmNsliQiZjAx1dOHKDxcMc2DQZj2+Kl 51Pwpz2qv86z7Q4zci+ktQvRa5cmCpRNFqk0aTKAzQuWbk5uln69Ku1H6RGDPZZn06el sHxK5Xbt6i03dFqCDmrGai+3w3SznOzsuUyeyaQwlT4D7+iWAQQsjedjrDq1FLnI+eAW b0CnFIbgl1zi3//hV3h+lvm8RMqug3g7ckhOj8HeyfmeOi1MIm3HKrsME1JKrdZBkZJG AXSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si5970717edm.379.2020.06.08.10.55.05; Mon, 08 Jun 2020 10:55:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387572AbgFHR3X (ORCPT + 99 others); Mon, 8 Jun 2020 13:29:23 -0400 Received: from mga11.intel.com ([192.55.52.93]:12672 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730697AbgFHR3W (ORCPT ); Mon, 8 Jun 2020 13:29:22 -0400 IronPort-SDR: TkRODIQiUQCJlXzq7ghxlfdz+jDAX14ny9tZ6sz4B54ceGJeLgtUb6Fe7P0Fwlb9oSwZ7+MV+2 Hqb3RqJ92eGA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 10:29:21 -0700 IronPort-SDR: qptkctbUJUSvQAC1ycvjADfEDhUrhHOX5yl1OzzQxI56au3vxE+MjQ88fkKwTx8lv1vlJ4i/FY fWhF3aO1hQDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,487,1583222400"; d="scan'208";a="258747153" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by fmsmga007.fm.intel.com with ESMTP; 08 Jun 2020 10:29:21 -0700 Date: Mon, 8 Jun 2020 10:29:21 -0700 From: Sean Christopherson To: Liam Merwick Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "Rafael J. Wysocki" , Pavel Machek , "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Brad Campbell , Maxim Levitsky , Paolo Bonzini , kvm@vger.kernel.org Subject: Re: [PATCH] x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup Message-ID: <20200608172921.GC8223@linux.intel.com> References: <20200605200728.10145-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 11:12:35AM +0100, Liam Merwick wrote: > On 05/06/2020 21:07, Sean Christopherson wrote: > >Reinitialize IA32_FEAT_CTL on the BSP during wakeup to handle the case > >where firmware doesn't initialize or save/restore across S3. This fixes > >a bug where IA32_FEAT_CTL is left uninitialized and results in VMXON > >taking a #GP due to VMX not being fully enabled, i.e. breaks KVM. > > > >Use init_ia32_feat_ctl() to "restore" IA32_FEAT_CTL as it already deals > >with the case where the MSR is locked, and because APs already redo > >init_ia32_feat_ctl() during suspend by virtue of the SMP boot flow being > >used to reinitialize APs upon wakeup. Do the call in the early wakeup > >flow to avoid dependencies in the syscore_ops chain, e.g. simply adding > >a resume hook is not guaranteed to work, as KVM does VMXON in its own > >resume hook, kvm_resume(), when KVM has active guests. > > > >Reported-by: Brad Campbell > >Cc: Maxim Levitsky > >Cc: Paolo Bonzini > >Cc: kvm@vger.kernel.org > > Should it have the following tag since it fixes a commit introduced in 5.6? > Cc: stable@vger.kernel.org # v5.6 It definitely warrants a backport to v5.6. I didn't include a Cc to stable because I swear I had seen an email fly by that stated an explicit Cc is unnecessary/unwanted for tip-tree patches, but per a recent statement from Boris it looks like I'm simply confused[*]. I'll add the Cc in v2. [*] https://lkml.kernel.org/r/20200417164752.GF7322@zn.tnic > >Fixes: 21bd3467a58e ("KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR") > >Signed-off-by: Sean Christopherson > > Reviewed-by: Liam Merwick