[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.
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |