[virtio-dev] Re: [PATCH v2] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Cornelia Huck
On Wed, Aug 18 2021, Jason Wang wrote: > 在 2021/8/17 下午11:26, Cornelia Huck 写道: >> On Fri, Aug 13 2021, Srivatsa Vaddagiri wrote: >> >>> Reset of a virtio-mmio device is initiated by writing 0 to its Status >>> register. The reset operation itself may or may not be completed by the time >>> writ

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Srivatsa Vaddagiri
* Jason Wang [2021-08-18 14:04:04]: > > Fine let me take a stab at the next version which will have this: > > > > * Introduce a status bit for device to indicate "reset in progress". This > > could > > be adopted by other transports also (for ex PCI). > > I may miss something discussion but a

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
On Wed, Aug 18, 2021 at 1:51 PM Srivatsa Vaddagiri wrote: > > * Jason Wang [2021-08-18 13:40:45]: > > > > Hmm ..are you suggesting that we read the Version register as part of > > > reset code > > > and do the wait part only for v3 device? > > > > We only need to read the version once (see virti

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Srivatsa Vaddagiri
* Jason Wang [2021-08-18 13:40:45]: > > Hmm ..are you suggesting that we read the Version register as part of reset > > code > > and do the wait part only for v3 device? > > We only need to read the version once (see virtio_mmio_probe()). So it Ok sorry saw that now. > could be something like

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
On Wed, Aug 18, 2021 at 1:15 PM Srivatsa Vaddagiri wrote: > > * Jason Wang [2021-08-18 10:54:37]: > > > >I think the option we discussed earlier of a new feature bit seems less > > >intrusive than incrementing MMIO version? > > > > > >https://lists.oasis-open.org/archives/virtio-dev/202107/msg001

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Srivatsa Vaddagiri
* Jason Wang [2021-08-18 10:54:37]: > >I think the option we discussed earlier of a new feature bit seems less > >intrusive than incrementing MMIO version? > > > >https://lists.oasis-open.org/archives/virtio-dev/202107/msg00168.html > > > Using features will result some interesting question: >

[virtio-dev] Re: [PATCH] virtio-net: support device stats

2021-08-17 Thread Jason Wang
On Tue, Aug 17, 2021 at 11:37 AM Xuan Zhuo wrote: > > This patch allows the driver to obtain some statistics from the device, > such as: > > 1. queue_N_rx_drops: Rx packets not passed to the driver. > 2. queue_N_tx_drops: The tx packet that the device did not send out > 3. queue_N_tx_inter: The nu

Re: [virtio-dev] Re: [PATCH V2] virtio: i2c: Allow zero-length transactions

2021-08-17 Thread Viresh Kumar
+Arnd On 18-08-21, 10:38, Jie Deng wrote: > > On 2021/8/17 18:43, Viresh Kumar wrote: > > On 17-08-21, 02:47, Michael S. Tsirkin wrote: > > > On Tue, Aug 17, 2021 at 09:23:24AM +0530, Viresh Kumar wrote: > > > > On 16-08-21, 10:45, Michael S. Tsirkin wrote: > > > > > So I wonder. What if we allow

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
在 2021/8/17 下午8:48, Srivatsa Vaddagiri 写道: * Srivatsa Vaddagiri [2021-08-17 15:33:33]: Handling reset is the only open issue we have, as guest triggering reset has currently no provision to poll for reset completion and hypervisor itself cannot handle reset completly. This is where we observ

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
在 2021/8/17 下午6:03, Srivatsa Vaddagiri 写道: * Michael S. Tsirkin [2021-08-17 03:51:47]: So before we move on I'd like to know whether we do something as drastic as incrementing the version number for a theoretical or practical benefit. We initially stumbled on this reset issue when doing som

[virtio-dev] Re: [PATCH v2] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
在 2021/8/17 下午11:26, Cornelia Huck 写道: On Fri, Aug 13 2021, Srivatsa Vaddagiri wrote: Reset of a virtio-mmio device is initiated by writing 0 to its Status register. The reset operation itself may or may not be completed by the time write instruction completes. For devices that are emulated

[virtio-dev] Re: [PATCH V2] virtio: i2c: Allow zero-length transactions

2021-08-17 Thread Jie Deng
On 2021/8/17 18:43, Viresh Kumar wrote: On 17-08-21, 02:47, Michael S. Tsirkin wrote: On Tue, Aug 17, 2021 at 09:23:24AM +0530, Viresh Kumar wrote: On 16-08-21, 10:45, Michael S. Tsirkin wrote: So I wonder. What if we allow zero-length buffers in virtio? Would that address the need? OK, so

[virtio-dev] Re: [PATCH v2] virtio-pmem: PMEM device spec

2021-08-17 Thread Pankaj Gupta
> > +\section{PMEM Device}\label{sec:Device Types / PMEM Device} > > + > > +The virtio pmem device is a persistent memory (NVDIMM) device > > +provide a virtio based asynchronous flush mechanism. This avoids the > > s/provide/that provides/ o.k > > > +need of a separate page cache in the guest an

[virtio-dev] Re: [PATCH v2] virtio-pmem: PMEM device spec

2021-08-17 Thread Stefan Hajnoczi
On Fri, Aug 13, 2021 at 11:52:16AM +0200, Pankaj Gupta wrote: > +\section{PMEM Device}\label{sec:Device Types / PMEM Device} > + > +The virtio pmem device is a persistent memory (NVDIMM) device > +provide a virtio based asynchronous flush mechanism. This avoids the s/provide/that provides/ > +nee

[virtio-dev] Re: [PATCH v2] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Cornelia Huck
On Fri, Aug 13 2021, Srivatsa Vaddagiri wrote: > Reset of a virtio-mmio device is initiated by writing 0 to its Status > register. The reset operation itself may or may not be completed by the time > write instruction completes. For devices that are emulated in software, writes > to Status regist

[virtio-dev] Re: Enabling hypervisor agnosticism for VirtIO backends

2021-08-17 Thread Stefan Hajnoczi
On Wed, Aug 04, 2021 at 12:20:01PM -0700, Stefano Stabellini wrote: > > Could we consider the kernel internally converting IOREQ messages from > > the Xen hypervisor to eventfd events? Would this scale with other kernel > > hypercall interfaces? > > > > So any thoughts on what directions are worth

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Srivatsa Vaddagiri
* Srivatsa Vaddagiri [2021-08-17 15:33:33]: > Handling reset is the only open issue we have, as guest triggering reset has > currently no provision to poll for reset completion and hypervisor itself > cannot > handle reset completly. This is where we observed discrepancy between PCI vs > MMIO in

[virtio-dev] Re: [PATCH V2] virtio: i2c: Allow zero-length transactions

2021-08-17 Thread Viresh Kumar
On 17-08-21, 02:47, Michael S. Tsirkin wrote: > On Tue, Aug 17, 2021 at 09:23:24AM +0530, Viresh Kumar wrote: > > On 16-08-21, 10:45, Michael S. Tsirkin wrote: > > > So I wonder. What if we allow zero-length buffers in virtio? Would that > > > address the need? > OK, so yea. Let's split this up pl

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Srivatsa Vaddagiri
* Michael S. Tsirkin [2021-08-17 03:51:47]: > So before we move on I'd like to know whether we do something as drastic > as incrementing the version number for a theoretical or practical > benefit. We initially stumbled on this reset issue when doing some optimization in Qualcomm Type-1 hypervis

Re: [virtio-dev] [PATCH V9] virtio-gpio: Add the device specification

2021-08-17 Thread Cornelia Huck
On Tue, Aug 17 2021, Stefan Hajnoczi wrote: > On Mon, Aug 09, 2021 at 12:32:14PM +0530, Viresh Kumar wrote: >> +\subsubsection{requestq Operation: Get Line Names}\label{sec:Device Types / >> GPIO Device / requestq Operation / Get Line Names} >> + >> +The driver sends this message to receive a st

Re: [virtio-dev] [PATCH V9] virtio-gpio: Add the device specification

2021-08-17 Thread Stefan Hajnoczi
On Mon, Aug 09, 2021 at 12:32:14PM +0530, Viresh Kumar wrote: > +\subsubsection{requestq Operation: Get Line Names}\label{sec:Device Types / > GPIO Device / requestq Operation / Get Line Names} > + > +The driver sends this message to receive a stream of zero-terminated strings, > +where each strin

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Jason Wang
在 2021/8/17 下午3:51, Michael S. Tsirkin 写道: On Tue, Aug 17, 2021 at 01:45:12PM +0800, Jason Wang wrote: 在 2021/8/16 下午7:48, Michael S. Tsirkin 写道: On Mon, Aug 16, 2021 at 12:05:50PM +0530, Srivatsa Vaddagiri wrote: * Michael S. Tsirkin [2021-08-16 01:35:46]: So thinking about all this, qui

Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

2021-08-17 Thread Michael S. Tsirkin
On Tue, Aug 17, 2021 at 01:45:12PM +0800, Jason Wang wrote: > > 在 2021/8/16 下午7:48, Michael S. Tsirkin 写道: > > On Mon, Aug 16, 2021 at 12:05:50PM +0530, Srivatsa Vaddagiri wrote: > > > * Michael S. Tsirkin [2021-08-16 01:35:46]: > > > > > > > So thinking about all this, quite early in the setup