From patchwork Thu Sep 28 10:02:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 9975699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BD386037E for ; Thu, 28 Sep 2017 10:05:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BA5E2953F for ; Thu, 28 Sep 2017 10:05:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DA6429548; Thu, 28 Sep 2017 10:05:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB3F22953F for ; Thu, 28 Sep 2017 10:05:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxVeO-0006qm-9p; Thu, 28 Sep 2017 10:02:36 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxVeN-0006pl-39 for xen-devel@lists.xenproject.org; Thu, 28 Sep 2017 10:02:35 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 44/78-03283-AB8CCC95; Thu, 28 Sep 2017 10:02:34 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRWlGSWpSXmKPExsVyuP0Ov+72E2c iDVbME7T4vmUykwOjx+EPV1gCGKNYM/OS8isSWDN2tHSxF2zhq2h68pS5gXExdxcjJ4eEgJHE 24n/mLoYuTiEBBYySlw+/5gFJMEmoCqx4fopVhBbREBJ4t6qyWBFzAIPGSVer3rGDJIQFgiSO PTlMZjNAtRwZuYdsAZeAROJrV1XWSA2yEt0HJgMZnMKmEp8OnAfrEYIqObFtnWMExi5FzAyrG JUL04tKkst0jXVSyrKTM8oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQI9C8DEOxgnH7Z/xC jJAeTkijvrb1nIoX4kvJTKjMSizPii0pzUosPMcpwcChJ8DYfB8oJFqWmp1akZeYAAw0mLcHB oyTCuw0kzVtckJhbnJkOkTrFaMxxbNPlP0wcHTfv/mESYsnLz0uVEue9A1IqAFKaUZoHNwgWA ZcYZaWEeRmBThPiKUgtys0sQZV/xSjOwagkzNsLMoUnM68Ebt8roFOYgE6ZPBHslJJEhJRUA2 NE4+n+K9vj5HaoRcbzX+ELP9lQ9Mc3+Xnf/WjDzLxm7p0/AhadLnM59+WPltHU26LLNC6eu+J 4+UiKUtTdt1IPnt0v/SjppXSxuEONacujmeezczacali9qaP3/0xGt+zA1BncWXnHZfYmhf3x K169feXrAwtcOU7nrRV//uqSlqLgrjyxtj4lluKMREMt5qLiRAD2NoSbewIAAA== X-Env-Sender: jgross@suse.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1506592951!118644923!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1102 invoked from network); 28 Sep 2017 10:02:31 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-3.tower-27.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 28 Sep 2017 10:02:31 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D3483ABD9; Thu, 28 Sep 2017 10:02:30 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Thu, 28 Sep 2017 12:02:26 +0200 Message-Id: <20170928100226.15280-4-jgross@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170928100226.15280-1-jgross@suse.com> References: <20170928100226.15280-1-jgross@suse.com> Cc: Juergen Gross , sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com, jbeulich@suse.com Subject: [Xen-devel] [PATCH v11 3/3] xen: add some comments in include/public/arch-x86/cpuid.h X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Leaf 4 of the Xen-specific CPUID leaves isn't mentioned at all in include/public/arch-x86/cpuid.h, the comments for leaf 5 don't tell anything about the sub-leaf semantics. Add comments to clarify the interface. Signed-off-by: Juergen Gross Acked-by: Jan Beulich --- xen/include/public/arch-x86/cpuid.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/xen/include/public/arch-x86/cpuid.h b/xen/include/public/arch-x86/cpuid.h index 3d88c15598..f7569d58b0 100644 --- a/xen/include/public/arch-x86/cpuid.h +++ b/xen/include/public/arch-x86/cpuid.h @@ -74,10 +74,26 @@ #define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0) /* + * Leaf 4 (0x40000x03) + * Sub-leaf 0: EAX: bit 0: emulated tsc + * bit 1: host tsc is known to be reliable + * bit 2: RDTSCP instruction available + * EBX: tsc_mode: 0=default (emulate if necessary), 1=emulate, + * 2=no emulation, 3=no emulation + TSC_AUX support + * ECX: guest tsc frequency in kHz + * EDX: guest tsc incarnation (migration count) + * Sub-leaf 1: EAX: tsc offset low part + * EBX: tsc offset high part + * ECX: multiplicator for tsc->ns conversion + * EDX: shift amount for tsc->ns conversion + * Sub-leaf 2: EAX: host tsc frequency in kHz + */ + +/* * Leaf 5 (0x40000x04) * HVM-specific features - * EAX: Features - * EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) + * Sub-leaf 0: EAX: Features + * Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) */ #define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */ #define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */