From patchwork Tue Jul 5 18:37:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas Lengyel X-Patchwork-Id: 9215075 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 CE25460752 for ; Tue, 5 Jul 2016 18:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE1028119 for ; Tue, 5 Jul 2016 18:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE1B828179; Tue, 5 Jul 2016 18:40:13 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 00F5428119 for ; Tue, 5 Jul 2016 18:40:12 +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 1bKVER-000189-9P; Tue, 05 Jul 2016 18:38:03 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKVEQ-00015g-BL for xen-devel@lists.xenproject.org; Tue, 05 Jul 2016 18:38:02 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 47/F3-22092-A8EFB775; Tue, 05 Jul 2016 18:38:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRWlGSWpSXmKPExsVyMfT+Yd3Of9X hBuufilt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnnFu5lKljAVzG/bztzA+My7i5GLg4hgZmM El/mbmcHcVgEmlklXk7YxQjiSAj0s0q0Pd7H1MXICeTESHz+OJWti5EDyK6RWNruAxIWEtCUO LjhDDPEpElMEpdvbGYBSbAJGElcvdrDBmKLCChJ3Fs1GWwOs0CUxORv31hBbGEBZ4nv/2Ywg9 gsAqoSnTufMoHM5xXwlFjY6AqxVk7i8vQHYGM4Bbwkjqz/xQax11Pizrb7zBMYBRYwMqxiVC9 OLSpLLdI11ksqykzPKMlNzMzRNTQw08tNLS5OTE/NSUwq1kvOz93ECAwrBiDYwdjxz+kQoyQH k5IoL8u36nAhvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErw//gDlBItS01Mr0jJzgAEOk5bg4FES4 Q38C5TmLS5IzC3OTIdInWI05tjy+9paJo5tU++tZRJiycvPS5US55UHKRUAKc0ozYMbBIu8S4 yyUsK8jECnCfEUpBblZpagyr9iFOdgVBLmzQGZwpOZVwK37xXQKUxAp/x0ATulJBEhJdXAqCf CJxDLvzfpBX9QI8PFxYYLT7FWfPjevUc6c88inpkNf6dV+fHz6Z4Ksuj1lgieVm579f3rterW TnXff5ix312evcXjiP3jM249nYty5h/g2c8/eQUji8bjmvRTH521WqyUw2uVmgNyjXVNDPV51 y2adF3rrJSy6MZ1a/WdPDSigqf0P9qlxFKckWioxVxUnAgAV/sRGLcCAAA= X-Env-Sender: tamas.lengyel@zentific.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1467743880!22390202!1 X-Originating-IP: [209.85.223.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15742 invoked from network); 5 Jul 2016 18:38:01 -0000 Received: from mail-io0-f195.google.com (HELO mail-io0-f195.google.com) (209.85.223.195) by server-14.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 Jul 2016 18:38:01 -0000 Received: by mail-io0-f195.google.com with SMTP id t74so21572744ioi.0 for ; Tue, 05 Jul 2016 11:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zentific-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tg56ZWT+WuxjQp38vQ93bMQqV0jJ/dnPdpbIUTN4hSc=; b=VeEez4HLhEacuzVTgSRy0OUzJf8+8vixONmWLjJrrd2YmrwG5YZ8HVuWA26ltieBiD Msw26/G3KzG49Q/xyWA+o0h6SjnyanSf8TtZPr7p63z39OgCtF8NhnfnHBQrGn2BOpk+ EhhrZtz4aovJR70Mw6iHcnS1dTmqNBeHuVt7sDKYe+Kcn1ZEutIfP0y8KwE+L6Qz3CJV MxP23DKFFQAVi06Pjd8bwi1S9Vhgi6Sg6S0rjOB0SJ3jMfgWuR+slBvwQTpvaySXmG0d MOFY0Hs1XxD0BSzUrypkhYGzxm8cnEzZI9Wl9GlKbLLKoQYvdBJ0AHlT/zCV2vBfGZfi /4AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tg56ZWT+WuxjQp38vQ93bMQqV0jJ/dnPdpbIUTN4hSc=; b=Lq+jmXXjlw/PU4blXvXenzb13FIp2MvFkP+qKO7CEP/Rt+45Oyxh4bXnj21Bdbr8jJ QzGci7uupU7i4qbvhM+Cp10t5onmsIPJygHC3eiL1VSDFn/Mc1ELQyYf8UWv2cc4PHN5 DGBvAhns3A/j1iis78BAzUL+XJVDeojRzHR39pq09b4eBBvUEeHl/pCWYufbYTdnmc29 qr9bQfvW4A6miKHCo9cSHcQR1XZaGms9cCHRYZj9OWEzKI7jasiUfIa1SxXxQEM2H+/p jD7gFwVkTWlSTLbenp5UlhHfDauh10YHrFK3wwLYkZJV9RxMFN+L7q+cxV/wohdi0mmT CO/w== X-Gm-Message-State: ALyK8tJKRnNbO5pSwvX+2DwhY/HkzoMmprdRBFtK50Xsi7zLtFvhBfuVoohNIo3wr/P7HA== X-Received: by 10.107.138.201 with SMTP id c70mr13903098ioj.148.1467743879821; Tue, 05 Jul 2016 11:37:59 -0700 (PDT) Received: from l1.lan (c-73-14-35-59.hsd1.co.comcast.net. [73.14.35.59]) by smtp.gmail.com with ESMTPSA id o133sm2083760ioo.10.2016.07.05.11.37.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jul 2016 11:37:59 -0700 (PDT) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Tue, 5 Jul 2016 12:37:50 -0600 Message-Id: <1467743871-9644-5-git-send-email-tamas.lengyel@zentific.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1467743871-9644-1-git-send-email-tamas.lengyel@zentific.com> References: <1467743871-9644-1-git-send-email-tamas.lengyel@zentific.com> Cc: Tamas K Lengyel , Ian Jackson Subject: [Xen-devel] [PATCH v8 5/6] tools/libxc: add xc_monitor_privileged_call 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 These are the user-space components for the new ARM SMC events. Signed-off-by: Tamas K Lengyel Acked-by: Wei Liu --- Cc: Ian Jackson --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_monitor.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 4a85b4a..5249d06 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2167,6 +2167,9 @@ int xc_monitor_guest_request(xc_interface *xch, domid_t domain_id, bool enable, bool sync); int xc_monitor_debug_exceptions(xc_interface *xch, domid_t domain_id, bool enable, bool sync); +int xc_monitor_privileged_call(xc_interface *xch, domid_t domain_id, + bool enable); + /** * This function enables / disables emulation for each REP for a * REP-compatible instruction. diff --git a/tools/libxc/xc_monitor.c b/tools/libxc/xc_monitor.c index 264992c..61da88d 100644 --- a/tools/libxc/xc_monitor.c +++ b/tools/libxc/xc_monitor.c @@ -172,6 +172,20 @@ int xc_monitor_debug_exceptions(xc_interface *xch, domid_t domain_id, return do_domctl(xch, &domctl); } +int xc_monitor_privileged_call(xc_interface *xch, domid_t domain_id, + bool enable) +{ + DECLARE_DOMCTL; + + domctl.cmd = XEN_DOMCTL_monitor_op; + domctl.domain = domain_id; + domctl.u.monitor_op.op = enable ? XEN_DOMCTL_MONITOR_OP_ENABLE + : XEN_DOMCTL_MONITOR_OP_DISABLE; + domctl.u.monitor_op.event = XEN_DOMCTL_MONITOR_EVENT_PRIVILEGED_CALL; + + return do_domctl(xch, &domctl); +} + /* * Local variables: * mode: C