Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1046290ybm; Wed, 27 May 2020 14:48:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGueEktEgPGW/8R6EGIh/Kutlza4bneuUj5HQqrUpBFlza016b9KvrB0N1Lv7Ier1plEEe X-Received: by 2002:a17:906:934e:: with SMTP id p14mr328705ejw.498.1590616114390; Wed, 27 May 2020 14:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616114; cv=none; d=google.com; s=arc-20160816; b=Kl2fPe02IELsA2ostHA15sMMQesh6AHVAVwDhX/xfNUUlkdbXb67oFoXdNs/B/bFRY 6tY8ZxyqJ+y8g5Ga5mEzfjw8nZxrFF/VjL6l+JQ8SlpWXLjcB6a1cXBSmJ6VU8VhAdKG VAdcc9pfF0cQIqRaH2vPT7AQ/NW3QqDRjls0RIzzKGR3TreWMj4RkAKEy9kTsnoiIjSP wsUUC9y86gptZbfBT7iGgQlfMHNc3+YqTWuz5wZLWBLkh856oq4KtBCYM5eNkmyWnNyU HtnQ7xG/9IZN+C60jIn7eQeHF/8waiXgNKRHL6mxUuetFFNhuDgZz9UvpPLAB2tPxp47 SE9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=dRXJGyhyibwz7e++zj9JGkGdUoHwUBwUQqj4v1/HHvw=; b=lf/05Gf8ukBItyFM1/J6fL3C43n1K8MHSIbqw/YVRhnb65kHLPzgrcPkHAraebZrfI NjtCr2XOk7aKvedwL+GsqNZuWMaZthIAs5fPZCHxuM0ziulIHhP0sA+dpaYOLTWMnsDy 0aVauU8gF8Fx7rBCW7fN6HZQTu4VhGBIoKp4kTP+OO7SziqafJ4IReKcY3g+uQ3XVYOA WdQ8FmTRpigx7VyCggkTnEqxyXtnhPY9QNxSCjllBow8WQdC0HWxkG88vF6eSC21vsJI 8XnTp9IlGk+XfTRcIwDEkPVJZZjVH5eLgH8U4/ntghXMeEIlKN5Y/mdwZX9O8BJ/qxwa Z98g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HeZmGfzn; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si374435ejt.432.2020.05.27.14.48.07; Wed, 27 May 2020 14:48: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HeZmGfzn; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389645AbgE0PRf (ORCPT + 98 others); Wed, 27 May 2020 11:17:35 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:57002 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389637AbgE0PRe (ORCPT ); Wed, 27 May 2020 11:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590592653; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dRXJGyhyibwz7e++zj9JGkGdUoHwUBwUQqj4v1/HHvw=; b=HeZmGfzn0JGd7swR7WWr/nNkVb41HLZxM/7puB7VLiM1mwiY4XQSxUioQOyAOW1eOVvcYO gYezgk/1tJJPLOS5+O5t+2qHcUGL5fw92A/GGWfqqU6gRi8+8ySNCPATV9EEoDwiMv54M0 hvTWxzXebg5aBsoqJeA4WI/YUltKqck= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-lKYOSppzONe8SR7bISTzJw-1; Wed, 27 May 2020 11:17:31 -0400 X-MC-Unique: lKYOSppzONe8SR7bISTzJw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E0AE107ACF2; Wed, 27 May 2020 15:17:29 +0000 (UTC) Received: from starship (unknown [10.35.206.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB03021EF8; Wed, 27 May 2020 15:17:25 +0000 (UTC) Message-ID: <2e2cca1f7eab64dc55d3ac306f92f9f8318fc775.camel@redhat.com> Subject: Re: [PATCH 0/2] Fix issue with not starting nesting guests on my system From: Maxim Levitsky To: Sean Christopherson 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 Date: Wed, 27 May 2020 18:17:24 +0300 In-Reply-To: <20200527011344.GB31696@linux.intel.com> References: <20200523161455.3940-1-mlevitsk@redhat.com> <20200527011344.GB31696@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-05-26 at 18:13 -0700, Sean Christopherson wrote: > 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:". This another thing I usually mess up in the commit messages. Fixed and noted for futher patches > > > arch/x86/kvm/vmx/vmx.c | 3 +++ > > arch/x86/kvm/x86.c | 4 ++++ > > 2 files changed, 7 insertions(+) > > > > -- > > 2.26.2 > > > >