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

Re: [Xen-devel] [PATCH v9 04/27] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op



On 04/25/2016 04:34 PM, Konrad Rzeszutek Wilk wrote:
snip
+static int xsplice_action(xen_sysctl_xsplice_action_t *action)
+{
+    struct payload *data;
+    char n[XEN_XSPLICE_NAME_SIZE];
+    int rc;
+
+    rc = get_name(&action->name, n);
+    if ( rc )
+        return rc;
+
+    spin_lock(&payload_lock);
+
+    data = find_payload(n);
+    if ( IS_ERR_OR_NULL(data) )
+    {
+        spin_unlock(&payload_lock);
+
+        if ( !data )
+            return -ENOENT;
+
+        return PTR_ERR(data);
+    }
+
+    switch ( action->cmd )
+    {
+    case XSPLICE_ACTION_CHECK:
+        if ( data->state == XSPLICE_STATE_CHECKED )
+        {
+            /* No implementation yet. */
+            data->state = XSPLICE_STATE_CHECKED;
+            data->rc = 0;
+        } else
+            rc = -EINVAL;
+        break;

If the payload goes straight into the CHECKED stated, then it doesn't make sense to have the above case.

--
Ross Lagerwall

_______________________________________________
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®.