Re: [PATCH v5 5/6] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-10-19 Thread Viresh Kumar
On 19-10-23, 10:56, Alex Bennée wrote: > From: Manos Pitsidianakis > > Tested with rust-vmm vhost-user-sound daemon: > > RUST_LOG=trace cargo run --bin vhost-user-sound -- --socket /tmp/snd.sock > --backend null > > Invocation: > > qemu-system-x86_64 \ > -qmp

Re: [PATCH] vhost-user: Fix protocol feature bit conflict

2023-10-17 Thread Viresh Kumar
On 17-10-23, 10:14, Hanna Czenczek wrote: > On 17.10.23 09:53, Viresh Kumar wrote: > > On 17-10-23, 09:51, Hanna Czenczek wrote: > > > Not that I’m really opposed to that, but I don’t see the problem with just > > > doing that in the same work that makes qemu actually us

Re: [PATCH] vhost-user: Fix protocol feature bit conflict

2023-10-17 Thread Viresh Kumar
On 17-10-23, 09:51, Hanna Czenczek wrote: > Not that I’m really opposed to that, but I don’t see the problem with just > doing that in the same work that makes qemu actually use this flag, exactly > because it’s just a -1/+1 change. > > I can send a v2, but should I do the same for libvhost-user

Re: [Virtio-fs] (no subject)

2023-10-17 Thread Viresh Kumar
On 13-10-23, 20:02, Hanna Czenczek wrote: > On 10.10.23 16:35, Alex Bennée wrote: > > I was going to say there is also the rust-vmm vhost-user-master crates > > which we've imported: > > > >https://github.com/vireshk/vhost > > > > for the Xen Vhost Frontend: > > > >

Re: [PATCH] vhost-user: Fix protocol feature bit conflict

2023-10-16 Thread Viresh Kumar
On 16-10-23, 12:40, Alex Bennée wrote: > > Viresh Kumar writes: > > > On 16-10-23, 11:45, Manos Pitsidianakis wrote: > >> On Mon, 16 Oct 2023 11:32, Hanna Czenczek wrote: > >> > diff --git a/include/hw/virtio/vhost-user.h > >> > b/includ

Re: [PATCH] vhost-user: Fix protocol feature bit conflict

2023-10-16 Thread Viresh Kumar
nstead of > a comment mention? Perhaps because we will never use it from Qemu code ? Anyway: Reviewed-by: Viresh Kumar -- viresh

Re: [PATCH v4 4/6] hw/virtio: derive vhost-user-i2c from vhost-user-base

2023-10-09 Thread Viresh Kumar
ludes > v4 > - use vqsize > --- > include/hw/virtio/vhost-user-i2c.h | 14 +- > hw/virtio/vhost-user-i2c.c | 272 ++--- > hw/virtio/meson.build | 5 +- > 3 files changed, 23 insertions(+), 268 deletions(-) Acked-by: Viresh Kumar -- viresh

