Re: [PATCH 1/2] vdpa: mlx5: prevent cvq work from hogging CPU

2022-03-24 Thread Michael S. Tsirkin
On Fri, Mar 25, 2022 at 11:22:25AM +0800, Jason Wang wrote: > On Thu, Mar 24, 2022 at 8:24 PM Eli Cohen wrote: > > > > > > > > > -Original Message- > > > From: Hillf Danton > > > Sent: Thursday, March 24, 2022 2:02 PM > > > To: Jason Wang > > > Cc: Eli Cohen ; Michael S. Tsirkin ; > > >

[no subject]

2022-03-24 Thread Michael S. Tsirkin
Bcc: Subject: Re: [PATCH 3/3] virtio: harden vring IRQ Message-ID: <20220325021422-mutt-send-email-...@kernel.org> Reply-To: In-Reply-To: On Fri, Mar 25, 2022 at 11:04:08AM +0800, Jason Wang wrote: > > 在 2022/3/24 下午7:03, Michael S. Tsirkin 写道: > > On Thu, Mar 24, 2022 at 04:40:04PM +0800, Jas

Re: [PATCH 1/2] vdpa: mlx5: prevent cvq work from hogging CPU

2022-03-24 Thread Jason Wang
On Thu, Mar 24, 2022 at 8:24 PM Eli Cohen wrote: > > > > > -Original Message- > > From: Hillf Danton > > Sent: Thursday, March 24, 2022 2:02 PM > > To: Jason Wang > > Cc: Eli Cohen ; Michael S. Tsirkin ; > > virtualization ; linux- > > kernel > > Subject: Re: [PATCH 1/2] vdpa: mlx5: pr

Re: [PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Jason Wang
在 2022/3/24 下午7:31, Stefano Garzarella 写道: On Thu, Mar 24, 2022 at 07:07:09AM -0400, Michael S. Tsirkin wrote: On Thu, Mar 24, 2022 at 12:03:07PM +0100, Stefano Garzarella wrote: On Thu, Mar 24, 2022 at 06:48:05AM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 24, 2022 at 04:40:02PM +0800, Jas

Re: [PATCH 3/3] virtio: harden vring IRQ

2022-03-24 Thread Jason Wang
在 2022/3/24 下午7:03, Michael S. Tsirkin 写道: On Thu, Mar 24, 2022 at 04:40:04PM +0800, Jason Wang wrote: This is a rework on the previous IRQ hardening that is done for virtio-pci where several drawbacks were found and were reverted: 1) try to use IRQF_NO_AUTOEN which is not friendly to affinity

Re: [PATCH] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-03-24 Thread Chia-I Wu
On Wed, Mar 23, 2022 at 4:01 AM Liu Zixian wrote: > diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c > b/drivers/gpu/drm/virtio/virtgpu_display.c > index 5b00310ac..f73352e7b 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_display.c > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c > @@ -179,6

Re: [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit

2022-03-24 Thread Leon Romanovsky
On Wed, Mar 16, 2022 at 12:20:04PM -0700, Randy Dunlap wrote: > Eliminate anonymous module_init() and module_exit(), which can lead to > confusion or ambiguity when reading System.map, crashes/oops/bugs, > or an initcall_debug log. > > Give each of these init and exit functions unique driver-speci

Re: [PATCH v3 1/2] virtio-blk: support polling I/O

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 11:04:49PM +0900, Suwan Kim wrote: > This patch supports polling I/O via virtio-blk driver. Polling > feature is enabled by module parameter "num_poll_queues" and it > sets dedicated polling queues for virtio-blk. This patch improves > the polling I/O throughput and latency.

Re: [PATCH v3 1/2] virtio-blk: support polling I/O

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 11:46:02PM +0900, Suwan Kim wrote: > On Thu, Mar 24, 2022 at 10:32:02AM -0400, Michael S. Tsirkin wrote: > > On Thu, Mar 24, 2022 at 11:04:49PM +0900, Suwan Kim wrote: > > > This patch supports polling I/O via virtio-blk driver. Polling > > > feature is enabled by module par

Re: [PATCH v3 1/2] virtio-blk: support polling I/O

2022-03-24 Thread Dongli Zhang
Hi Suwan, The NVMe prints something like below by nvme_setup_io_queues() to confirm if the configuration takes effect. "[ 0.620458] nvme nvme0: 4/0/0 default/read/poll queues". How about to print in virtio-blk as well? Thank you very much! Dongli Zhang On 3/24/22 7:04 AM, Suwan Kim wrote: >

Re: [Spice-devel] 回复: Re: 回复: Re: 回复: Re: 回复: Re: [PATCH v1 1/2] drm/qxl: replace ioremap by ioremap_cache on arm64

2022-03-24 Thread Daniel P . Berrangé
On Thu, Mar 24, 2022 at 02:21:09PM +0100, Gerd Hoffmann wrote: > On Thu, Mar 24, 2022 at 06:34:02PM +0800, liuco...@kylinos.cn wrote: > >ok, thanks, a lot of our customer use qxl on x86 before, so it still need > >to supoort qxl on arm64. > > Well, qxl isn't the best choice even on x86. T

Re: [PATCH v3 1/2] virtio-blk: support polling I/O

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 11:04:49PM +0900, Suwan Kim wrote: > This patch supports polling I/O via virtio-blk driver. Polling > feature is enabled by module parameter "num_poll_queues" and it > sets dedicated polling queues for virtio-blk. This patch improves > the polling I/O throughput and latency.

Re: 回复: Re: 回复: Re: 回复: Re: 回复: Re: [PATCH v1 1/2] drm/qxl: replace ioremap by ioremap_cache on arm64

2022-03-24 Thread Gerd Hoffmann
On Thu, Mar 24, 2022 at 06:34:02PM +0800, liuco...@kylinos.cn wrote: >ok, thanks, a lot of our customer use qxl on x86 before, so it still need >to supoort qxl on arm64. Well, qxl isn't the best choice even on x86. The main advantage it offers (2d acceleration) is basically useless today

Re: [PATCH 1/2] vdpa: mlx5: prevent cvq work from hogging CPU

2022-03-24 Thread Hillf Danton
On Thu, 24 Mar 2022 16:20:34 +0800 Jason Wang wrote: > On Thu, Mar 24, 2022 at 2:17 PM Michael S. Tsirkin wrote: > > On Thu, Mar 24, 2022 at 02:04:19PM +0800, Hillf Danton wrote: > > > On Thu, 24 Mar 2022 10:34:09 +0800 Jason Wang wrote: > > > > On Thu, Mar 24, 2022 at 8:54 AM Hillf Danton wrote:

Re: [PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Stefano Garzarella
On Thu, Mar 24, 2022 at 07:07:09AM -0400, Michael S. Tsirkin wrote: On Thu, Mar 24, 2022 at 12:03:07PM +0100, Stefano Garzarella wrote: On Thu, Mar 24, 2022 at 06:48:05AM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 24, 2022 at 04:40:02PM +0800, Jason Wang wrote: > > From: Stefano Garzarella

Re: [PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 12:03:07PM +0100, Stefano Garzarella wrote: > On Thu, Mar 24, 2022 at 06:48:05AM -0400, Michael S. Tsirkin wrote: > > On Thu, Mar 24, 2022 at 04:40:02PM +0800, Jason Wang wrote: > > > From: Stefano Garzarella > > > > > > This avoids setting DRIVER_OK twice for those driver

Re: [PATCH 2/3] virtio: use virtio_reset_device() when possible

2022-03-24 Thread Stefano Garzarella
On Thu, Mar 24, 2022 at 04:40:03PM +0800, Jason Wang wrote: This allows us to do common extension without duplicating codes. Signed-off-by: Jason Wang --- drivers/virtio/virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virt

Re: [PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Stefano Garzarella
On Thu, Mar 24, 2022 at 06:48:05AM -0400, Michael S. Tsirkin wrote: On Thu, Mar 24, 2022 at 04:40:02PM +0800, Jason Wang wrote: From: Stefano Garzarella This avoids setting DRIVER_OK twice for those drivers that call virtio_device_ready() in the .restore Is this trying to say it's faster?

Re: [PATCH 3/3] virtio: harden vring IRQ

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 04:40:04PM +0800, Jason Wang wrote: > This is a rework on the previous IRQ hardening that is done for > virtio-pci where several drawbacks were found and were reverted: > > 1) try to use IRQF_NO_AUTOEN which is not friendly to affinity managed IRQ >that is used by some

Re: [PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 04:40:02PM +0800, Jason Wang wrote: > From: Stefano Garzarella > > This avoids setting DRIVER_OK twice for those drivers that call > virtio_device_ready() in the .restore Is this trying to say it's faster? If yes this one looks like a red herring. Yes we skip a write but

Re: [PATCH v8 16/16] virtio_ring: introduce virtqueue_resize()

2022-03-24 Thread Michael S. Tsirkin
On Thu, Mar 24, 2022 at 04:34:56PM +0800, Xuan Zhuo wrote: > On Tue, 22 Mar 2022 14:02:47 +0800, Jason Wang wrote: > > > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > > Introduce virtqueue_resize() to implement the resize of vring. > > > Based on these, the driver can dynamically adjust the size of the

Re: 回复: Re: 回复: Re: 回复: Re: [PATCH v1 1/2] drm/qxl: replace ioremap by ioremap_cache on arm64

2022-03-24 Thread Gerd Hoffmann
On Thu, Mar 24, 2022 at 10:20:40AM +0100, Christian König wrote: > Hi Cong, > > when I understand Robin correctly all mapping (host, guest, kernel, > userspace etc..) must have the same caching attributes unless you use the > S2FWB feature introduced with Armv8.4. > > If you don't follow those ru

Re: 回复: Re: 回复: Re: 回复: Re: [PATCH v1 1/2] drm/qxl: replace ioremap by ioremap_cache on arm64

2022-03-24 Thread Christian König via Virtualization
Hi Cong, when I understand Robin correctly all mapping (host, guest, kernel, userspace etc..) must have the same caching attributes unless you use the S2FWB feature introduced with Armv8.4. If you don't follow those rules you usually run into coherency issues or even worse system hangs. So y

Re: [PATCH net v3 0/3] vsock/virtio: enable VQs early on probe and finish the setup before using them

2022-03-24 Thread Stefan Hajnoczi
On Wed, Mar 23, 2022 at 06:36:22PM +0100, Stefano Garzarella wrote: > The first patch fixes a virtio-spec violation. The other two patches > complete the driver configuration before using the VQs in the probe. > > The patch order should simplify backporting in stable branches. > > v3: > - re-orde

Re: [PATCH v8 00/16] virtio pci support VIRTIO_F_RING_RESET (refactor vring)

2022-03-24 Thread Xuan Zhuo
On Tue, 22 Mar 2022 14:40:51 +0800, Jason Wang wrote: > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > The virtio spec already supports the virtio queue reset function. This > > patch set > > is to add this function to the kernel. The relevant virtio spec information > > is > > here: > > > > https

Re: [PATCH v8 10/16] virtio_ring: split: implement virtqueue_resize_split()

2022-03-24 Thread Xuan Zhuo
On Tue, 22 Mar 2022 14:30:29 +0800, Jason Wang wrote: > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > virtio ring split supports resize. > > > > Only after the new vring is successfully allocated based on the new num, > > we will release the old vring. In any case, an error is returned, > > indicating t

[PATCH 3/3] virtio: harden vring IRQ

2022-03-24 Thread Jason Wang
This is a rework on the previous IRQ hardening that is done for virtio-pci where several drawbacks were found and were reverted: 1) try to use IRQF_NO_AUTOEN which is not friendly to affinity managed IRQ that is used by some device such as virtio-blk 2) done only for PCI transport In this patc

[PATCH 2/3] virtio: use virtio_reset_device() when possible

2022-03-24 Thread Jason Wang
This allows us to do common extension without duplicating codes. Signed-off-by: Jason Wang --- drivers/virtio/virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 75c8d560bbd3..8dde44ea044a 100644 --- a/drivers/v

[PATCH 1/3] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-24 Thread Jason Wang
From: Stefano Garzarella This avoids setting DRIVER_OK twice for those drivers that call virtio_device_ready() in the .restore and it will allows us to do extension on virtio_device_ready() without duplicating codes. Signed-off-by: Stefano Garzarella Signed-off-by: Jason Wang --- drivers/virt

[PATCH 0/3] rework on the IRQ hardening of virtio

2022-03-24 Thread Jason Wang
Hi All: This is a rework on the IRQ hardening for virtio which is done previously by the following commits are reverted: 9e35276a5344 ("virtio_pci: harden MSI-X interrupts") 080cd7c3ac87 ("virtio-pci: harden INTX interrupts") The reason is that it depends on the IRQF_NO_AUTOEN which may conflict

Re: [PATCH v8 16/16] virtio_ring: introduce virtqueue_resize()

2022-03-24 Thread Xuan Zhuo
On Tue, 22 Mar 2022 14:02:47 +0800, Jason Wang wrote: > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > Introduce virtqueue_resize() to implement the resize of vring. > > Based on these, the driver can dynamically adjust the size of the vring. > > For example: ethtool -G. > > > > virtqueue_resize() implem

Re: [PATCH v8 11/16] virtio_ring: packed: extract the logic of alloc queue

2022-03-24 Thread Xuan Zhuo
On Tue, 22 Mar 2022 14:38:12 +0800, Jason Wang wrote: > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > Separate the logic of packed to create vring queue. > > > > For the convenience of passing parameters, add a structure > > vring_packed. > > > > This feature is required for subsequent virtuqueue reset

Re: [PATCH v8 07/16] virtio_ring: split: extract the logic of alloc state and extra

2022-03-24 Thread Xuan Zhuo
On Tue, 22 Mar 2022 14:33:34 +0800, Jason Wang wrote: > > 在 2022/3/14 下午5:34, Xuan Zhuo 写道: > > Separate the logic of creating desc_state, desc_extra, and subsequent > > patches will call it independently. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/virtio/virtio_ring.c | 52 ++

Re: [PATCH 1/2] vdpa: mlx5: prevent cvq work from hogging CPU

2022-03-24 Thread Jason Wang
On Thu, Mar 24, 2022 at 2:17 PM Michael S. Tsirkin wrote: > > On Thu, Mar 24, 2022 at 02:04:19PM +0800, Hillf Danton wrote: > > On Thu, 24 Mar 2022 10:34:09 +0800 Jason Wang wrote: > > > On Thu, Mar 24, 2022 at 8:54 AM Hillf Danton wrote: > > > > > > > > On Tue, 22 Mar 2022 09:59:14 +0800 Jason W