From patchwork Sun May 29 22:37:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 9139997 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 28EC760757 for ; Sun, 29 May 2016 22:40:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B52D1FF29 for ; Sun, 29 May 2016 22:40:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 100CB28188; Sun, 29 May 2016 22:40:03 +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 60F171FF29 for ; Sun, 29 May 2016 22:39:59 +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 1b79LQ-000486-7T; Sun, 29 May 2016 22:38:04 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b79LP-000473-7g for xen-devel@lists.xenproject.org; Sun, 29 May 2016 22:38:03 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id 7C/F0-19610-A4F6B475; Sun, 29 May 2016 22:38:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsVyMfSao65nvne 4weYrNhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bKOU4Fz/gq7s88ztbAeIe7i5GLQ0hgBqPE +2/L2UEcCYF+Vonv81aydDFyAjkxEj8PvWaEsEsl2pauZAOxhQQ0JG7fbGSH6J7IJHHs8wmwB jYBbYm217tYQWwRASWJe6smM3UxcnAwCwRL9P3hBAkLCzhLzJy5H6ycRUBVovfTFLByXqD4+5 Uf2SF2yUlcnv4AbBengIvEm83TmSH2Oku8W3ySfQIj/wJGhlWM6sWpRWWpRbpmeklFmekZJbm JmTm6hoYmermpxcWJ6ak5iUnFesn5uZsYgcHDAAQ7GP9OcD7EKMnBpCTK68bhHS7El5SfUpmR WJwRX1Sak1p8iFGGg0NJgvdaLlBOsCg1PbUiLTMHGMYwaQkOHiURXv48oDRvcUFibnFmOkTqF KMxx5bf19YycWybem8tkxBLXn5eqpQ470GQSQIgpRmleXCDYPF1iVFWSpiXEeg0IZ6C1KLczB JU+VeM4hyMSsK8ciALeTLzSuD2vQI6hQnoFLNzXiCnlCQipKQaGLN5p07efCi8+t3H4CU69qk bD+ev58idL73Z/tWzZR22D1dIn+lvPiVz9V7A9iMyAjZxVsfrb+tMvHIkdXV53LYcYRlvxofm l0MMNu+N0GR++37CtNJGuxxbVtc5AUfCxe4bNVze8evemlsPVZrTV7hduqJ//cDzdLeMdWVP5 hg4py05ov/5/GklluKMREMt5qLiRADtU+nQqgIAAA== X-Env-Sender: tamas.k.lengyel@gmail.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1464561480!44589344!1 X-Originating-IP: [209.85.214.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29107 invoked from network); 29 May 2016 22:38:01 -0000 Received: from mail-it0-f65.google.com (HELO mail-it0-f65.google.com) (209.85.214.65) by server-13.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 29 May 2016 22:38:01 -0000 Received: by mail-it0-f65.google.com with SMTP id z123so4289703itg.2 for ; Sun, 29 May 2016 15:38:01 -0700 (PDT) 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=tTB7H5lOPoErgoe9uiA7cidS31vsx5nHqeNVKx+NuM8=; b=WTVu1gIqGQSIpMFV+U7YlKWg83C108gCc99SDyJR5ye+UoQ5atNgOeE4ag/6F40Jmy 6BKbKP0hFu0fYI6CRUAnmWlFiBhTaEaNcatlFsP5kGjQdlQtvGnUYP3fJLixQYsJ3H+3 +yMqeYTgBWBnccn22m9gFoZms5SuzmcM5JFetCULngeWPNeU5zsIdJFydiZw963MqnpT aDH/ZdjZbVs5vTkulvGolowHBvU6V3mLugCRrqxPLKqR3/vuCB1XyP5bx/sJKa2k0K7n E30ki8L9QgJCzhluHR+jiLuGXfWraV3jPZRoqC2Q0JuTvZcGi3/yhTIan2SDqMzxp92o sgwA== X-Gm-Message-State: ALyK8tLNxNGPWHN/eyLKfmOLyPnH/lzlQtm7lGKWIO0f9N1xFbuFf3mcVz3tpnBujPfjQw== X-Received: by 10.36.9.14 with SMTP id 14mr2780515itm.68.1464561480364; Sun, 29 May 2016 15:38:00 -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 xo3sm6222165igc.22.2016.05.29.15.37.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 May 2016 15:37:59 -0700 (PDT) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Sun, 29 May 2016 16:37:08 -0600 Message-Id: <1464561430-13465-6-git-send-email-tamas@tklengyel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464561430-13465-1-git-send-email-tamas@tklengyel.com> References: <1464561430-13465-1-git-send-email-tamas@tklengyel.com> Cc: Tamas K Lengyel , Ian Jackson Subject: [Xen-devel] [PATCH v4 6/8] 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 | 2 ++ tools/libxc/xc_monitor.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index dc54612..3085130 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2160,6 +2160,8 @@ int xc_monitor_software_breakpoint(xc_interface *xch, domid_t domain_id, bool enable); int xc_monitor_guest_request(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 diff --git a/tools/libxc/xc_monitor.c b/tools/libxc/xc_monitor.c index b1705dd..1e4a9d2 100644 --- a/tools/libxc/xc_monitor.c +++ b/tools/libxc/xc_monitor.c @@ -156,3 +156,27 @@ int xc_monitor_emulate_each_rep(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 + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */