WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] mem_access: access listener can be requir

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mem_access: access listener can be required
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 07:58:51 -0800
Delivery-date: Mon, 17 Jan 2011 08:05:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Joe Epstein <jepstein98@xxxxxxxxx>
# Date 1294401282 0
# Node ID 8af5bab1bf43cc793ea9b342a7929827782b8628
# Parent  02efc054da7bf67540db5ae4f9e7b0369685d72c
mem_access: access listener can be required

* Adds the ability to set that a domain that an access listener;
  that is, it pauses the VCPU if there is no memory event listener.

Signed-off-by: Joe Epstein <jepstein98@xxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---
 xen/arch/x86/domctl.c       |   20 ++++++++++++++++++++
 xen/include/public/domctl.h |   12 ++++++++++++
 2 files changed, 32 insertions(+)

diff -r 02efc054da7b -r 8af5bab1bf43 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Fri Jan 07 11:54:40 2011 +0000
+++ b/xen/arch/x86/domctl.c     Fri Jan 07 11:54:42 2011 +0000
@@ -1566,6 +1566,26 @@ long arch_do_domctl(
     break;
 #endif /* __x86_64__ */
 
+    case XEN_DOMCTL_set_access_required:
+    {
+        struct domain *d;
+        struct p2m_domain* p2m;
+        
+        ret = -EPERM;
+        if ( current->domain->domain_id == domctl->domain )
+            break;
+
+        ret = -ESRCH;
+        d = rcu_lock_domain_by_id(domctl->domain);
+        if ( d != NULL )
+        {
+            p2m = p2m_get_hostp2m(d);
+            p2m->access_required = domctl->u.access_required.access_required;
+            rcu_unlock_domain(d);
+        } 
+    }
+    break;
+
     default:
         ret = -ENOSYS;
         break;
diff -r 02efc054da7b -r 8af5bab1bf43 xen/include/public/domctl.h
--- a/xen/include/public/domctl.h       Fri Jan 07 11:54:40 2011 +0000
+++ b/xen/include/public/domctl.h       Fri Jan 07 11:54:42 2011 +0000
@@ -819,6 +819,16 @@ typedef struct xen_domctl_vcpuextstate x
 typedef struct xen_domctl_vcpuextstate xen_domctl_vcpuextstate_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuextstate_t);
 #endif
+
+/* XEN_DOMCTL_set_access_required: sets whether a memory event listener
+ * must be present to handle page access events: if false, the page
+ * access will revert to full permissions if no one is listening;
+ *  */
+struct xen_domctl_set_access_required {
+    uint8_t access_required;
+};
+typedef struct xen_domctl_set_access_required xen_domctl_set_access_required_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_access_required_t);
 
 struct xen_domctl {
     uint32_t cmd;
@@ -882,6 +892,7 @@ struct xen_domctl {
 #define XEN_DOMCTL_getpageframeinfo3             61
 #define XEN_DOMCTL_setvcpuextstate               62
 #define XEN_DOMCTL_getvcpuextstate               63
+#define XEN_DOMCTL_set_access_required           64
 #define XEN_DOMCTL_gdbsx_guestmemio            1000
 #define XEN_DOMCTL_gdbsx_pausevcpu             1001
 #define XEN_DOMCTL_gdbsx_unpausevcpu           1002
@@ -934,6 +945,7 @@ struct xen_domctl {
         struct xen_domctl_cpuid             cpuid;
         struct xen_domctl_vcpuextstate      vcpuextstate;
 #endif
+        struct xen_domctl_set_access_required access_required;
         struct xen_domctl_gdbsx_memio       gdbsx_guest_memio;
         struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
         struct xen_domctl_gdbsx_domstatus   gdbsx_domstatus;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] mem_access: access listener can be required, Xen patchbot-unstable <=