Re: [PATCH v4 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-10-09 Thread Viresh Kumar
t; - update includes > --- > include/hw/virtio/vhost-user-gpio.h | 23 +- > hw/virtio/vhost-user-gpio.c | 407 ++-- > hw/virtio/meson.build | 5 +- > 3 files changed, 22 insertions(+), 413 deletions(-) Looks nice. Thanks. Acked-by: Viresh Kumar -- viresh

Re: [PATCH RESEND v5 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-09-27 Thread Viresh Kumar
> Add support for introspection on vhost-user-gpio devices. > > Signed-off-by: Jonah Palmer > Reviewed-by: Emmanouil Pitsidianakis > --- > hw/virtio/vhost-user-gpio.c | 7 +++ Acked-by: Viresh Kumar -- viresh

[PATCH V2] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-04-17 Thread Viresh Kumar
Since the driver doesn't support interrupts, we must return early when index is set to VIRTIO_CONFIG_IRQ_IDX. Fixes: 544f0278afca ("virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX") Signed-off-by: Viresh Kumar --- V2: Simplify and fix comments. hw/virtio/vhost-user-i2c.c | 16 +

Re: [PATCH] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-04-17 Thread Viresh Kumar
On 17-04-23, 09:36, Philippe Mathieu-Daudé wrote: > On 17/4/23 08:02, Viresh Kumar wrote: > > Since the driver doesn't support interrupts, we must return early when > > index is set to VIRTIO_CONFIG_IRQ_IDX. > > > > Fixes: 544f0278afca ("virtio: introduce macro VI

[PATCH] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-04-17 Thread Viresh Kumar
Since the driver doesn't support interrupts, we must return early when index is set to VIRTIO_CONFIG_IRQ_IDX. Fixes: 544f0278afca ("virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX") Signed-off-by: Viresh Kumar --- hw/virtio/vhost-user-i2c.c | 20 1 file changed, 20

Re: [PATCH 00/12] virtio: add vhost-user-generic and reduce copy and paste

2023-04-16 Thread Viresh Kumar
On 14-04-23, 17:04, Alex Bennée wrote: > hw/virtio/vhost-user-device-pci.c | 71 + > hw/virtio/vhost-user-device.c | 359 ++ > hw/virtio/vhost-user-fs.c | 4 +- > hw/virtio/vhost-user-gpio.c| 405 + >

Re: [PATCH V3 0/2] qemu: vhost-user: Support Xen memory mapping quirks

2023-04-05 Thread Viresh Kumar
On 09-03-23, 14:20, Viresh Kumar wrote: > Hello, > > This patchset tries to update the vhost-user protocol to make it support > special > memory mapping required in case of Xen hypervisor. > > The first patch is mostly cleanup and second one introduces a new xen specif

Re: [PATCH V3 0/2] qemu: vhost-user: Support Xen memory mapping quirks

2023-03-14 Thread Viresh Kumar
On 09-03-23, 14:20, Viresh Kumar wrote: > Hello, > > This patchset tries to update the vhost-user protocol to make it support > special > memory mapping required in case of Xen hypervisor. > > The first patch is mostly cleanup and second one introduces a new xen specific &

[PATCH V3 1/2] docs: vhost-user: Define memory region separately

2023-03-09 Thread Viresh Kumar
t; to "multiple memory regions description", to avoid potential confusion around similar names. And define single region before multiple ones. This is just a documentation optimization, the protocol remains the same. Signed-off-by: Viresh Kumar --- docs/interop/vhost-user.rst | 39 +

[PATCH V3 2/2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-09 Thread Viresh Kumar
themselves. Signed-off-by: Viresh Kumar --- docs/interop/vhost-user.rst | 21 + 1 file changed, 21 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 1720d681264d..5a070adbc1aa 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-09 Thread Viresh Kumar
On 07-03-23, 11:22, Stefan Hajnoczi wrote: > VHOST_USER_IOTLB_MSG probably isn't necessary because address > translation is not required. It will also reduce performance by adding > extra communication. > > Instead, you could change the 1 memory region : 1 mmap relationship that > existing

[PATCH V3 0/2] qemu: vhost-user: Support Xen memory mapping quirks

2023-03-09 Thread Viresh Kumar
define which memory regions are impacted by this change. - Allow VHOST_USER_SET_XEN_MMAP to be called multiple times. - Additional Bit(2) property in flags. Viresh Kumar (2): docs: vhost-user: Define memory region separately docs: vhost-user: Add Xen specific memory mapping support docs/i

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-06 Thread Viresh Kumar
On 06-03-23, 10:34, Stefan Hajnoczi wrote: > On Mon, Mar 06, 2023 at 04:40:24PM +0530, Viresh Kumar wrote: > > +Xen mmap description > > + > > + > > ++---+---+ > > +| flags | domid | > > ++---+---+ > > + > >

[PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-06 Thread Viresh Kumar
' message type to provide the additional information to the back-end. Signed-off-by: Viresh Kumar --- V1->V2: - Make the custom mmap feature Xen specific, instead of being generic. - Clearly define which memory regions are impacted by this change. - Allow VHOST_USER_SET_XEN_MMAP to be cal

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-03 Thread Viresh Kumar
On 01-03-23, 10:47, Stefan Hajnoczi wrote: > Resend - for some reason my email didn't make it out. How about this (will send a formal patch later). Author: Viresh Kumar Date: Tue Feb 21 14:36:30 2023 +0530 docs: vhost-user: Add Xen specific memory mapping support The current mo

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-02 Thread Viresh Kumar
On 01-03-23, 12:29, Stefan Hajnoczi wrote: > What is the advantage over defining separate messages? Separate messages > are cleaner and more typesafe. I thought we wanted to keep single message for one kind of functionality, which is mmap related quirks here. And so it would be better if we can

[RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-02-21 Thread Viresh Kumar
mapping requirements. When this feature is negotiated, the front-end can send the 'VHOST_USER_CUSTOM_MMAP' message type to provide the additional information to the back-end. Signed-off-by: Viresh Kumar --- docs/interop/vhost-user.rst | 32 1 file changed, 32

Re: [PATCH] vhost-user-gpio: Configure vhost_dev when connecting

2023-01-30 Thread Viresh Kumar
-- > include/hw/virtio/vhost-user-gpio.h | 2 +- > 2 files changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Viresh Kumar -- viresh

[PATCH V2] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-10 Thread Viresh Kumar
VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be implemented by everyone. Add its support. Reviewed-by: Alex Bennée Signed-off-by: Viresh Kumar --- V2: - Add missing VHOST_INVALID_FEATURE_BIT. - Add reviewed-by tag. hw/virtio/vhost-user-i2c.c | 11

Re: [PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-10 Thread Viresh Kumar
On 10-02-22, 08:29, Alex Bennée wrote: > > Viresh Kumar writes: > > @@ -113,8 +117,10 @@ static void vu_i2c_set_status(VirtIODevice *vdev, > > uint8_t status) > > static uint64_t vu_i2c_get_features(VirtIODevice *vdev, > > uint

Re: [PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-09 Thread Viresh Kumar
On 11-01-22, 20:28, Viresh Kumar wrote: > VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be > implemented by everyone. Add its support. > > Signed-off-by: Viresh Kumar > --- > hw/virtio/vhost-user-i2c.c | 10 -- > include/hw/virtio/

Re: [PATCH 0/2] virtio: Add vhost-user-gpio device's support

2022-01-19 Thread Viresh Kumar
On 17-01-22, 10:11, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Wed, Jan 12, 2022 at 05:04:57PM +0530, Viresh Kumar wrote: > >> Hello, > >> > >> This patchset adds vhost-user-gpio device's support in Qemu. The support >

Re: [PATCH 1/2] hw/virtio: add boilerplate for vhost-user-gpio device

2022-01-16 Thread Viresh Kumar
On 14-01-22, 14:06, Alex Bennée wrote: > > Viresh Kumar writes: > > > This creates the QEMU side of the vhost-user-gpio device which connects > > to the remote daemon. It is based of vhost-user-i2c code. > > > > Signed-off-by: Viresh Kumar > > >

[PATCH 0/2] virtio: Add vhost-user-gpio device's support

2022-01-12 Thread Viresh Kumar
Viresh Kumar (2): hw/virtio: add boilerplate for vhost-user-gpio device hw/virtio: add vhost-user-gpio-pci boilerplate hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 2 + hw/virtio/vhost-user-gpio-pci.c | 69 ++ hw/virtio/vhost-user-gpio.c

[PATCH 1/2] hw/virtio: add boilerplate for vhost-user-gpio device

2022-01-12 Thread Viresh Kumar
This creates the QEMU side of the vhost-user-gpio device which connects to the remote daemon. It is based of vhost-user-i2c code. Signed-off-by: Viresh Kumar --- hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + hw/virtio/vhost-user-gpio.c | 343

[PATCH 2/2] hw/virtio: add vhost-user-gpio-pci boilerplate

2022-01-12 Thread Viresh Kumar
This allows is to instantiate a vhost-user-gpio device as part of a PCI bus. It is mostly boilerplate which looks pretty similar to the vhost-user-fs-pci device. Signed-off-by: Viresh Kumar --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-gpio-pci.c | 69

[PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-01-11 Thread Viresh Kumar
VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be implemented by everyone. Add its support. Signed-off-by: Viresh Kumar --- hw/virtio/vhost-user-i2c.c | 10 -- include/hw/virtio/vhost-user-i2c.h | 3 +++ 2 files changed, 11 insertions(+), 2 deletions

Re: [PATCH V2 0/3] virtio: Add vhost-user-i2c device's support

2021-09-05 Thread Viresh Kumar
On 04-09-21, 15:44, Michael S. Tsirkin wrote: > So I'm not sure whether it's appropriate to merge this right now. This is already merged. > There are several spec change proposals before the virtio TC > and I did not investigate whether this code reflects the > spec before or after these

Re: [PATCH] gitignore: Update with some filetypes

2021-07-12 Thread Viresh Kumar
On 26-05-21, 13:13, Alex Bennée wrote: > > Viresh Kumar writes: > > > Update .gitignore to ignore .swp and .patch files. > > > > Signed-off-by: Viresh Kumar > > Reviewed-by: Alex Bennée No one picked it up yet, do I need to do something here ? -- viresh

[PATCH V2 2/3] hw/virtio: add vhost-user-i2c-pci boilerplate

2021-07-08 Thread Viresh Kumar
This allows is to instantiate a vhost-user-i2c device as part of a PCI bus. It is mostly boilerplate which looks pretty similar to the vhost-user-fs-pci device. Reviewed-by: Alex Bennée Signed-off-by: Viresh Kumar --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c-pci.c | 69

[PATCH V2 0/3] virtio: Add vhost-user-i2c device's support

2021-07-08 Thread Viresh Kumar
i2c-0/new_device $ cat /sys/bus/iio/devices/iio:device0/in_illuminance_raw That's it. I hope I was able to give a clear picture of my test setup here :) -- Viresh Viresh Kumar (3): hw/virtio: add boilerplate for vhost-user-i2c device hw/virtio: add vhost-user-i2c-pci boilerplate MAINTAIN

[PATCH V2 3/3] MAINTAINERS: Add entry for virtio-i2c

2021-07-08 Thread Viresh Kumar
This patch adds entry for virtio-i2c related files in MAINTAINERS. Signed-off-by: Viresh Kumar --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 684142e12eaa..2869fb185253 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2143,6 +2143,13

[PATCH V2 1/3] hw/virtio: add boilerplate for vhost-user-i2c device

2021-07-08 Thread Viresh Kumar
This creates the QEMU side of the vhost-user-i2c device which connects to the remote daemon. It is based of vhost-user-fs code. Signed-off-by: Viresh Kumar --- hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c.c | 288

Re: [RUST] Add crate for generic vhost-user-i2c backend daemon

2021-05-27 Thread Viresh Kumar
On 28-04-21, 17:52, Viresh Kumar wrote: > Hello, > > In my earlier attempt [1], I implemented the vhost-user-i2c backend > deamon for QEMU (though the code was generic enough to be used with > any hypervisor). > > And here is a Rust implementation of the vhost-user-i2c ba

Re: [PATCH] gitignore: Update with some filetypes

2021-05-26 Thread Viresh Kumar
On 24-03-21, 16:33, Viresh Kumar wrote: > Update .gitignore to ignore .swp and .patch files. > > Signed-off-by: Viresh Kumar > --- > .gitignore | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/.gitignore b/.gitignore > index 75a4be07240f..eb2553026c5

Re: [RUST] Add crate for generic vhost-user-i2c backend daemon

2021-05-21 Thread Viresh Kumar
On 28-04-21, 17:52, Viresh Kumar wrote: > Hello, > > In my earlier attempt [1], I implemented the vhost-user-i2c backend > deamon for QEMU (though the code was generic enough to be used with > any hypervisor). > > And here is a Rust implementation of the vhost-user-i2c ba

Re: [RUST] Add crate for generic vhost-user-i2c backend daemon

2021-05-19 Thread Viresh Kumar
On 20-05-21, 05:03, Trilok Soni wrote: > Thanks Viresh. > > Top posting since somehow I am not getting rust-vmm group emails on my > open-source email ID subscription. I have received Vatsa's email on the > Hypervisor crate on rust-vmm mailing list but not this one. > I am not sure you > are

Re: [RUST] Add crate for generic vhost-user-i2c backend daemon

2021-05-19 Thread Viresh Kumar
On 29-04-21, 12:39, Viresh Kumar wrote: > On 28-04-21, 17:13, Trilok Soni wrote: > > Viresh, > > > > For rust-vmm, you need to create the new issue in the right project. > > You can probably pick up vmm-reference project at rust-vmm and ask > > for the

Re: [RUST] Add crate for generic vhost-user-i2c backend daemon

2021-04-29 Thread Viresh Kumar
On 28-04-21, 17:13, Trilok Soni wrote: > Viresh, > > For rust-vmm, you need to create the new issue in the right project. > You can probably pick up vmm-reference project at rust-vmm and ask > for the new crate. Done. https://github.com/rust-vmm/vmm-reference/issues/118 > There is also

[RUST] Add crate for generic vhost-user-i2c backend daemon

2021-04-28 Thread Viresh Kumar
Hello, In my earlier attempt [1], I implemented the vhost-user-i2c backend deamon for QEMU (though the code was generic enough to be used with any hypervisor). And here is a Rust implementation of the vhost-user-i2c backend daemon. Again this is generic enough to be used with any hypervisor and

Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-05 Thread Viresh Kumar
On 01-04-21, 14:43, Alex Bennée wrote: > > +/* Parse clients [:] entries one by > > one */ > > Then this would be: > > **dev = g_strsplit(cp[i], ":", 2); There can be any number of client devices present for a bus, not just 2. -- viresh

[PATCH V2.1 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-05 Thread Viresh Kumar
This adds the vhost-user backend driver to support virtio based I2C and SMBUS devices. vhost-user-i2c --help Signed-off-by: Viresh Kumar --- V2->2.1 - Check for more smbus functionalities. - Use better glibc helpers for string parsing. - Remove code to check return value of memory allocat

Re: [PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-04 Thread Viresh Kumar
On 02-04-21, 10:55, Jie Deng wrote: > > On 2021/4/1 20:12, Viresh Kumar wrote: > > + > > +/* vhost-user-i2c definitions */ > > + > > +#define MAX_I2C_VDEV(1 << 7) > > +#define MAX_I2C_ADAPTER 16 > > Gen

[PATCH V2 6/6] MAINTAINERS: Add entry for virtio-i2c

2021-04-01 Thread Viresh Kumar
This patch adds entry for virtio-i2c related files in MAINTAINERS. Signed-off-by: Viresh Kumar --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9147e9a429a0..34e1b26c985a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2136,6 +2136,15

[PATCH V2 5/6] docs: add a man page for vhost-user-i2c

2021-04-01 Thread Viresh Kumar
Basic usage and example invocation. Signed-off-by: Viresh Kumar --- docs/tools/index.rst | 1 + docs/tools/vhost-user-i2c.rst | 75 +++ 2 files changed, 76 insertions(+) create mode 100644 docs/tools/vhost-user-i2c.rst diff --git a/docs/tools

[PATCH V2 4/6] tools/vhost-user-i2c: Add backend driver

2021-04-01 Thread Viresh Kumar
This adds the vhost-user backend driver to support virtio based I2C and SMBUS devices. vhost-user-i2c --help Signed-off-by: Viresh Kumar --- tools/meson.build| 8 + tools/vhost-user-i2c/50-qemu-i2c.json.in | 5 + tools/vhost-user-i2c/main.c | 809

[PATCH V2 2/6] hw/virtio: add boilerplate for vhost-user-i2c device

2021-04-01 Thread Viresh Kumar
This creates the QEMU side of the vhost-user-i2c device which connects to the remote daemon. It is based of vhost-user-fs code. Signed-off-by: Viresh Kumar --- hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c.c | 285

[PATCH V2 3/6] hw/virtio: add vhost-user-i2c-pci boilerplate

2021-04-01 Thread Viresh Kumar
This allows is to instantiate a vhost-user-i2c device as part of a PCI bus. It is mostly boilerplate which looks pretty similar to the vhost-user-fs-pci device. Reviewed-by: Alex Bennée Signed-off-by: Viresh Kumar --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c-pci.c | 69

[PATCH V2 1/6] !Merge: Update virtio headers from kernel

2021-04-01 Thread Viresh Kumar
DO NOT MERGE Update Linux virtio headers with help of ./scripts/update-linux-headers.sh ~/lsrc/linux.git Signed-off-by: Viresh Kumar --- include/standard-headers/linux/virtio_i2c.h | 40 + include/standard-headers/linux/virtio_ids.h | 1 + 2 files changed, 41 insertions

[PATCH V2 0/6] virtio: Implement generic vhost-user-i2c backend

2021-04-01 Thread Viresh Kumar
mporarily taken from Linux kernel. - Support SMBUS devices/busses in the backend daemon. - Fix lots of checkpatch warnings/errors. - Some other bug fixes, suggestions, etc. Viresh Kumar (6): !Merge: Update virtio headers from kernel hw/virtio: add boilerplate for vhost-user-i2c device

Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-26 Thread Viresh Kumar
On 25-03-21, 17:16, Arnd Bergmann wrote: > On Wed, Mar 24, 2021 at 8:33 AM Viresh Kumar wrote: > > +static void vi2c_handle_ctrl(VuDev *dev, int qidx) > > +{ > > +VuVirtq *vq = vu_get_queue(dev, qidx); > > +struct i2c_msg msg; > > +struct virtio_i2c_

Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-26 Thread Viresh Kumar
On 25-03-21, 17:16, Arnd Bergmann wrote: > On Wed, Mar 24, 2021 at 8:33 AM Viresh Kumar wrote: > > > +static uint8_t vi2c_xfer(VuDev *dev, struct i2c_msg *msg) > > +{ > > +VuI2c *i2c = container_of(dev, VuI2c, dev.parent); > > +struct i2c_rdwr_ioctl_d

Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-25 Thread Viresh Kumar
On 25-03-21, 14:17, Jie Deng wrote: > i2c->adapter_num is set here, but used in vi2c_remove_adapters. > when you goto out from while {...}, i2c->adapter_num is always 0, > May be a bug ? It certainly is, this should fix it: diff --git a/tools/vhost-user-i2c/main.c b/tools/vhost-user-i2c/main.c

Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-24 Thread Viresh Kumar
On 25-03-21, 13:09, Jie Deng wrote: > > On 2021/3/24 15:33, Viresh Kumar wrote: > > + > > +/* Definitions from virtio-i2c specifications */ > > +#define VHOST_USER_I2C_MAX_QUEUES 1 > > + > > +/* Status */ > > +#define VIRTIO_I2C_MSG_OK

Re: [PATCH 0/5] virtio: Implement generic vhost-user-i2c backend

2021-03-24 Thread Viresh Kumar
On 24-03-21, 00:42, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/cover.1616570702.git.viresh.ku...@linaro.org/ > > === TEST SCRIPT BEGIN === > #!/bin/bash > git rev-parse base > /dev/null || exit 0 > git config --local diff.renamelimit 0 > git config --local diff.renames

[PATCH] gitignore: Update with some filetypes

2021-03-24 Thread Viresh Kumar
Update .gitignore to ignore .swp and .patch files. Signed-off-by: Viresh Kumar --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 75a4be07240f..eb2553026c5e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ GTAGS *~ *.ast_raw

[PATCH 4/5] docs: add a man page for vhost-user-i2c

2021-03-24 Thread Viresh Kumar
Basic usage and example invocation. Signed-off-by: Viresh Kumar --- docs/tools/index.rst | 1 + docs/tools/vhost-user-i2c.rst | 75 +++ 2 files changed, 76 insertions(+) create mode 100644 docs/tools/vhost-user-i2c.rst diff --git a/docs/tools

[PATCH 1/5] hw/virtio: add boilerplate for vhost-user-i2c device

2021-03-24 Thread Viresh Kumar
This creates the QEMU side of the vhost-user-i2c device which connects to the remote daemon. It is based of vhost-user-fs code. Signed-off-by: Viresh Kumar --- hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c.c

[PATCH 5/5] MAINTAINERS: Add entry for virtio-i2c

2021-03-24 Thread Viresh Kumar
This patch adds entry for virtio-i2c related files in MAINTAINERS. Signed-off-by: Viresh Kumar --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9147e9a429a0..3a80352fc85b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1967,6 +1967,15

[PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-24 Thread Viresh Kumar
This adds the vhost-user backend driver to support virtio based I2C devices. vhost-user-i2c --help Signed-off-by: Viresh Kumar --- hw/virtio/vhost-user-i2c.c | 2 +- tools/meson.build| 8 + tools/vhost-user-i2c/50-qemu-i2c.json.in | 5 + tools/vhost

[PATCH 2/5] hw/virtio: add vhost-user-i2c-pci boilerplate

2021-03-24 Thread Viresh Kumar
This allows is to instantiate a vhost-user-i2c device as part of a PCI bus. It is mostly boilerplate which looks pretty similar to the vhost-user-fs-pci device. Signed-off-by: Viresh Kumar --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-i2c-pci.c | 79

[PATCH 0/5] virtio: Implement generic vhost-user-i2c backend

2021-03-24 Thread Viresh Kumar
(running over host) I hope I was able to give a clear picture of my test setup here :) Thanks. Viresh Kumar (5): hw/virtio: add boilerplate for vhost-user-i2c device hw/virtio: add vhost-user-i2c-pci boilerplate tools/vhost-user-i2c: Add backend driver docs: add a man page for vhost-u