Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp581032ybm; Wed, 27 May 2020 02:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhk82j+gZwL8ehf4MYAFPmUJ/96TahWpL1prE0nUwZh2o4f+bl6sxblMuTMd4aTwvvxn6W X-Received: by 2002:a17:906:d8c1:: with SMTP id re1mr5531950ejb.184.1590573386146; Wed, 27 May 2020 02:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590573386; cv=none; d=google.com; s=arc-20160816; b=NoIUyf+hn15uZDqE2Ko91jwFLdHptVrvVOZw9dpmnxY5KwnxZd9Pf77iTY/6ecvlst KCJRXqJZuebYKK1DXH73rwSbq3b58VFzhseHuv1ZPCjre8+lTdnNxO6Vlgc/xJPlM444 EcPrl8XCvu9YUjCyXO4Vpy1g/vLD+h1ByyG7ush2CwdGZ/RrOWFnRlES37OtVcKcLEtf RVwPnVhFG0+RygkGkF+ZouJ+n70SS2sqYGi8JB8Q44Pzx1y6H1DHRqoh4cHqtlK9JnxH zHTTCJyRgMKMjAQPslILLNtJ0q+ZDTVpUZn/rjIEtUG6cLWua5jj34Z08O8CUfSxsUY4 nnNw== 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=6JEAqhdoXypisIkEn5RQHdyoEQD2FlPjSrlw0CouiWo=; b=eWFVwXChKSbksB4PezR9YHfEUrTK+CMncB+DfRQfYMur4eSUr62dGx3o7WmZaPoOeM v/wEMk+fYMWnX0H5tdqCYCwlNVUz9gaV794Dg985cJRZDuRkgOeZPLhoPnLmk9U3MBnY rS0Tx04KJExzBNlwrWyCi52YUixFe+5CK5s+VTjO80yfyHTbxx9+i+CXBvLvSz8Dxv4y ZVIkabxks7qX55Dla3h+9KuI5bTaV5TUx6VwD1dwdGgMXSbRJquHnOS4r4MFc/DSSlgn ETslsvbXJrDNR3+N/bb77j06WKAjOuDoxIKJc4v2dGpsdFVYYQ47euc1FwaiQMCR4VJL 0V+Q== 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 m20si1101437eds.347.2020.05.27.02.56.03; Wed, 27 May 2020 02:56:26 -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 S1728131AbgE0FN4 (ORCPT + 99 others); Wed, 27 May 2020 01:13:56 -0400 Received: from mga17.intel.com ([192.55.52.151]:3798 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbgE0FNz (ORCPT ); Wed, 27 May 2020 01:13:55 -0400 IronPort-SDR: IjcWlCbiqXgTJoKu0wf/KWar0x7tikALWGy4P1nB07KDFtxAd/zN0Z8vuoA5k7pA2Wgvf3//I7 34+If4jgvuXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2020 22:13:55 -0700 IronPort-SDR: EZaFWLbW8btGXcoTvzeyQT6xjFbceGOJPwKLW6J7q51OFBid7lzF/JjZ5tQm4V+nRUhHp7EQ/B axatwRgBhKxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,440,1583222400"; d="scan'208";a="414074697" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga004.jf.intel.com with ESMTP; 26 May 2020 22:13:55 -0700 Date: Tue, 26 May 2020 22:13:55 -0700 From: Sean Christopherson To: Brad Campbell Cc: Maxim Levitsky , kvm@vger.kernel.org, Linux Kernel Mailing List Subject: Re: KVM broken after suspend in most recent kernels. Message-ID: <20200527051354.GL31696@linux.intel.com> References: <1f7a85cc-38a6-2a2e-cbe3-a5b9970b7b92@fnarfbargle.com> <1f7b1c9a8d9cbb6f82e97f8ba7a13ce5b773e16f.camel@redhat.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, May 25, 2020 at 09:15:57PM +0800, Brad Campbell wrote: > >When you mean that KVM is broken after suspend, you mean that you can't > >start new VMs after suspend, or do VMs that were running before suspend > >break? I see the later on my machine. I have AMD system though, so most > >likely this is another bug. > > > >Looking at the commit, I suspect that we indeed should set the IA32_FEAT_CTL > >after resume from ram, since suspend to ram might count as a complete CPU > >reset. > > > > One of those "I should have clarified that" moments immediately after I > pressed send. I've not tried suspending with a VM running. It's "can't start > new VMs after suspend". Don't bother testing suspending with a VM, the only thing that will be different is that your system will hang on resume instead when running a VM. If there are active VMs, KVM automatically re-enables VMX via VMXON after resume, and VMXON is what's faulting. Odds are good the firmware simply isn't initializing IA32_FEAT_CTL, ever. The kernel handles the boot-time case, but I (obviously) didn't consider the suspend case. I'll work on a patch.