Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1621072ybt; Mon, 15 Jun 2020 05:19:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJwJ6h3GMYF9nEbUXGywmvq4Pa28zAuGe2nRriqucHnrwUC/u4lyU5QObsASRMJYyfQW2H X-Received: by 2002:a17:906:fc13:: with SMTP id ov19mr24876375ejb.212.1592223594411; Mon, 15 Jun 2020 05:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592223594; cv=none; d=google.com; s=arc-20160816; b=Y+AI4eaiyKWlAkvGDDU61XV4poy7PDSLLd3lgUn4THNHpNEYrj8ws0hXI1l2MBoaOs D9b2GWBonBmAI/21v93hM9CDKHTNmXkj8WeZifN7VFZJDoZuxK94kD1wjiboZtRBEuJ7 FoEjWHjrcqdjzCjmlVlHvdxjkYgCqM/KyDtpAaKtDzpT9AHMMjC0qkPI9YRKTk/Bffx9 h/2TWDFKXTIptJo8S/63b9vBi40o+b+8o9ra5S9nupMum0PuGqJlRey8t5jAqOhr70Yl 0OfSb1DjwB0s91asC6S3nR2/NNwVzqtOsRzzwfrz0GSI5wMTRikwfqSh4zP1UQ6roGWt fyyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IvLplpOzdVR3pvv87mkIgy3s3a9HTre37RLfwpBuQDk=; b=wITEdy4qXTNNCTwosVbFdqapVEHclvaCw+zNihs358vncnMqifGbMC23W4pON38la2 b9Ot33p2fGJ48+CZ0JP/7ejbm5X4UAvyzFkiAI0ZAgMpsjM6bvNp1MgizfT2I0kkD6su SJdtzUkUal9wEm147se2ggvNYSFQIRpc0OqhxiuL1hSIRY/KfLAwHYp8XiF7uvD0yNfa 86qf5yjtAsSbLazGn7IC3ZK5kbC4E+2tQuApEsPJFuclfjGgXBLyCRhYIdQdIkw5eqVa L9ojPSP/awR13CySlSgOiGKvAlAcDHLOZEvKm/U/sL1ek68+g45B5Rkkt8cbEOrTXynb EjDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="plcRE/HT"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si8636891edv.186.2020.06.15.05.19.31; Mon, 15 Jun 2020 05:19:54 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b="plcRE/HT"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730032AbgFOMPk (ORCPT + 99 others); Mon, 15 Jun 2020 08:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729642AbgFOMPi (ORCPT ); Mon, 15 Jun 2020 08:15:38 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D457C061A0E; Mon, 15 Jun 2020 05:15:38 -0700 (PDT) Received: from zn.tnic (p200300ec2f063c0085fbd8d4455f52fc.dip0.t-ipconnect.de [IPv6:2003:ec:2f06:3c00:85fb:d8d4:455f:52fc]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E7BB41EC0299; Mon, 15 Jun 2020 14:15:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1592223336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=IvLplpOzdVR3pvv87mkIgy3s3a9HTre37RLfwpBuQDk=; b=plcRE/HT8GZ7mDZeXigYxsn/J0PdLHE1t9di7d6lkuXvUjT1Zof0zG7KP6SR3Uf+cE0Wjk l3L4tt5jYOsrc+gkBhllMZbwzxaGLpqY/tkVRGFNbVQdfyJTtWZOL1+0huSI5i62Hg7vzW CkJLUbF2zDsZnIDh3W8rolEcZRq2V8s= Date: Mon, 15 Jun 2020 14:15:24 +0200 From: Borislav Petkov To: Sean Christopherson , Greg KH , Sasha Levin Cc: Liam Merwick , Thomas Gleixner , Ingo Molnar , 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: <20200615121524.GH14668@zn.tnic> References: <20200605200728.10145-1-sean.j.christopherson@intel.com> <20200608172921.GC8223@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200608172921.GC8223@linux.intel.com> 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 10:29:21AM -0700, Sean Christopherson wrote: > 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 Yeah, I was simply parroting what Greg has told me. Maybe he should finally do that script. :-P Also, I believe Sasha's Skynet machine already does that... CCed both. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette