Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Shunsuke Mie
2022年12月27日(火) 23:37 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 07:22:36PM +0900, Shunsuke Mie wrote: > > 2022年12月27日(火) 16:49 Shunsuke Mie : > > > > > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > > > > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > > > > Each

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Michael S. Tsirkin
On Wed, Dec 28, 2022 at 11:24:10AM +0900, Shunsuke Mie wrote: > 2022年12月27日(火) 23:37 Michael S. Tsirkin : > > > > On Tue, Dec 27, 2022 at 07:22:36PM +0900, Shunsuke Mie wrote: > > > 2022年12月27日(火) 16:49 Shunsuke Mie : > > > > > > > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > > > > > > > On

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-27 Thread Jason Wang
在 2022/12/27 17:38, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 05:12:58PM +0800, Jason Wang wrote: 在 2022/12/27 15:33, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 12:30:35PM +0800, Jason Wang wrote: But device is still going and will later use the buffers. Same for timeout really.

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-27 Thread Jason Wang
On Tue, Dec 27, 2022 at 3:06 PM Shunsuke Mie wrote: > > 2022年12月27日(火) 15:04 Jason Wang : > > > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > > common function, __vring_iov, finally the vringh_iov

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-27 Thread Jason Wang
在 2022/12/27 17:31, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 05:17:20PM +0800, Jason Wang wrote: In particular, we will also directly break the device. It's kind of hardening for malicious devices. ATM no amount of hardening can prevent a malicious hypervisor from blocking the guest.

Re: [PATCH] vdpa: ifcvf: Do proper cleanup if IFCVF init fails

2022-12-27 Thread Jason Wang
On Wed, Dec 28, 2022 at 5:15 AM Tanmay Bhushan <0070472...@gmail.com> wrote: > > From 7eae04667ddaac8baa4812d48ef2c942cedef946 Mon Sep 17 00:00:00 2001 > From: Tanmay Bhushan <0070472...@gmail.com> > Date: Tue, 27 Dec 2022 22:02:16 +0100 > Subject: [PATCH] vdpa: ifcvf: Do proper cleanup if IFCVF

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-27 Thread Jason Wang
在 2022/12/27 14:58, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 12:33:53PM +0800, Jason Wang wrote: On Tue, Dec 27, 2022 at 10:25 AM Xuan Zhuo wrote: On Mon, 26 Dec 2022 15:49:08 +0800, Jason Wang wrote: We used to busy waiting on the cvq command this tends to be problematic since: 1)

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-27 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 05:17:20PM +0800, Jason Wang wrote: > > > > In particular, we will also directly break the device. > > > It's kind of hardening for malicious devices. > > ATM no amount of hardening can prevent a malicious hypervisor from > > blocking the guest. Recovering when a hardware

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Shunsuke Mie
2022年12月27日(火) 16:49 Shunsuke Mie : > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > > Each vringh memory accessors that are for user, kern and iotlb has own > > > interfaces that calls common code. But some codes are

Re: [PATCH 1/4] virtio-net: convert rx mode setting to use workqueue

2022-12-27 Thread Jason Wang
在 2022/12/27 15:39, Michael S. Tsirkin 写道: On Mon, Dec 26, 2022 at 03:49:05PM +0800, Jason Wang wrote: @@ -2227,9 +2267,21 @@ static void virtnet_set_rx_mode(struct net_device *dev) VIRTIO_NET_CTRL_MAC_TABLE_SET, sg)) dev_warn(>dev, "Failed to

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-27 Thread Jason Wang
在 2022/12/27 15:33, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 12:30:35PM +0800, Jason Wang wrote: But device is still going and will later use the buffers. Same for timeout really. Avoiding infinite wait/poll is one of the goals, another is to sleep. If we think the timeout is hard, we

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-27 Thread Jason Wang
在 2022/12/27 15:19, Michael S. Tsirkin 写道: On Tue, Dec 27, 2022 at 11:47:34AM +0800, Jason Wang wrote: On Tue, Dec 27, 2022 at 7:34 AM Michael S. Tsirkin wrote: On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: This patch introduces a per virtqueue waitqueue to allow driver to

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-27 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 05:12:58PM +0800, Jason Wang wrote: > > 在 2022/12/27 15:33, Michael S. Tsirkin 写道: > > On Tue, Dec 27, 2022 at 12:30:35PM +0800, Jason Wang wrote: > > > > But device is still going and will later use the buffers. > > > > > > > > Same for timeout really. > > > Avoiding

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 07:22:36PM +0900, Shunsuke Mie wrote: > 2022年12月27日(火) 16:49 Shunsuke Mie : > > > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > > > Each vringh memory accessors that are for user, kern and iotlb has