Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp202720ybi; Thu, 11 Jul 2019 17:43:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPhfqIhfn0Wr4nsvNHiCDnUKH508Hrrpw3wtIaZqjt93PhNui1SDqw92V07tFQlRxOCeoq X-Received: by 2002:a17:902:ab8f:: with SMTP id f15mr7778427plr.159.1562892239517; Thu, 11 Jul 2019 17:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562892239; cv=none; d=google.com; s=arc-20160816; b=bcVXs13vuYtwos6RlFD3KEmzoErHvTvk1DvOCjzMBBIPbad2t0IbgYbMqndUBBlstb trD/ePRnA21PFPx6oP/RHvRTqAd+Bqm/cnWdY9KqvfhBCsp2E+7Rv4ITfoqVwHcoZt1Q PM3vyzSk43yMZQWcGgPl3j9VfGHAL0xFGkRtTkygfSOBm42lm6ReGpjtNJMrIMkPypYv GOpqL1fATIFkHMR8LbpVegjN3EBPpuG0fkp1XmANzVNlFWRUu5IzcBboJ6P6bJyEWnys hox56r4FFhGbmPvdAx/Q6H/JJWHwnJf7DrOm5MNG1wtTZNE+MLL/eYnFHkykcAYPdUzw XUoQ== 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; bh=FMdY85tDxKYyovkRMm1E6C+LHsKwUGq5Hba7F/zCD5o=; b=0R3U0fXKGc4uFRPsHmRWVmM3ZIQwxjXiw+n8QfpqV3iPjeh8mlsIQdvYiFvg4rG2N+ DiWOjXhgRXjSHgGLIbZNoXde1HdB3AZfN7Y48EFBinTrvhT7TVgyNKCyjEjUcUaLP89G RRUtAk47CTVlPdEZPFjnb6TOVR+eB6jilq90k+zp3tvLRrvsVJuL9ej7dFG4grPJZFql ygSEdzWekcOH2BXwQUXGLbHjwlCpTkVTQsi0yecbfgxUqKLpsJAgdAKaYvAL02R2GO2i H3Qz5BXNLMbjsvd7lYOqNLZHtyUBvViHQ7vGTvMtZ/OsE+C/J9+ZUbc6FJu6IQ4DeOcE 9h9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a1si5949741pjs.58.2019.07.11.17.43.44; Thu, 11 Jul 2019 17:43:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728819AbfGLAmt (ORCPT + 99 others); Thu, 11 Jul 2019 20:42:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:7091 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbfGLAmt (ORCPT ); Thu, 11 Jul 2019 20:42:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 17:42:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="174309127" Received: from txu2-mobl.ccr.corp.intel.com (HELO [10.239.196.126]) ([10.239.196.126]) by FMSMGA003.fm.intel.com with ESMTP; 11 Jul 2019 17:42:45 -0700 Subject: Re: [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL To: Paolo Bonzini Cc: rkrcmar@redhat.com, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, sean.j.christopherson@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, fenghua.yu@intel.com, xiaoyao.li@linux.intel.com, jingqi.liu@intel.com References: <20190621055747.17060-1-tao3.xu@intel.com> <20190621055747.17060-3-tao3.xu@intel.com> <43814a5e-12bf-ceb5-e4fb-12bbb32cd4cb@redhat.com> From: Tao Xu Message-ID: Date: Fri, 12 Jul 2019 08:42:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <43814a5e-12bf-ceb5-e4fb-12bbb32cd4cb@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 7/11/2019 9:25 PM, Paolo Bonzini wrote: > On 21/06/19 07:57, Tao Xu wrote: >> + if (guest_cpuid_has(vcpu, X86_FEATURE_WAITPKG)) >> + atomic_switch_umwait_control_msr(vmx); >> + > > guest_cpuid_has is slow. Please replace it with a test on > secondary_exec_controls_get(vmx). Thank you paolo, I will improve it. > > Are you going to look into nested virtualization support? This should > include only 1) allowing setting the enable bit in secondary execution > controls, and passing it through in prepare_vmcs02_early; 2) reflecting > the vmexit in nested_vmx_exit_reflected. > I will add nested support in next version. > Thanks, > > Paolo >