All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tamas K Lengyel <tamas.lengyel@zentific.com>
To: xen-devel@lists.xenproject.org
Cc: Tamas K Lengyel <tamas.lengyel@zentific.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH v8 5/6] tools/libxc: add xc_monitor_privileged_call
Date: Tue,  5 Jul 2016 12:37:50 -0600	[thread overview]
Message-ID: <1467743871-9644-5-git-send-email-tamas.lengyel@zentific.com> (raw)
In-Reply-To: <1467743871-9644-1-git-send-email-tamas.lengyel@zentific.com>

These are the user-space components for the new ARM SMC events.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 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
-- 
2.8.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-07-05 18:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 18:37 [PATCH v8 1/6] monitor: rename and relocate vm_event_monitor_traps Tamas K Lengyel
2016-07-05 18:37 ` [PATCH v8 2/6] arm: filter SMC exceptions with failed condition checks Tamas K Lengyel
2016-07-06 17:31   ` Julien Grall
2016-07-06 18:52     ` Tamas K Lengyel
2016-07-05 18:37 ` [PATCH v8 3/6] monitor: ARM SMC events Tamas K Lengyel
2016-07-05 18:37 ` [PATCH v8 4/6] arm/vm_event: get/set registers Tamas K Lengyel
2016-07-06  7:43   ` Jan Beulich
2016-07-06  7:59     ` Razvan Cojocaru
2016-07-06 17:39     ` Julien Grall
2016-07-06 19:23     ` Tamas K Lengyel
2016-07-06 21:12       ` Julien Grall
2016-07-06 22:01         ` Tamas K Lengyel
2016-07-06 18:04   ` Julien Grall
2016-07-06 19:12     ` Tamas K Lengyel
2016-07-07  8:23       ` Jan Beulich
2016-07-07  9:46         ` Julien Grall
2016-07-07  9:57           ` Jan Beulich
2016-07-07 10:09             ` Julien Grall
2016-07-07 15:53               ` Tamas K Lengyel
2016-07-05 18:37 ` Tamas K Lengyel [this message]
2016-07-05 18:37 ` [PATCH v8 6/6] tools/xen-access: add test-case for ARM SMC Tamas K Lengyel
2016-07-07 10:05   ` Julien Grall
2016-07-07 15:54     ` Tamas K Lengyel
2016-07-05 19:15 ` [PATCH v8 1/6] monitor: rename and relocate vm_event_monitor_traps Razvan Cojocaru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467743871-9644-5-git-send-email-tamas.lengyel@zentific.com \
    --to=tamas.lengyel@zentific.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.