[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 01:23:52PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Friday, October 8, 2021 6:27 PM > > > > 2. A sriov VF virtio device for our case takes a lot lesser than this, > > > but may > > take anywhere between 10 msec to 250msec. > > > This can hap

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, October 8, 2021 6:27 PM > > 2. A sriov VF virtio device for our case takes a lot lesser than this, but > > may > take anywhere between 10 msec to 250msec. > > This can happen on a firmware where user enabled 500 SR-IOV VFs. > > Pci spec indicates tha

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, October 8, 2021 4:48 PM > > On Fri, Oct 08, 2021 at 10:51:02AM +, Parav Pandit wrote: > > > That's why I ask: why do we bother? What's wrong with just waiting > > > forever or until user gets tired of this and cancels with CTRL-C? > > > > Today, d

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Cornelia Huck > Sent: Friday, October 8, 2021 5:18 PM > > On Fri, Oct 08 2021, "Michael S. Tsirkin" wrote: > > > On Fri, Oct 08, 2021 at 10:59:02AM +, Parav Pandit wrote: > >> It may be even a pre-boot environment where 100msec or 10msec may be > too short interval as other extre

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, October 8, 2021 4:52 PM > > On Fri, Oct 08, 2021 at 10:59:02AM +, Parav Pandit wrote: > > It may be even a pre-boot environment where 100msec or 10msec may be > too short interval as other extreme of VM boot time example. > > I don't really know w

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, October 8, 2021 4:14 PM > > On Thu, Oct 07, 2021 at 03:42:24AM +, Parav Pandit wrote: > > > There's no reason for a driver to choose any value - it has nothing else > > > to > do. > > > > > At least for the devices that we are seeing, driver choos

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, October 8, 2021 3:42 PM > > When a device migrates to destination, it starts from where the device > > left off on the source side. So yes, destination side, device must be > > usable (out of reset), and after that its current state will be > > overw

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Parav Pandit
> From: Cornelia Huck > Sent: Friday, October 8, 2021 3:31 PM > > On Thu, Oct 07 2021, Parav Pandit wrote: > > >> From: Cornelia Huck > >> Sent: Thursday, October 7, 2021 9:41 PM On Thu, Oct 07 2021, Parav > >> Pandit wrote: > >> > >> >> From: Michael S. Tsirkin > >> >> Sent: Thursday, Oct

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 12:12:35PM +, Parav Pandit wrote: > > > > From: Cornelia Huck > > Sent: Friday, October 8, 2021 5:18 PM > > > > On Fri, Oct 08 2021, "Michael S. Tsirkin" wrote: > > > > > On Fri, Oct 08, 2021 at 10:59:02AM +, Parav Pandit wrote: > > >> It may be even a pre-boot

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Cornelia Huck
On Fri, Oct 08 2021, "Michael S. Tsirkin" wrote: > On Fri, Oct 08, 2021 at 10:59:02AM +, Parav Pandit wrote: >> It may be even a pre-boot environment where 100msec or 10msec may be too >> short interval as other extreme of VM boot time example. > > I don't really know what this means. We are

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 10:59:02AM +, Parav Pandit wrote: > It may be even a pre-boot environment where 100msec or 10msec may be too > short interval as other extreme of VM boot time example. I don't really know what this means. We are talking about how long it takes device to calm down and s

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 10:51:02AM +, Parav Pandit wrote: > > That's why I ask: why do we bother? What's wrong with just waiting forever > > or > > until user gets tired of this and cancels with CTRL-C? > > Today, device removal of the device gets stuck for the device which didn't > finish t

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Thu, Oct 07, 2021 at 03:42:24AM +, Parav Pandit wrote: > > There's no reason for a driver to choose any value - it has nothing else to > > do. > > > At least for the devices that we are seeing, driver choosing a default value > of 2 to 3 minutes is good enough and of course useful. Well I

[virtio-dev] Re: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Michael S. Tsirkin
On Thu, Oct 07, 2021 at 05:58:09PM +, Parav Pandit wrote: > > >> > > Third how about making e.g. 0 a special value meaning no limit > > >> > > wait > > >> forever? > > >> > The whole idea is to have some finite/deterministic behavior, > > >> > > >> I guess I'm being dense, I just don't yet unde

[virtio-dev] RE: [PATCH v2] Add device reset timeout field

2021-10-08 Thread Cornelia Huck
On Thu, Oct 07 2021, Parav Pandit wrote: >> From: Cornelia Huck >> Sent: Thursday, October 7, 2021 9:41 PM >> On Thu, Oct 07 2021, Parav Pandit wrote: >> >> >> From: Michael S. Tsirkin >> >> Sent: Thursday, October 7, 2021 2:23 AM On Wed, Oct 06, 2021 at >> >> 04:11:19PM +, Parav Pandit w

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

2021-10-08 Thread Viresh Kumar
The I2C protocol allows zero-length requests with no data, like the SMBus Quick command, where the command is inferred based on the read/write flag itself. In order to allow such a request, allocate another bit, VIRTIO_I2C_FLAGS_M_RD(1), in the flags to pass the request type, as read or write. Thi