All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy
@ 2019-11-21 18:12 Oleksandr Grytsov
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT Oleksandr Grytsov
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Oleksandr Grytsov @ 2019-11-21 18:12 UTC (permalink / raw)
  To: xen-devel; +Cc: anthony.perard, Oleksandr Grytsov, ian.jackson, wl

From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

Changes since v1:

* add commit to rename VKB backend type "linux" to "pv";
* add default case to handle adding/removing PV devices in add_device,
  remove_device functions (libxl_device.c);
* add comment about removing num_vifs, num_vbds into commit message.

Oleksandr Grytsov (3):
  libxl: introduce new backend type VINPUT
  libxl: rename VKB backend type "linux" to "pv"
  libxl: make default path to add/remove all PV devices

 docs/man/xl.cfg.5.pod.in             |  4 +-
 tools/libxl/libxl_device.c           | 63 +++++++++++-----------------
 tools/libxl/libxl_types.idl          |  2 +-
 tools/libxl/libxl_types_internal.idl |  1 +
 tools/libxl/libxl_vkb.c              | 29 ++++++++-----
 5 files changed, 47 insertions(+), 52 deletions(-)

-- 
2.17.1


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-21 18:12 [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy Oleksandr Grytsov
@ 2019-11-21 18:12 ` Oleksandr Grytsov
  2019-11-22 15:18   ` Anthony PERARD
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv" Oleksandr Grytsov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Oleksandr Grytsov @ 2019-11-21 18:12 UTC (permalink / raw)
  To: xen-devel; +Cc: anthony.perard, Oleksandr Grytsov, ian.jackson, wl

From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

There are two kind of VKBD devices: with QEMU backend and user space PV
backend. In current implementation they can't be distinguished as both use
VKBD backend type. As result, user space PV KBD backend is started and
stopped as QEMU backend. This commit adds new device kind VINPUT to be
used as backend type for user space PV KBD backend.

Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl_types_internal.idl |  1 +
 tools/libxl/libxl_vkb.c              | 29 ++++++++++++++++++----------
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/tools/libxl/libxl_types_internal.idl b/tools/libxl/libxl_types_internal.idl
index cb85c3b37f..3593e21dbb 100644
--- a/tools/libxl/libxl_types_internal.idl
+++ b/tools/libxl/libxl_types_internal.idl
@@ -31,6 +31,7 @@ libxl__device_kind = Enumeration("device_kind", [
     (13, "VUART"),
     (14, "PVCALLS"),
     (15, "VSND"),
+    (16, "VINPUT"),
     ])
 
 libxl__console_backend = Enumeration("console_backend", [
diff --git a/tools/libxl/libxl_vkb.c b/tools/libxl/libxl_vkb.c
index 26376a7eef..4c44a813c1 100644
--- a/tools/libxl/libxl_vkb.c
+++ b/tools/libxl/libxl_vkb.c
@@ -38,9 +38,6 @@ static int libxl__set_xenstore_vkb(libxl__gc *gc, uint32_t domid,
                                    flexarray_t *back, flexarray_t *front,
                                    flexarray_t *ro_front)
 {
-    flexarray_append_pair(back, "backend-type",
-                          (char *)libxl_vkb_backend_to_string(vkb->backend_type));
-
     if (vkb->unique_id) {
         flexarray_append_pair(back, XENKBD_FIELD_UNIQUE_ID, vkb->unique_id);
     }
@@ -93,7 +90,8 @@ static int libxl__vkb_from_xenstore(libxl__gc *gc, const char *libxl_path,
                                     libxl_devid devid,
                                     libxl_device_vkb *vkb)
 {
-    const char *be_path, *be_type, *fe_path, *tmp;
+    const char *be_path, *fe_path, *tmp;
+    libxl__device dev;
     int rc;
 
     vkb->devid = devid;
@@ -111,13 +109,11 @@ static int libxl__vkb_from_xenstore(libxl__gc *gc, const char *libxl_path,
     rc = libxl__backendpath_parse_domid(gc, be_path, &vkb->backend_domid);
     if (rc) goto out;
 
-    rc = libxl__xs_read_mandatory(gc, XBT_NULL,
-                                  GCSPRINTF("%s/backend-type", be_path),
-                                  &be_type);
+    rc = libxl__parse_backend_path(gc, be_path, &dev);
     if (rc) goto out;
 
-    rc = libxl_vkb_backend_from_string(be_type, &vkb->backend_type);
-    if (rc) goto out;
+    vkb->backend_type = dev.backend_kind == LIBXL__DEVICE_KIND_VINPUT ?
+                                            LIBXL_VKB_BACKEND_LINUX : LIBXL_VKB_BACKEND_QEMU;
 
     vkb->unique_id = xs_read(CTX->xsh, XBT_NULL, GCSPRINTF("%s/"XENKBD_FIELD_UNIQUE_ID, be_path), NULL);
 
@@ -218,6 +214,20 @@ out:
     return rc;
 }
 
+static int libxl__device_from_vkb(libxl__gc *gc, uint32_t domid,
+                                  libxl_device_vkb *type, libxl__device *device)
+{
+    device->backend_devid   = type->devid;
+    device->backend_domid   = type->backend_domid;
+    device->backend_kind    = type->backend_type == LIBXL_VKB_BACKEND_LINUX ?
+                              LIBXL__DEVICE_KIND_VINPUT : LIBXL__DEVICE_KIND_VKBD;
+    device->devid           = type->devid;
+    device->domid           = domid;
+    device->kind            = LIBXL__DEVICE_KIND_VKBD;
+
+    return 0;
+}
+
 int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb,
                          const libxl_asyncop_how *ao_how)
 {
@@ -318,7 +328,6 @@ out:
      return rc;
 }
 
-static LIBXL_DEFINE_DEVICE_FROM_TYPE(vkb)
 static LIBXL_DEFINE_UPDATE_DEVID(vkb)
 
 #define libxl__add_vkbs NULL
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv"
  2019-11-21 18:12 [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy Oleksandr Grytsov
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT Oleksandr Grytsov
@ 2019-11-21 18:12 ` Oleksandr Grytsov
  2019-11-22 11:14   ` Ian Jackson
  2019-11-21 18:13 ` [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices Oleksandr Grytsov
  2019-11-22 11:23 ` [Xen-devel] [PATCH for-4.13 v2 0/3] Remove backend xen store entry on domain destroy Ian Jackson
  3 siblings, 1 reply; 15+ messages in thread
From: Oleksandr Grytsov @ 2019-11-21 18:12 UTC (permalink / raw)
  To: xen-devel; +Cc: anthony.perard, Oleksandr Grytsov, ian.jackson, wl

From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

There are two kind of VKB backends: QEMU and user space PV backend.
For PV backend "linux" enum is used but this name is confused. Rename
"linux" enum to "pv" as it better matches user space PV backend.

Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
---
 docs/man/xl.cfg.5.pod.in    | 4 ++--
 tools/libxl/libxl_types.idl | 2 +-
 tools/libxl/libxl_vkb.c     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in
index 245d3f9472..37bdc595d3 100644
--- a/docs/man/xl.cfg.5.pod.in
+++ b/docs/man/xl.cfg.5.pod.in
@@ -1562,8 +1562,8 @@ Specifies the backend domain name or id.
 
 =item B<backend-type=type>
 
-Specifies the backend type: qemu - for QEMU backend or linux - for Linux PV
-domain.
+Specifies the backend type: qemu - for QEMU backend or pv - for PV
+backend.
 
 =item B<feature-disable-keyboard=BOOLEAN>
 
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 0546d7865a..751dad8870 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -260,7 +260,7 @@ libxl_vuart_type = Enumeration("vuart_type", [
 libxl_vkb_backend = Enumeration("vkb_backend", [
     (0, "UNKNOWN"),
     (1, "QEMU"),
-    (2, "LINUX")
+    (2, "PV")
     ])
 
 libxl_passthrough = Enumeration("passthrough", [
diff --git a/tools/libxl/libxl_vkb.c b/tools/libxl/libxl_vkb.c
index 4c44a813c1..5f018f55b7 100644
--- a/tools/libxl/libxl_vkb.c
+++ b/tools/libxl/libxl_vkb.c
@@ -113,7 +113,7 @@ static int libxl__vkb_from_xenstore(libxl__gc *gc, const char *libxl_path,
     if (rc) goto out;
 
     vkb->backend_type = dev.backend_kind == LIBXL__DEVICE_KIND_VINPUT ?
-                                            LIBXL_VKB_BACKEND_LINUX : LIBXL_VKB_BACKEND_QEMU;
+                                            LIBXL_VKB_BACKEND_PV : LIBXL_VKB_BACKEND_QEMU;
 
     vkb->unique_id = xs_read(CTX->xsh, XBT_NULL, GCSPRINTF("%s/"XENKBD_FIELD_UNIQUE_ID, be_path), NULL);
 
@@ -219,7 +219,7 @@ static int libxl__device_from_vkb(libxl__gc *gc, uint32_t domid,
 {
     device->backend_devid   = type->devid;
     device->backend_domid   = type->backend_domid;
-    device->backend_kind    = type->backend_type == LIBXL_VKB_BACKEND_LINUX ?
+    device->backend_kind    = type->backend_type == LIBXL_VKB_BACKEND_PV ?
                               LIBXL__DEVICE_KIND_VINPUT : LIBXL__DEVICE_KIND_VKBD;
     device->devid           = type->devid;
     device->domid           = domid;
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices
  2019-11-21 18:12 [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy Oleksandr Grytsov
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT Oleksandr Grytsov
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv" Oleksandr Grytsov
@ 2019-11-21 18:13 ` Oleksandr Grytsov
  2019-11-22 11:16   ` Ian Jackson
  2019-11-22 12:01   ` Wei Liu
  2019-11-22 11:23 ` [Xen-devel] [PATCH for-4.13 v2 0/3] Remove backend xen store entry on domain destroy Ian Jackson
  3 siblings, 2 replies; 15+ messages in thread
From: Oleksandr Grytsov @ 2019-11-21 18:13 UTC (permalink / raw)
  To: xen-devel; +Cc: anthony.perard, Oleksandr Grytsov, ian.jackson, wl

From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

Adding/removing device is handled for specific devices only: VBD, VIF,
QDISK. This commit adds default case to handle adding/removing for all PV
devices by default, except QDISK device, which requires special handling.
If any other device is required a special handling it should be done by
implementing separate case (similar to QDISK device). The default
behaviour for adding device is to wait when the backend goes to
XenbusStateInitWait and the default behaviour on removing device is to
start generic device remove procedure.

Also this commit fixes removing guest function: before the guest was
removed when all VIF and VBD devices are removed. The fix removes
guest when all created devices are removed. This is done by checking the
guest device list instead of checking num_vifs and num_vbds. num_vifs and
num_vbds variables are removed as redundant in this case.

Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
---
 tools/libxl/libxl_device.c | 63 +++++++++++++++-----------------------
 1 file changed, 24 insertions(+), 39 deletions(-)

diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 1402b61a81..9d05d2fd13 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -1477,7 +1477,7 @@ typedef struct libxl__ddomain_device {
  */
 typedef struct libxl__ddomain_guest {
     uint32_t domid;
-    int num_vifs, num_vbds, num_qdisks;
+    int num_qdisks;
     LIBXL_SLIST_HEAD(, struct libxl__ddomain_device) devices;
     LIBXL_SLIST_ENTRY(struct libxl__ddomain_guest) next;
 } libxl__ddomain_guest;
@@ -1530,8 +1530,7 @@ static void check_and_maybe_remove_guest(libxl__gc *gc,
 {
     assert(ddomain);
 
-    if (dguest != NULL &&
-        dguest->num_vifs + dguest->num_vbds + dguest->num_qdisks == 0) {
+    if (dguest != NULL && LIBXL_SLIST_FIRST(&dguest->devices) == NULL) {
         LIBXL_SLIST_REMOVE(&ddomain->guests, dguest, libxl__ddomain_guest,
                            next);
         LOGD(DEBUG, dguest->domid, "Removed domain from the list of active guests");
@@ -1571,24 +1570,6 @@ static int add_device(libxl__egc *egc, libxl__ao *ao,
          libxl__device_backend_path(gc, dev));
 
     switch(dev->backend_kind) {
-    case LIBXL__DEVICE_KIND_VBD:
-    case LIBXL__DEVICE_KIND_VIF:
-        if (dev->backend_kind == LIBXL__DEVICE_KIND_VBD) dguest->num_vbds++;
-        if (dev->backend_kind == LIBXL__DEVICE_KIND_VIF) dguest->num_vifs++;
-
-        GCNEW(aodev);
-        libxl__prepare_ao_device(ao, aodev);
-        /*
-         * Clone the libxl__device to avoid races if remove_device is called
-         * before the device addition has finished.
-         */
-        GCNEW(aodev->dev);
-        *aodev->dev = *dev;
-        aodev->action = LIBXL__DEVICE_ACTION_ADD;
-        aodev->callback = device_complete;
-        libxl__wait_device_connection(egc, aodev);
-
-        break;
     case LIBXL__DEVICE_KIND_QDISK:
         if (dguest->num_qdisks == 0) {
             GCNEW(dmss);
@@ -1599,10 +1580,19 @@ static int add_device(libxl__egc *egc, libxl__ao *ao,
             libxl__spawn_qdisk_backend(egc, dmss);
         }
         dguest->num_qdisks++;
-
         break;
     default:
-        rc = 1;
+        GCNEW(aodev);
+        libxl__prepare_ao_device(ao, aodev);
+        /*
+         * Clone the libxl__device to avoid races if remove_device is called
+         * before the device addition has finished.
+         */
+        GCNEW(aodev->dev);
+        *aodev->dev = *dev;
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;
+        aodev->callback = device_complete;
+        libxl__wait_device_connection(egc, aodev);
         break;
     }
 
@@ -1619,11 +1609,17 @@ static int remove_device(libxl__egc *egc, libxl__ao *ao,
     int rc = 0;
 
     switch(ddev->dev->backend_kind) {
-    case LIBXL__DEVICE_KIND_VBD:
-    case LIBXL__DEVICE_KIND_VIF:
-        if (dev->backend_kind == LIBXL__DEVICE_KIND_VBD) dguest->num_vbds--;
-        if (dev->backend_kind == LIBXL__DEVICE_KIND_VIF) dguest->num_vifs--;
-
+    case LIBXL__DEVICE_KIND_QDISK:
+        if (--dguest->num_qdisks == 0) {
+            rc = libxl__destroy_qdisk_backend(gc, dev->domid);
+            if (rc)
+                goto out;
+        }
+        libxl__device_destroy(gc, dev);
+        /* Return > 0, no ao has been dispatched */
+        rc = 1;
+        break;
+    default:
         GCNEW(aodev);
         libxl__prepare_ao_device(ao, aodev);
         /*
@@ -1636,17 +1632,6 @@ static int remove_device(libxl__egc *egc, libxl__ao *ao,
         aodev->callback = device_complete;
         libxl__initiate_device_generic_remove(egc, aodev);
         break;
-    case LIBXL__DEVICE_KIND_QDISK:
-        if (--dguest->num_qdisks == 0) {
-            rc = libxl__destroy_qdisk_backend(gc, dev->domid);
-            if (rc)
-                goto out;
-        }
-        libxl__device_destroy(gc, dev);
-        /* Fall through to return > 0, no ao has been dispatched */
-    default:
-        rc = 1;
-        break;
     }
 
     /*
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv"
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv" Oleksandr Grytsov
@ 2019-11-22 11:14   ` Ian Jackson
  2019-11-22 11:56     ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Jackson @ 2019-11-22 11:14 UTC (permalink / raw)
  To: Oleksandr Grytsov; +Cc: Anthony Perard, xen-devel, Oleksandr Grytsov, wl

Oleksandr Grytsov writes ("[PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv""):
> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> There are two kind of VKB backends: QEMU and user space PV backend.
> For PV backend "linux" enum is used but this name is confused. Rename
> "linux" enum to "pv" as it better matches user space PV backend.
> 
> Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

Requested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks.

Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices
  2019-11-21 18:13 ` [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices Oleksandr Grytsov
@ 2019-11-22 11:16   ` Ian Jackson
  2019-11-22 12:01   ` Wei Liu
  1 sibling, 0 replies; 15+ messages in thread
From: Ian Jackson @ 2019-11-22 11:16 UTC (permalink / raw)
  To: Oleksandr Grytsov; +Cc: Anthony Perard, xen-devel, Oleksandr Grytsov, wl

Oleksandr Grytsov writes ("[PATCH v2 3/3] libxl: make default path to add/remove all PV devices"):
> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> Adding/removing device is handled for specific devices only: VBD, VIF,
> QDISK. This commit adds default case to handle adding/removing for all PV
> devices by default, except QDISK device, which requires special handling.
> If any other device is required a special handling it should be done by
> implementing separate case (similar to QDISK device). The default
> behaviour for adding device is to wait when the backend goes to
> XenbusStateInitWait and the default behaviour on removing device is to
> start generic device remove procedure.
> 
> Also this commit fixes removing guest function: before the guest was
> removed when all VIF and VBD devices are removed. The fix removes
> guest when all created devices are removed. This is done by checking the
> guest device list instead of checking num_vifs and num_vbds. num_vifs and
> num_vbds variables are removed as redundant in this case.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH for-4.13 v2 0/3] Remove backend xen store entry on domain destroy
  2019-11-21 18:12 [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy Oleksandr Grytsov
                   ` (2 preceding siblings ...)
  2019-11-21 18:13 ` [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices Oleksandr Grytsov
@ 2019-11-22 11:23 ` Ian Jackson
  3 siblings, 0 replies; 15+ messages in thread
From: Ian Jackson @ 2019-11-22 11:23 UTC (permalink / raw)
  To: Oleksandr Grytsov, Juergen Gross
  Cc: Anthony Perard, xen-devel, Oleksandr Grytsov, wl

Oleksandr Grytsov writes ("[PATCH v2 0/3] Remove backend xen store entry on domain destroy"):
> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> Changes since v1:
> 
> * add commit to rename VKB backend type "linux" to "pv";
> * add default case to handle adding/removing PV devices in add_device,
>   remove_device functions (libxl_device.c);
> * add comment about removing num_vifs, num_vbds into commit message.

Thank you for this.  As you see, I approve.  We need an ack from the
Release Manager, so I have addresed Juergen (and also added the
missing `for-4.13' tag to the subject).

Given where we are in the release cycle with this (which I stress is
not really Oleksandr's fault) I think I would like to get a 2nd review
from another libxl maintainer.  Anthony, or Wei, would you like to
take a look ?

Thanks,
Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv"
  2019-11-22 11:14   ` Ian Jackson
@ 2019-11-22 11:56     ` Wei Liu
  2019-11-22 14:37       ` Ian Jackson
  0 siblings, 1 reply; 15+ messages in thread
From: Wei Liu @ 2019-11-22 11:56 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Anthony Perard, xen-devel, Oleksandr Grytsov, Oleksandr Grytsov, wl

On Fri, Nov 22, 2019 at 11:14:41AM +0000, Ian Jackson wrote:
> Oleksandr Grytsov writes ("[PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv""):
> > From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> > 
> > There are two kind of VKB backends: QEMU and user space PV backend.
> > For PV backend "linux" enum is used but this name is confused. Rename
> > "linux" enum to "pv" as it better matches user space PV backend.
> > 
> > Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> Requested-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

The LINUX type was introduced back in 2018.

This patch should have provided at least a

  #define ...LINUX ...PV

in libxl.h for backward compatibility purpose.

Wei.


> 
> Thanks.
> 
> Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices
  2019-11-21 18:13 ` [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices Oleksandr Grytsov
  2019-11-22 11:16   ` Ian Jackson
@ 2019-11-22 12:01   ` Wei Liu
  1 sibling, 0 replies; 15+ messages in thread
From: Wei Liu @ 2019-11-22 12:01 UTC (permalink / raw)
  To: Oleksandr Grytsov
  Cc: anthony.perard, xen-devel, ian.jackson, Oleksandr Grytsov, wl

On Thu, Nov 21, 2019 at 08:13:00PM +0200, Oleksandr Grytsov wrote:
> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> Adding/removing device is handled for specific devices only: VBD, VIF,
> QDISK. This commit adds default case to handle adding/removing for all PV
> devices by default, except QDISK device, which requires special handling.
> If any other device is required a special handling it should be done by
> implementing separate case (similar to QDISK device). The default
> behaviour for adding device is to wait when the backend goes to
> XenbusStateInitWait and the default behaviour on removing device is to
> start generic device remove procedure.
> 
> Also this commit fixes removing guest function: before the guest was
> removed when all VIF and VBD devices are removed. The fix removes
> guest when all created devices are removed. This is done by checking the
> guest device list instead of checking num_vifs and num_vbds. num_vifs and
> num_vbds variables are removed as redundant in this case.
> 
> Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

I agree with this approach in general, but I haven't looked closely into
the implementation. FWIW:

Acked-by: Wei Liu <wl@xen.org>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv"
  2019-11-22 11:56     ` Wei Liu
@ 2019-11-22 14:37       ` Ian Jackson
  0 siblings, 0 replies; 15+ messages in thread
From: Ian Jackson @ 2019-11-22 14:37 UTC (permalink / raw)
  To: Wei Liu, Juergen Gross
  Cc: Anthony Perard, xen-devel, Oleksandr Grytsov, Oleksandr Grytsov

Wei Liu writes ("Re: [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv""):
> The LINUX type was introduced back in 2018.

Oh.  Yes.  I used a wrong git-describe rune to try to find out where
it had been introduced.  The answer in fact is that it was in
4.12.0-rc1.  Thanks for pointing this out.

Thanks also for the 2nd pair of eyes on
 [PATCH v2 3/3] libxl: make default path to add/remove all PV devices

> This patch should have provided at least a
>   #define ...LINUX ...PV
> in libxl.h for backward compatibility purpose.

Under the circumstances, given that I suggested the rename during the
4.13 freeze, and the (IMO wrong) name was shipped in 4.12, it seems
that we should drop this patch for 4.13.  This is something that
perhaps we should think about for the future but if it's been released
already the cost of messing about with the name is sharply larger, and
it may not be worth it at all.  Sorry for messing you about more,
Oleksandr.

The other two patches 1/ and 3/ apply and work just fine without this
middle one, so I don't think we need a resend.

I'm still hoping for a 2nd pair of eyes on
 [PATCH v2 1/3] libxl: introduce new backend type VINPUT

and a release ack for both 1/3 and 3/3.

Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-21 18:12 ` [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT Oleksandr Grytsov
@ 2019-11-22 15:18   ` Anthony PERARD
  2019-11-22 15:43     ` Jürgen Groß
  0 siblings, 1 reply; 15+ messages in thread
From: Anthony PERARD @ 2019-11-22 15:18 UTC (permalink / raw)
  To: Oleksandr Grytsov; +Cc: xen-devel, ian.jackson, Oleksandr Grytsov, wl

On Thu, Nov 21, 2019 at 08:12:58PM +0200, Oleksandr Grytsov wrote:
> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> 
> There are two kind of VKBD devices: with QEMU backend and user space PV
> backend. In current implementation they can't be distinguished as both use
> VKBD backend type. As result, user space PV KBD backend is started and
> stopped as QEMU backend. This commit adds new device kind VINPUT to be
> used as backend type for user space PV KBD backend.
> 
> Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

That patch removes the "backend-type" node from xenstore but it wasn't
part of the api (kbdif.h) and qemu doesn't read, it so I guess that's
fine:

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-22 15:18   ` Anthony PERARD
@ 2019-11-22 15:43     ` Jürgen Groß
  2019-11-22 16:44       ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Jürgen Groß @ 2019-11-22 15:43 UTC (permalink / raw)
  To: Anthony PERARD, Oleksandr Grytsov
  Cc: xen-devel, ian.jackson, wl, Oleksandr Grytsov

On 22.11.19 16:18, Anthony PERARD wrote:
> On Thu, Nov 21, 2019 at 08:12:58PM +0200, Oleksandr Grytsov wrote:
>> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
>>
>> There are two kind of VKBD devices: with QEMU backend and user space PV
>> backend. In current implementation they can't be distinguished as both use
>> VKBD backend type. As result, user space PV KBD backend is started and
>> stopped as QEMU backend. This commit adds new device kind VINPUT to be
>> used as backend type for user space PV KBD backend.
>>
>> Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
>> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> That patch removes the "backend-type" node from xenstore but it wasn't
> part of the api (kbdif.h) and qemu doesn't read, it so I guess that's
> fine:
> 
> Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-22 15:43     ` Jürgen Groß
@ 2019-11-22 16:44       ` Wei Liu
  2019-11-22 18:08         ` Ian Jackson
  0 siblings, 1 reply; 15+ messages in thread
From: Wei Liu @ 2019-11-22 16:44 UTC (permalink / raw)
  To: Jürgen Groß
  Cc: wl, ian.jackson, Oleksandr Grytsov, Oleksandr Grytsov,
	Anthony PERARD, xen-devel

On Fri, Nov 22, 2019 at 04:43:03PM +0100, Jürgen Groß wrote:
> On 22.11.19 16:18, Anthony PERARD wrote:
> > On Thu, Nov 21, 2019 at 08:12:58PM +0200, Oleksandr Grytsov wrote:
> > > From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> > > 
> > > There are two kind of VKBD devices: with QEMU backend and user space PV
> > > backend. In current implementation they can't be distinguished as both use
> > > VKBD backend type. As result, user space PV KBD backend is started and
> > > stopped as QEMU backend. This commit adds new device kind VINPUT to be
> > > used as backend type for user space PV KBD backend.
> > > 
> > > Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
> > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > 
> > That patch removes the "backend-type" node from xenstore but it wasn't
> > part of the api (kbdif.h) and qemu doesn't read, it so I guess that's
> > fine:
> > 
> > Acked-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Release-acked-by: Juergen Gross <jgross@suse.com>

I take it this applies to both patch 1 and 3?

Wei.

> 
> 
> Juergen

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-22 16:44       ` Wei Liu
@ 2019-11-22 18:08         ` Ian Jackson
  2019-11-25 11:01           ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Jackson @ 2019-11-22 18:08 UTC (permalink / raw)
  To: Jürgen Groß
  Cc: Wei Liu, Oleksandr Grytsov, Oleksandr Grytsov, Ian Jackson,
	Anthony Perard, xen-devel

Wei Liu writes ("Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT"):
> On Fri, Nov 22, 2019 at 04:43:03PM +0100, Jürgen Groß wrote:
> > Release-acked-by: Juergen Gross <jgross@suse.com>
> 
> I take it this applies to both patch 1 and 3?

In the absence of a reply to the contrary by 21:00 UTC today, I will
assume this to be the case and push this to staging.  I hope that
meets with everyone's approval.

Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT
  2019-11-22 18:08         ` Ian Jackson
@ 2019-11-25 11:01           ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2019-11-25 11:01 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Jürgen Groß,
	Wei Liu, Oleksandr Grytsov, Oleksandr Grytsov, Anthony Perard,
	xen-devel

On Fri, Nov 22, 2019 at 06:08:13PM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT"):
> > On Fri, Nov 22, 2019 at 04:43:03PM +0100, Jürgen Groß wrote:
> > > Release-acked-by: Juergen Gross <jgross@suse.com>
> > 
> > I take it this applies to both patch 1 and 3?
> 
> In the absence of a reply to the contrary by 21:00 UTC today, I will
> assume this to be the case and push this to staging.  I hope that
> meets with everyone's approval.

Got confirmation from Juergen on IRC, so I have just pushed patch 1 and
3.

Wei.

> 
> Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-11-25 11:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 18:12 [Xen-devel] [PATCH v2 0/3] Remove backend xen store entry on domain destroy Oleksandr Grytsov
2019-11-21 18:12 ` [Xen-devel] [PATCH v2 1/3] libxl: introduce new backend type VINPUT Oleksandr Grytsov
2019-11-22 15:18   ` Anthony PERARD
2019-11-22 15:43     ` Jürgen Groß
2019-11-22 16:44       ` Wei Liu
2019-11-22 18:08         ` Ian Jackson
2019-11-25 11:01           ` Wei Liu
2019-11-21 18:12 ` [Xen-devel] [PATCH v2 2/3] libxl: rename VKB backend type "linux" to "pv" Oleksandr Grytsov
2019-11-22 11:14   ` Ian Jackson
2019-11-22 11:56     ` Wei Liu
2019-11-22 14:37       ` Ian Jackson
2019-11-21 18:13 ` [Xen-devel] [PATCH v2 3/3] libxl: make default path to add/remove all PV devices Oleksandr Grytsov
2019-11-22 11:16   ` Ian Jackson
2019-11-22 12:01   ` Wei Liu
2019-11-22 11:23 ` [Xen-devel] [PATCH for-4.13 v2 0/3] Remove backend xen store entry on domain destroy Ian Jackson

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.