From patchwork Thu Mar 17 16:12:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joao Martins X-Patchwork-Id: 8612891 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E33259F44D for ; Thu, 17 Mar 2016 16:16:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F414620373 for ; Thu, 17 Mar 2016 16:16:45 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 269CD20304 for ; Thu, 17 Mar 2016 16:16:45 +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 1agaYw-0004Ua-S5; Thu, 17 Mar 2016 16:14:14 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agaYv-0004Tk-Bz for xen-devel@lists.xen.org; Thu, 17 Mar 2016 16:14:13 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id BD/47-02979-4D7DAE65; Thu, 17 Mar 2016 16:14:12 +0000 X-Env-Sender: joao.m.martins@oracle.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1458231250!31104327!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29958 invoked from network); 17 Mar 2016 16:14:11 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-4.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Mar 2016 16:14:11 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2HGE9Al012525 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Mar 2016 16:14:09 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u2HGE93t003234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 17 Mar 2016 16:14:09 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u2HGE82D007616; Thu, 17 Mar 2016 16:14:08 GMT Received: from localhost.localdomain (/89.181.14.119) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 Mar 2016 09:12:32 -0700 MIME-Version: 1.0 Message-ID: <1458231136-13457-2-git-send-email-joao.m.martins@oracle.com> Date: Thu, 17 Mar 2016 09:12:12 -0700 (PDT) From: Joao Martins To: xen-devel@lists.xen.org References: <1458231136-13457-1-git-send-email-joao.m.martins@oracle.com> In-Reply-To: <1458231136-13457-1-git-send-email-joao.m.martins@oracle.com> X-Mailer: git-send-email 2.1.4 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: Keir Fraser , Joao Martins , Ian Jackson , Jan Beulich , Tim Deegan Subject: [Xen-devel] [PATCH 1/5] public/xen.h: add flags field to vcpu_time_info 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This field has two possible flags (as of latest pvclock ABI shared with KVM). flags: bits in this field indicate extended capabilities coordinated between the guest and the hypervisor. Specifically on KVM, availability of specific flags has to be checked in 0x40000001 cpuid leaf. On Xen, we don't have that but we can still check some of the flags after registering the time info page since a force_update_vcpu_system_time is performed. Current flags are: flag bit | cpuid bit | meaning ------------------------------------------------------------- | | time measures taken across 0 | 24 | multiple cpus are guaranteed to | | be monotonic ------------------------------------------------------------- | | guest vcpu has been paused by 1 | N/A | the host | | ------------------------------------------------------------- Signed-off-by: Joao Martins Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- xen/include/public/xen.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 64ba7ab..08373f6 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -614,10 +614,14 @@ struct vcpu_time_info { */ uint32_t tsc_to_system_mul; int8_t tsc_shift; - int8_t pad1[3]; + int8_t flags; + int8_t pad1[2]; }; /* 32 bytes */ typedef struct vcpu_time_info vcpu_time_info_t; +#define PVCLOCK_TSC_STABLE_BIT (1 << 0) +#define PVCLOCK_GUEST_STOPPED (1 << 1) + struct vcpu_info { /* * 'evtchn_upcall_pending' is written non-zero by Xen to indicate