[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 2/2] xen/vm-events: Move parts of monitor_domctl code to common-side.


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
  • Date: Mon, 15 Feb 2016 10:46:38 +0200
  • Cc: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 15 Feb 2016 08:46:52 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=Dq+G3UgkkWtgBzFBGqR4BziJLMCupwtZQrt3HUC0k7H6o7ZUhrkw8uKJE+o7+Tfvl0D/Z5gvB/Ibvuq4HRVaqIHFZZkMO4YijhqF0TL/11PPax4vj5JYibGbFAdPdK60c2Z6kEUPpHuIZxlWNQ3OcbzciUzOYTS+q7Ro4mrVKfp7ulZk+K5KgvMJHh25fh2ZMNeXKXot+AZZu5KaJ+csCbViSh6I921uoxoQwIJlAzfnErwgepsvWdmpKV2Q4AJZzELF19qV6IkCsKPX1Gnj5IoqKrerGe09r5/UfMHzWG4CUKJ4sn1hyDIqZIGDd46fyv6QvxzCcRoIA5DF2Sof+Q==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 2/15/2016 8:37 AM, Corneliu ZUZU wrote:
diff --git a/xen/common/monitor.c b/xen/common/monitor.c
new file mode 100644
index 0000000..b708cab
--- /dev/null
+++ b/xen/common/monitor.c
+    int rc;
+    bool_t requested_status = 0;
+
+    if ( unlikely(current->domain == d) ) /* no domain_pause() */
+        return -EPERM;
+
+    rc = xsm_vm_event_control(XSM_PRIV, d, mop->op, mop->event);
+    if ( unlikely(rc) )
+        return rc;
+
+    switch ( mop->op )
+    {
+    case XEN_DOMCTL_MONITOR_OP_ENABLE:
+        requested_status = 1;
+        /* fallthrough */
+    case XEN_DOMCTL_MONITOR_OP_DISABLE:
+        /* Check if event type is available. */
+        if ( unlikely(!(arch_monitor_get_capabilities(d) & (1 << mop->event))) 
)
+            return -EOPNOTSUPP;
+        /* Arch-side handles enable/disable ops. */
+        return arch_monitor_domctl_event(d, mop);


Only noticed now, requested_status now became unused in this function.
Will remove in v4.

Corneliu.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.