Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp418113ybm; Tue, 26 May 2020 21:35:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRsSYky/m34OISWrzeG1ZBQXYh9clbH5oqesPaAvPsQ7HsO/5ZjkwU/UtSAnIgLmbfw+gI X-Received: by 2002:a1c:9a47:: with SMTP id c68mr2223728wme.19.1590554134903; Tue, 26 May 2020 21:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590554134; cv=none; d=google.com; s=arc-20160816; b=da6yTezSEQuDCotBFRMUjOqW3dCSDIHZvbarTuGzoQOBNShCvqFZGnKKr6bg7UML+R V9hEaAqHMwRqQV4Zm/VKvvvcgpwtiEuOBr1FSgJB3GNab6zaH7hyCQgenpKkWft1oskr kMs5Ro7zpl9LKVq33W3i9dWUV3O9aBKzOraU1cYwxoSuKHKTVzei3TMg596eookmeCwk mR+oFp9VfsR6O+29J/7i0S/fnHRBhp7fEGZBwJFuZYzZ/Mx4VVr4idkOyA7UkyCNrpTM 1HlMj0NcREuLsl8ImG4+7s+rnAP0HnfpuNN0INowZ4L+vJF/zLnCG3lhTcv/2j6rvbPJ J4wQ== 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=YQyUjecVh0IlzH7TQK2x5AHuuMIWgCT+5obka2AWl8A=; b=J7YVpViy/dQUV7IUekF4CbUgWu5gwk5SU5MFp5SLsfJaL+W2C5de3d21o+eFNopbph 9leZyFIQk/i5KD5n6vrL/VYWe9y187xOnN043uwRykOqAmoIcF6B5n88lXOcMTEc9Lgm BbHy3wDzGkbqTBnJWcHKxOVWx1yHfh2P8ZNR+52S6Gi7n4N2tksZlBzQJisGI209o4bv +9ATIG5koNUsb3yhNc2K771YtprPvh7QmaX/LTYwtHYXkTupGGt4TGor67bL3FMDf3/0 NOL2/afeHuUZPPEDfRUGpcatle9XTEILPXIzqnH1uPN3sfCpbK7JeNXQ75TSb2KVaDlS bVew== 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 dk10si1134632ejb.554.2020.05.26.21.35.12; Tue, 26 May 2020 21:35:34 -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 S1728187AbgE0BNp (ORCPT + 99 others); Tue, 26 May 2020 21:13:45 -0400 Received: from mga04.intel.com ([192.55.52.120]:18432 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727937AbgE0BNp (ORCPT ); Tue, 26 May 2020 21:13:45 -0400 IronPort-SDR: py7p8fMaw4tceMHTwrsQCnG0wMKlnkqf63IrO3DN7nmNI7jS/79v9+l14DEuKqxBcoCUJ0qmG9 zrmOI7IVrCAQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2020 18:13:44 -0700 IronPort-SDR: 9jMI1OJubFItcw0uUF95VJxqCdwr/Fm79p/anfETW7JOcoRpdrUW+X3lpeYWF9eLqqZnY0MA+I jrKUlbviMKow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,439,1583222400"; d="scan'208";a="414017709" 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 18:13:44 -0700 Date: Tue, 26 May 2020 18:13:44 -0700 From: Sean Christopherson To: Maxim Levitsky Cc: kvm@vger.kernel.org, Paolo Bonzini , "H. Peter Anvin" , Tao Xu , Jim Mattson , linux-kernel@vger.kernel.org, Joerg Roedel , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Wanpeng Li , Ingo Molnar , Thomas Gleixner , Borislav Petkov , Vitaly Kuznetsov , Jingqi Liu Subject: Re: [PATCH 0/2] Fix issue with not starting nesting guests on my system Message-ID: <20200527011344.GB31696@linux.intel.com> References: <20200523161455.3940-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200523161455.3940-1-mlevitsk@redhat.com> 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 Sat, May 23, 2020 at 07:14:53PM +0300, Maxim Levitsky wrote: > On my AMD machine I noticed that I can't start any nested guests, > because nested KVM (everything from master git branches) complains > that it can't find msr MSR_IA32_UMWAIT_CONTROL which my system doesn't support > at all anyway. > > I traced it to the recently added UMWAIT support to qemu and kvm. > The kvm portion exposed the new MSR in KVM_GET_MSR_INDEX_LIST without > checking that it the underlying feature is supported in CPUID. > It happened to work when non nested because as a precation kvm, > tries to read each MSR on host before adding it to that list, > and when read gets a #GP it ignores it. > > When running nested, the L1 hypervisor can be set to ignore unknown > msr read/writes (I need this for some other guests), thus this safety > check doesn't work anymore. > > V2: * added a patch to setup correctly the X86_FEATURE_WAITPKG kvm capability > * dropped the cosmetic fix patch as it is now fixed in kvm/queue > > Best regards, > Maxim Levitsky > > Maxim Levitsky (2): > kvm/x86/vmx: enable X86_FEATURE_WAITPKG in KVM capabilities > kvm/x86: don't expose MSR_IA32_UMWAIT_CONTROL unconditionally Standard scoping in the shortlog is "KVM: VMX:" and "KVM: x86:". > > arch/x86/kvm/vmx/vmx.c | 3 +++ > arch/x86/kvm/x86.c | 4 ++++ > 2 files changed, 7 insertions(+) > > -- > 2.26.2 > >