Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5716112ybi; Tue, 28 May 2019 18:31:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ0gCxgt251TEWAZ9NII+r64gpT2x1C7lFzD1lsHGGCtveg6cFSgY8OCr0bkEsEwjLHmZ7 X-Received: by 2002:a63:1421:: with SMTP id u33mr11622849pgl.218.1559093487055; Tue, 28 May 2019 18:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559093487; cv=none; d=google.com; s=arc-20160816; b=LgrdcgpA4/v4c29+H3iUisfnb3rvZ3teXHmmgN4Ye4cDUBk9vw1seObSpQP/byXQg6 Yjgv1sV81pMtkOrbp+uQhd53wtZ6v5nPmjNW2ln8U1i/0AKwq4kBruwpdt07uKzcYE0A mb0WPZji6eAyFPI0Z1yPYyIP5pmUnbW3x+z8oCdQUfWZrI2Tzerkcgyly1H8MqY+rZ/d 8uuxLCfr2r6pEPH8+p6AMAVzwu7qZrP1BmEqGXRvyEzJNk71lmhLSdicxd5FCVODgluS iUtya6E2pXuKkp+eJK3Tbm+grJFQTutOpL2wTIW0vtydmrAslEyRbcdIJ1S4Is4hHCKu kM0w== 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=d+bGedX5o6nE+Y5FXR8KV1S9iuqLVRpYMqTJ+aAu2NM=; b=iJnKffJgrcA6fONpwn9OMcSExa0j/rh6IwlQVhyq6x9jIXeEuVFl7bpKbpVkhZ0/GD Yn30dBPCssdMslVUlto8gjZh72/xNtt7WOo+r6NNkIB//g8nbhM6E8xfvMZVBhsFgIdq B0gB6VnGA25ZEsDwVXAr2JuhWDzZ4KcCM7XfyS9r2aP7OEFGxlondP1u2J4UZQ8nvA0O CwW8F1GCDoJXKu3zJCKU2mj4VlHeB5LqmcJQai87Rs4MehvcVFYFSm8MZQwGe97g9o84 2pyjOcrzvs7Hf4ssRfqrEQ4WYof36qnQVgWmoXqjTjPhaS3/4vg7ZtaF1EtMD3qS9G00 n8Pg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si22808453plz.417.2019.05.28.18.31.11; Tue, 28 May 2019 18:31:27 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726120AbfE2B37 (ORCPT + 99 others); Tue, 28 May 2019 21:29:59 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40353 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfE2B37 (ORCPT ); Tue, 28 May 2019 21:29:59 -0400 Received: by mail-wm1-f66.google.com with SMTP id 15so366486wmg.5 for ; Tue, 28 May 2019 18:29:57 -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=d+bGedX5o6nE+Y5FXR8KV1S9iuqLVRpYMqTJ+aAu2NM=; b=ScIGPY5JNb/HmKUCkAQeO+p4Rj5LMpArIDpGw//VL5NZXm6bZQ/+17BkyyTR6E7YpR S7madk5ZDmUDMNH0XPGBN+qxZAxUAjePzMuGK1J72qhTy/EZFgKejYUsbryQJNQmcd9z 683/l7et/RDYHweGWd0lJxsd4qVoDMGpxpamkrzq2QIwRogYVb10I1brNs5bDcbkc6tc juo8lXtNudjD9diH6NlW0Sd1eFmFmaOi8pBREMnxQbZp/9ao5y9/4S3sh7enXqBFrE5T T8T5/cqfZzqcIImHC/K4kNzp2Wf6ppZNeqJh5M8zAE3pqCq26oR6uhbOR8gkO8MHgo0t crcA== X-Gm-Message-State: APjAAAUCTp1OFqopKlsLx60K6vT+I6bOpoquJX7WxAwbrKRHzKgLi2AU tXpouwTcHYsABshl0Vck3L3kAg== X-Received: by 2002:a1c:678a:: with SMTP id b132mr4862856wmc.17.1559093397185; Tue, 28 May 2019 18:29:57 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id i17sm12789322wrr.46.2019.05.28.18.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 18:29:56 -0700 (PDT) Subject: Re: [PATCH v2 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL To: Tao Xu , 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: Paolo Bonzini Message-ID: Date: Wed, 29 May 2019 03:29:55 +0200 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: <20190524075637.29496-3-tao3.xu@intel.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 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