diff mbox series

[V3,1/3] libxl: virtio: Remove unused frontend nodes

Message ID fef3d3ca5b2c78eaf85e907f03561e82a05fdeb6.1685684586.git.viresh.kumar@linaro.org (mailing list archive)
State New, archived
Headers show
Series libxl: Make grants configurable for virtio devices | expand

Commit Message

Viresh Kumar June 2, 2023, 5:49 a.m. UTC
Only the VirtIO backend will watch xenstore to find out when a new
instance needs to be created for a guest, and read the parameters from
there. VirtIO frontend are only virtio, so they will not do anything
with the xenstore nodes. They can be removed.

While at it, also add a comment to the libxl_virtio.c file.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 tools/libs/light/libxl_virtio.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Anthony PERARD June 12, 2023, 2:04 p.m. UTC | #1
On Fri, Jun 02, 2023 at 11:19:07AM +0530, Viresh Kumar wrote:
> Only the VirtIO backend will watch xenstore to find out when a new
> instance needs to be created for a guest, and read the parameters from
> there. VirtIO frontend are only virtio, so they will not do anything
> with the xenstore nodes. They can be removed.
> 
> While at it, also add a comment to the libxl_virtio.c file.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

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

Thanks,
diff mbox series

Patch

diff --git a/tools/libs/light/libxl_virtio.c b/tools/libs/light/libxl_virtio.c
index faada49e184e..f8a78e22d156 100644
--- a/tools/libs/light/libxl_virtio.c
+++ b/tools/libs/light/libxl_virtio.c
@@ -1,4 +1,9 @@ 
 /*
+ * Setup VirtIO backend. This is intended to interact with a VirtIO
+ * backend that is watching xenstore, and create new VirtIO devices
+ * with the parameter found in xenstore (VirtIO frontend don't
+ * interact with xenstore.)
+ *
  * Copyright (C) 2022 Linaro Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -49,11 +54,6 @@  static int libxl__set_xenstore_virtio(libxl__gc *gc, uint32_t domid,
     flexarray_append_pair(back, "type", GCSPRINTF("%s", virtio->type));
     flexarray_append_pair(back, "transport", GCSPRINTF("%s", transport));
 
-    flexarray_append_pair(front, "irq", GCSPRINTF("%u", virtio->irq));
-    flexarray_append_pair(front, "base", GCSPRINTF("%#"PRIx64, virtio->base));
-    flexarray_append_pair(front, "type", GCSPRINTF("%s", virtio->type));
-    flexarray_append_pair(front, "transport", GCSPRINTF("%s", transport));
-
     return 0;
 }