From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_ILLEGAL_IP,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 063837D2EF for ; Wed, 29 May 2019 01:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725872AbfE2Bkg (ORCPT ); Tue, 28 May 2019 21:40:36 -0400 Received: from mga18.intel.com ([134.134.136.126]:31292 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfE2Bkg (ORCPT ); Tue, 28 May 2019 21:40:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 18:40:34 -0700 X-ExtLoop1: 1 Received: from shzintpr02.sh.intel.com (HELO [0.0.0.0]) ([10.239.4.160]) by orsmga001.jf.intel.com with ESMTP; 28 May 2019 18:40:32 -0700 Subject: Re: [PATCH v2 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL To: Paolo Bonzini , rkrcmar@redhat.com, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, sean.j.christopherson@intel.com Cc: x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, jingqi.liu@intel.com References: <20190524075637.29496-1-tao3.xu@intel.com> <20190524075637.29496-3-tao3.xu@intel.com> From: Tao Xu Message-ID: <2922ac60-a22e-e22c-363a-04f3a2bb6838@intel.com> Date: Wed, 29 May 2019 09:38:13 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 29/05/2019 09:29, Paolo Bonzini wrote: > On 24/05/19 09:56, Tao Xu wrote: >> + >> + if (rdmsrl_safe(MSR_IA32_UMWAIT_CONTROL, &host_umwait_control)) >> + return; >> + > > Does the host value ever change? If not, this can perhaps be read once > when kvm_intel is loaded. And if it changes often, it should be > shadowed into a percpu variable. > > Paolo > Yes, the host value may change, we contact the host patch author Fenghua to add the shadow in host when the host msr value change. And we will improve this in the next version of patch.