Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp564821ybm; Wed, 27 May 2020 02:27:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6jv/D2l8Utct3P/mAP4Z839565iarBD/gbYY9VDsU4I3O4HkW05CG8wprOeBpO88hxIKE X-Received: by 2002:a05:6402:1c0e:: with SMTP id ck14mr24074422edb.356.1590571659699; Wed, 27 May 2020 02:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590571659; cv=none; d=google.com; s=arc-20160816; b=OZECmOgJ4yEB/VE+2NNEGD34Gd8MQ0QyVXurvVhx8V9KROZ17kZ8XV1VMpt+ioiJoS riKtk0azqWFmCoV8LQTgpO0GBFDuxzryDJiBOjO2hlVP/B84VQkXKnw8fo8206q/pJBm JMtA5Wq7NhNDzHOMmZhRh2f9FxBN7/cH/jCPjoUIZbK4nGMvPcd9WyzSMN5Ttqk40KWW l5/Cc1GTN0S33CEVURVdrpzVW7+9ZQYi/2TAEfPSwNlBnlB/gk1vnhNdIsXzilany3r7 1vWJ3prE+FkqnKEljngdVPHvzoLsxE1pXWGGazFZan4AjbdsMuy0Yyh8wwd7U1/Vztng iV3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=85pK4/81/vdgWfeIJ9uroYFrDxnQQi6IhHVRzvciCac=; b=NirJaWphu5FrNAiQXgJ0kW8bCRKTWNgtQhwLnl17OoiS2guafX4uLf6duygc8fY48L E3oeesZL5Npz6n+hDX2W/j4qNQAvZw3OS1CGXd4U968iGcuua+C9eJs11BI95TJ7rNiw q5A3+0xdREsosj6dA8B+L2tft6gxeayHxPDq9d+w5MgThrWzMUtgOsehttq6NaEVhBFJ VQQgnwNhh7v2xWjtpsSqOLwr+hY3tY4abCMUA8OBLxb1Oxb24SlcWM+NCqbKSH5FFgvd lN5KEjD0QSDN+Xcn81go+QljpPXByEO2c4IYo+im4MEd7sjnZCCclci4r+QZy74CbkQJ buVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=AW8Ue0LA; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si1535963ejc.195.2020.05.27.02.27.16; Wed, 27 May 2020 02:27:39 -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=@oracle.com header.s=corp-2020-01-29 header.b=AW8Ue0LA; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728057AbgE0BFS (ORCPT + 99 others); Tue, 26 May 2020 21:05:18 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36878 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727897AbgE0BFR (ORCPT ); Tue, 26 May 2020 21:05:17 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04R0xDgx055249; Wed, 27 May 2020 01:03:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=85pK4/81/vdgWfeIJ9uroYFrDxnQQi6IhHVRzvciCac=; b=AW8Ue0LA7LdmoDkdjWSZjA5spDniRFTQgW4ssrBQgJDwI8YIY2i1Y8PXWqEUsHlVjJwS nqYYyyhHmpoxXnqQOhdyAphWhvDOmWeQS67kKlZzMpDzWR4/c9Cui0h4ZA7jhZI6f4aU YbFwKxtwcg7oM6nKdKsBAaB2b44yW6d0bXBZ0jxQXj6B8yk25mu0I+6PS5a3WbetQ1MG CZAvuCZjaXHrtvKQH9MXiLkQ069OcqTZdJPEZJo5FulJpiTIlPvumEUI/jU3YOQGOtu1 TWA6LmUxsd2s+4/l0FGWKsg/9B0hCDc+1vfcLpxLjQ1ncgC4eeJAH/Xe/xHuJrP0uS1N Yg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 318xe1cskk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 May 2020 01:03:49 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04R0vXX6129965; Wed, 27 May 2020 01:03:48 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 317dktf6jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 May 2020 01:03:48 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04R13eJA007736; Wed, 27 May 2020 01:03:40 GMT Received: from localhost.localdomain (/10.159.156.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 May 2020 18:03:40 -0700 Subject: Re: [PATCH 0/2] Fix issue with not starting nesting guests on my system To: Maxim Levitsky , kvm@vger.kernel.org Cc: Paolo Bonzini , "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: Krish Sadhukhan Message-ID: Date: Tue, 26 May 2020 18:03:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20200523161455.3940-1-mlevitsk@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9633 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 bulkscore=0 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 mlxlogscore=984 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005270002 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9633 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 cotscore=-2147483648 mlxscore=0 bulkscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1011 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005270002 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/20 9:14 AM, 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(+) > Nit: The added 'break' statement in patch# 2 is not required. Reviewed-by: Krish Sadhukhan