From patchwork Mon Dec 12 16:18:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9470919 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 BD99860573 for ; Mon, 12 Dec 2016 16:24:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4FAF284D4 for ; Mon, 12 Dec 2016 16:24:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9E79284D9; Mon, 12 Dec 2016 16:24:21 +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 5F3A1284D4 for ; Mon, 12 Dec 2016 16:24:21 +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 1cGTMf-0002F8-Tk; Mon, 12 Dec 2016 16:22:09 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGTMf-0002DT-0d for xen-devel@lists.xen.org; Mon, 12 Dec 2016 16:22:09 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 36/BF-14841-0BECE485; Mon, 12 Dec 2016 16:22:08 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeJIrShJLcpLzFFi42JxWrrBXnf9Ob8 Ig/+/jCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oy+v9dZCm4IV9xfWdzAuJu/i5GTQ0LAX+Ls qsVsIDabgIHErUvfmUFsEQFZidVdc9i7GLk4mAVWMEp8WrWWBSQhLOAkcfHTWiYQm0VAVeLtw XVgNq+Ap8TSSTdYIIbKSdw81wk2iFPAS+L2lnZ2EFsIqGZZ5ydWCFtN4u3yMywQvYISJ2c+Ab OZBSQkDr54wTyBkXcWktQsJKkFjEyrGDWKU4vKUot0DS30kooy0zNKchMzc3QNDUz1clOLixP TU3MSk4r1kvNzNzECg4cBCHYwNm33PMQoycGkJMr75YBfhBBfUn5KZUZicUZ8UWlOavEhRhkO DiUJ3otngHKCRanpqRVpmTnAMIZJS3DwKInwKp8FSvMWFyTmFmemQ6ROMSpKifOeBOkTAElkl ObBtcFi5xKjrJQwLyPQIUI8BalFuZklqPKvGMU5GJWEeWeDjOfJzCuBm/4KaDET0OLn+7xBFp ckIqSkGhjrf73zmXZf4NYUH+HbYi82G+UcsfGcWLzm6+e5lep2MS/cv948H8oS2yj8JZbvwQH npU9Xp7x6tu6PdkCC1XshKxXXDT/qBbTmGz59YMuUtl1Tz+jlTaFHtx/Mq9a+1+fTyh8/70bF WqGnrT2VCo21jp03L/08rKTRsHDJ/Q/9B5L/HU3p2hWqxFKckWioxVxUnAgApu7GZJgCAAA= X-Env-Sender: prvs=147044df7=ross.lagerwall@citrix.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1481559723!75133514!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14080 invoked from network); 12 Dec 2016 16:22:05 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 12 Dec 2016 16:22:05 -0000 X-IronPort-AV: E=Sophos;i="5.33,337,1477958400"; d="scan'208";a="403136619" From: Ross Lagerwall To: Date: Mon, 12 Dec 2016 16:18:07 +0000 Message-ID: <1481559490-13844-5-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481559490-13844-1-git-send-email-ross.lagerwall@citrix.com> References: <1481559490-13844-1-git-send-email-ross.lagerwall@citrix.com> MIME-Version: 1.0 Cc: Ross Lagerwall , Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH v1 4/7] livepatch: Set timeout unit to nanoseconds 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-Virus-Scanned: ClamAV using ClamSMTP The hypervisor already expects the timeout from the hypercall to be in nanoseconds, so set this expectation everywhere. Signed-off-by: Ross Lagerwall Acked-by: Wei Liu --- tools/libxc/include/xenctrl.h | 2 +- xen/common/livepatch.c | 4 ++-- xen/include/public/sysctl.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 2c83544..4ab0f57 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2703,7 +2703,7 @@ int xc_livepatch_list(xc_interface *xch, unsigned int max, unsigned int start, * The operations are asynchronous and the hypervisor may take a while * to complete them. The `timeout` offers an option to expire the * operation if it could not be completed within the specified time - * (in ms). Value of 0 means let hypervisor decide the best timeout. + * (in ns). Value of 0 means let hypervisor decide the best timeout. */ int xc_livepatch_apply(xc_interface *xch, char *name, uint32_t timeout); int xc_livepatch_revert(xc_interface *xch, char *name, uint32_t timeout); diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c index fc8ef99..246e673 100644 --- a/xen/common/livepatch.c +++ b/xen/common/livepatch.c @@ -1227,8 +1227,8 @@ static int schedule_work(struct payload *data, uint32_t cmd, uint32_t timeout) livepatch_work.data = data; livepatch_work.timeout = timeout ?: MILLISECS(30); - dprintk(XENLOG_DEBUG, LIVEPATCH "%s: timeout is %"PRI_stime"ms\n", - data->name, livepatch_work.timeout / MILLISECS(1)); + dprintk(XENLOG_DEBUG, LIVEPATCH "%s: timeout is %"PRIu32"ns\n", + data->name, livepatch_work.timeout); atomic_set(&livepatch_work.semaphore, -1); diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 28ac56c..3c67858 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -1068,7 +1068,7 @@ struct xen_sysctl_livepatch_action { #define LIVEPATCH_ACTION_REPLACE 4 uint32_t cmd; /* IN: LIVEPATCH_ACTION_*. */ uint32_t timeout; /* IN: Zero if no timeout. */ - /* Or upper bound of time (ms) */ + /* Or upper bound of time (ns) */ /* for operation to take. */ }; typedef struct xen_sysctl_livepatch_action xen_sysctl_livepatch_action_t;