Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4326022ybi; Mon, 15 Jul 2019 07:18:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7pjRTtrOXNzT6UsDor7lrTxAQcUE8/UEKZCeyHQjqEnGp7A+Vz+u0TuWDA7YQj603FHFc X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr28939688plq.144.1563200290101; Mon, 15 Jul 2019 07:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563200290; cv=none; d=google.com; s=arc-20160816; b=qAaE5ugGdjKjOMq9pzbgAdG9Jo5Xqj+7D08znd3iqEJd9Q4AJqI0ypF7l7ban99ibz qk+6z0MFGtS48e9nvr6dhRM4HMYavO4JB1KHsG9nintsirmBb7VAviDOEWPTeUGrUmEW 7CSg/HcNkpeKwrgKhmXCYAT8WP7nM88ndB4fxbJVGdvXtKNi92GYLbpFx3a7bHJbFY+R RWor+lqxasgztASys9cSF5FLnJZEM0huEUL3UVjr+yH20axairUN3DmhAOHUguGxS5QH 8P6kSrZzeo9d9Bf97MvO0RnWplYm7BR94QLSD6UawDG1b7w8w7Ibkrkrm5tXJEkpNqf9 IjJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FFEtXQ5OlQV1RfGsgHotvD+vUEorEVgz7nCg5Gm0jwQ=; b=L0PF1IVYj0tqY0weph/E6b2/4ajUWgQIlULMmmUwqz/JjVN2uhLzLcRrH2FlE0VmEZ cOU6AgxM9BSTOM1QaYkfEF5duWhMWN9uM/C53Wlh/3/B4MgJI59WFS22Hrdap3S6APoX isRqtiq2ahvB6b8HvUmt2flH+pWXgStWxFsfrAW0D9LdqfsETdpPr7tlAKKWOpEqeZTq hlbkBzKLscEVMj3OQhz3wbKHGP92g6HzdSEJfv3D5moXiQu3IHZhiDotIfpf9Mi99Gr8 NGd9TqnCIh4ZP/nIWUF9fAlSEgbvVhY4VrETvrnbA971q02rM/zoSqkTFQO/NyDFO5Qv Xv3Q== 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 x11si15602033pll.343.2019.07.15.07.17.50; Mon, 15 Jul 2019 07:18:10 -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 S2389735AbfGOOQj (ORCPT + 99 others); Mon, 15 Jul 2019 10:16:39 -0400 Received: from mga07.intel.com ([134.134.136.100]:1226 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731676AbfGOOQh (ORCPT ); Mon, 15 Jul 2019 10:16:37 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 07:16:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="scan'208";a="167347987" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.165]) by fmsmga008.fm.intel.com with ESMTP; 15 Jul 2019 07:16:36 -0700 Date: Mon, 15 Jul 2019 07:16:36 -0700 From: Sean Christopherson To: Tao Xu Cc: pbonzini@redhat.com, rkrcmar@redhat.com, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, fenghua.yu@intel.com, xiaoyao.li@linux.intel.com, jingqi.liu@intel.com Subject: Re: [PATCH v7 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL Message-ID: <20190715141636.GB442@linux.intel.com> References: <20190712082907.29137-1-tao3.xu@intel.com> <20190712082907.29137-3-tao3.xu@intel.com> <20190712155202.GC29659@linux.intel.com> <8ed3cec5-8ba9-b2ed-f0e4-eefb0a988bc8@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ed3cec5-8ba9-b2ed-f0e4-eefb0a988bc8@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 15, 2019 at 09:22:14AM +0800, Tao Xu wrote: > On 7/12/2019 11:52 PM, Sean Christopherson wrote: > >The SDM only defines bits 31:0, and the kernel uses a u32 to cache its > >value. I assume bits 63:32 are reserved? I'm guessing we also need an > >SDM update... > > > > The SDM define IA32_UMWAIT_CONTROL is a 32bit MSR. So need me to set 63:32 > reserved? Huh, I didn't realize the SDM allows 32 bit MSRs, I assumed all bits needed to be explicitly defined even if the underlying implementation only tracked 32 bits. RDMSR: If fewer than 64 bits are implemented in the MSR being read, the values return in EDX:EAX in unimplemented bit locations are undefined. WRMSR: Undefined or reserved bits in an MSR should be set to values previously read. From KVM's perspective, bits 63:32 should be treated as reserved-to-zero. This also means that struct vcpu_vmx can track a u32 instead of a u64 for msr_ia32_umwait_control.