Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp962413ybm; Wed, 27 May 2020 12:17:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaKo8h4jBV2P7kRZlQpiBR84zhwbKDQeGfjFIiMNRreZk0ajQe/kg4w0QuExOdxqTmA8dx X-Received: by 2002:a17:906:eb83:: with SMTP id mh3mr7004771ejb.361.1590607029983; Wed, 27 May 2020 12:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590607029; cv=none; d=google.com; s=arc-20160816; b=pvX3rFlYK/fZEkANLBDB9JQ5Aa9wy0elK4tVg5VH75R/oMM137HMCRQw+zSe8H7wj3 V/GmHCnapqWeVV5rNzhoYDG9X8LoiEtx4UNMAhVGAQq5CudAdhyb6GMvZdBQM5chDsYh aYtQXchyr4baOMw5rFYQLTT0zcD0N/5rtB6dADZOhcyiUgNEFnSGil9Bo5JZMru1IQUv nGciYbrWlw+evaq0hBceehDkK7sv/wGZ1OXEt9B0bb7BICGE/Ei04MnkqdhPsnUeqmRr SdW3fZSCE93Pqwj7hfUptsS5qtMIVlYawb1SsxkgXBRNlnUMTVr5P0GvY/Yq6hNi06Hq htgQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=19uN5uVqFPxYVimAYdibOEMC+SZq9IjB04cBBr/Z/FE=; b=tcGIVqF91HE0jC04QMtrvktfq4DKwF9gdBVAqezc/BoqLw6X76kAhR9gX+gtmCDRkb GNKwCJ/fki4Z8AxUwZuEOWXg0TLYexg9Twp6kjccMCDUJuL6hEPEDNTqwP57CbMp7e8F 8DaH/U34PY2e3lDzX5wi3eS/ZXemdoEXOlHHATiaMkHX+LOdjYkWEPgvu7T518fUOSwF hW6LKPu67FnjIqsTcn76fppvCsviO8Rf/cMt0DOaLbizUQwy5XbfN3t6w2AUHmywn/e4 4xJ1mAYrSi4E9yNSibEZzyQYRCMbhJfQDu2Mv8FWcPOUX5kq5ev1Ti6glf5udmPISdWs eKYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cxHPoLdT; 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 lh7si2477374ejb.106.2020.05.27.12.16.47; Wed, 27 May 2020 12:17:09 -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=cxHPoLdT; 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 S1729862AbgE0RAU (ORCPT + 98 others); Wed, 27 May 2020 13:00:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26763 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726978AbgE0RAU (ORCPT ); Wed, 27 May 2020 13:00:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590598818; 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=19uN5uVqFPxYVimAYdibOEMC+SZq9IjB04cBBr/Z/FE=; b=cxHPoLdTFMe3NpkJn57fS+25dIDbQyx28cc3oD281IAzxq9+hQ82FuywR9CIJoIYk+awHY IWdhQZr+YmWL0nmjtDYNjxaDBZj0ZSETx8MAcKOpe04tvR+nso+r4QcefEgBGOlABgO5/S 6V1uBcb6ToSas1MuEybonPqLXWp2lhk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-mhF3x3onNjStjY1L9b5eXQ-1; Wed, 27 May 2020 13:00:16 -0400 X-MC-Unique: mhF3x3onNjStjY1L9b5eXQ-1 Received: by mail-wm1-f69.google.com with SMTP id x11so10679wmc.9 for ; Wed, 27 May 2020 10:00:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=19uN5uVqFPxYVimAYdibOEMC+SZq9IjB04cBBr/Z/FE=; b=hLpgeEwv4DMPH5AeQxrr/+wpv3bF3I1jy4LzcjRHb4P0mN2bB/KM3o2L2n3hl5PRDf KerkYnBOjhXxI3hPwvBxVyxYP9Os84uTgPFn4jK+aWS14MaLVc/zlLf0cR4PrpvqkwTg mK7aLCypD7pAv2fu4C63rX8dq6iqHGjI5LVWMa9NnBvuTTOw4SVn80Z3U8u9YHVO1kx2 WlGwnMvGVSzoT67yMdTWj8xPNa5NneY4PBV3Z8EBtTibfOaXbpk2iaVPHlWg5TUBN+w6 oUvEGqdT2PImFx5C5941DVYFwpJP1Qp4Bf93ZFvOA46rdpf6Ztxbr+VMfuHAor7rMFy4 JrGA== X-Gm-Message-State: AOAM533WUXkJlaJIB+/sK2otIgYW8Yrel8BgU87idFHP8U1bkuQy8J+G FUaBn8JgQ9UKZDfUTfix6uOS4Ij2I9C9nHiET/pNTHeMf014ZGTIIz95BjglyXtloGMLn7P7lPY BHeSmEj0lyvFcPJIXdX1niFjx X-Received: by 2002:adf:feca:: with SMTP id q10mr18966774wrs.380.1590598815696; Wed, 27 May 2020 10:00:15 -0700 (PDT) X-Received: by 2002:adf:feca:: with SMTP id q10mr18966738wrs.380.1590598815463; Wed, 27 May 2020 10:00:15 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:3c1c:ffba:c624:29b8? ([2001:b07:6468:f312:3c1c:ffba:c624:29b8]) by smtp.gmail.com with ESMTPSA id h15sm3219876wrt.73.2020.05.27.10.00.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 May 2020 10:00:14 -0700 (PDT) Subject: Re: [PATCH 0/2] Fix issue with not starting nesting guests on my system To: Maxim Levitsky , kvm@vger.kernel.org Cc: "H. Peter Anvin" , Tao Xu , Sean Christopherson , 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 References: <20200523161455.3940-1-mlevitsk@redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 27 May 2020 19:00:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200523161455.3940-1-mlevitsk@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/05/20 18:14, 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 > > arch/x86/kvm/vmx/vmx.c | 3 +++ > arch/x86/kvm/x86.c | 4 ++++ > 2 files changed, 7 insertions(+) > Queued for 5.7, thanks (with cosmetic touches to the commit message, and moving the "case" earlier to avoid conflicts). Paolo