The libxl_virtio file works for only PV devices and the nodes under the
frontend path are not used by anyone. Remove them.
While at it, also add a comment to the file describing what devices this
file is used for.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
V2: New patch.
tools/libs/light/libxl_virtio.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/libs/light/libxl_virtio.c b/tools/libs/light/libxl_virtio.c
index faada49e184e..eadcb7124c3f 100644
--- a/tools/libs/light/libxl_virtio.c
+++ b/tools/libs/light/libxl_virtio.c
@@ -10,6 +10,9 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
+ *
+ * This is used for PV (paravirtualized) devices only and the frontend isn't
+ * aware of the xenstore.
*/
#include "libxl_internal.h"
@@ -49,11 +52,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;
}
--
2.31.1.272.g89b43f80a514
For generic virtio devices, where we don't need to add compatible or
other special DT properties, the type field is set to "virtio,device".
But this misses the case where the user sets the type with a valid
virtio device id as well, like "virtio,device1a" for file system device.
The complete list of virtio device ids is mentioned here:
https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x…
Update documentation to support that as well.
Fixes: dd54ea500be8 ("docs: add documentation for generic virtio devices")
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko(a)epam.com>
---
V2->V3:
- Updated commit log and clarified / fixed doc.
- Tag from Oleksandr.
docs/man/xl.cfg.5.pod.in | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in
index 10f37990be57..24ac92718288 100644
--- a/docs/man/xl.cfg.5.pod.in
+++ b/docs/man/xl.cfg.5.pod.in
@@ -1608,8 +1608,11 @@ example, "type=virtio,device22" for the I2C device, whose device-tree binding is
L<https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-virtio…>
-For generic virtio devices, where we don't need to set special or compatible
-properties in the Device Tree, the type field must be set to "virtio,device".
+For other generic virtio devices, where we don't need to set special or
+compatible properties in the Device Tree, the type field must be set to
+"virtio,device" or "virtio,device<N>", where "N" is the virtio device id in
+hexadecimal format, without the "0x" prefix and all in lower case, like
+"virtio,device1a" for the file system device.
=item B<transport=STRING>
--
2.31.1.272.g89b43f80a514