Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-12 Thread Vadim Rozenfeld
Currently we use 4-byte alignmed (FILE_LONG_ALIGNMENT) in both Windows virtio blk and scsi miniport drivers. It shouldn't be a problem to change it to 512 by setting AlignmentMask field of PORT_CONFIGURATION_INFORMATION structure (

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Xuan Zhuo
On Thu, 13 Jul 2023 12:21:26 +0800, Jason Wang wrote: > On Thu, Jul 13, 2023 at 12:06 PM Xuan Zhuo wrote: > > > > On Thu, 13 Jul 2023 11:50:57 +0800, Jason Wang wrote: > > > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo > > > wrote: > > > > > > > > Now we add a case where we skip dma unmap, the

Re: [PATCH v2 virtio 5/5] pds_vdpa: fix up debugfs feature bit printing

2023-07-12 Thread Jason Wang
On Tue, Jul 11, 2023 at 12:25 PM Shannon Nelson wrote: > > Make clearer in debugfs output the difference between the hw > feature bits, the features supported through the driver, and > the features that have been negotiated. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > ---

Re: [PATCH v2 virtio 3/5] pds_vdpa: clean and reset vqs entries

2023-07-12 Thread Jason Wang
On Tue, Jul 11, 2023 at 12:25 PM Shannon Nelson wrote: > > Make sure that we initialize the vqs[] entries the same > way both for initial setup and after a vq reset. > > Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") > Signed-off-by: Shannon Nelson Acked-by:

Re: [PATCH v2 virtio 2/5] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-07-12 Thread Jason Wang
On Tue, Jul 11, 2023 at 12:25 PM Shannon Nelson wrote: > > Our driver sets a mac if the HW is 00:..:00 so we need to be sure to > advertise VIRTIO_NET_F_MAC even if the HW doesn't. We also need to be > sure that virtio_net sees the VIRTIO_NET_F_MAC and doesn't rewrite the > mac address that a

Re: [PATCH v2 virtio 1/5] pds_vdpa: reset to vdpa specified mac

2023-07-12 Thread Jason Wang
On Tue, Jul 11, 2023 at 12:25 PM Shannon Nelson wrote: > > From: Allen Hubbe > > When the vdpa device is reset, also reinitialize it with the mac address > that was assigned when the device was added. > > Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") >

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Jason Wang
On Thu, Jul 13, 2023 at 12:06 PM Xuan Zhuo wrote: > > On Thu, 13 Jul 2023 11:50:57 +0800, Jason Wang wrote: > > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo > > wrote: > > > > > > Now we add a case where we skip dma unmap, the vq->premapped is true. > > > > > > We can't just rely on use_dma_api

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:43 AM Xuan Zhuo wrote: > I'd suggest to tweak the title like: "merge dma operations when refilling mergeable buffers" > Currently, the virtio core will perform a dma operation for each > operation. "for each buffer"? > Although, the same page may be operated

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Xuan Zhuo
On Thu, 13 Jul 2023 11:50:57 +0800, Jason Wang wrote: > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > > > Now we add a case where we skip dma unmap, the vq->premapped is true. > > > > We can't just rely on use_dma_api to determine whether to skip the dma > > operation. For convenience, I

Re: [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > Now we add a case where we skip dma unmap, the vq->premapped is true. > > We can't just rely on use_dma_api to determine whether to skip the dma > operation. For convenience, I introduced the "do_unmap". By default, it > is the same as

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Krzysztof Kozlowski
On 12/07/2023 20:31, Sean Paul wrote: >>> 216 struct drm_device *ddev >>> 234 struct drm_device *drm_dev >>> 611 struct drm_device *drm >>>4190 struct drm_device *dev >>> >>> This series starts with renaming struct drm_crtc::dev to drm_dev. If >>> it's not only me and others like

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Sean Paul
On Wed, Jul 12, 2023 at 10:52 AM Jani Nikula wrote: > > On Wed, 12 Jul 2023, Uwe Kleine-König wrote: > > Hello, > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer variables being named "dev" > > because with that name I usually

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-12 Thread Mike Christie
On 7/12/23 9:26 AM, Stefan Hajnoczi wrote: > On Tue, Jul 11, 2023 at 04:01:22PM -0500, Mike Christie wrote: >> On 7/11/23 1:34 PM, Stefan Hajnoczi wrote: >>> On Sun, Jul 09, 2023 at 03:28:57PM -0500, Mike Christie wrote: The following patches were made over Linus's tree and fix an issue

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-12 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 04:01:22PM -0500, Mike Christie wrote: > On 7/11/23 1:34 PM, Stefan Hajnoczi wrote: > > On Sun, Jul 09, 2023 at 03:28:57PM -0500, Mike Christie wrote: > >> The following patches were made over Linus's tree and fix an issue > >> where windows guests will send iovecs with

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Paolo Bonzini
On 7/12/23 15:40, Christoph Hellwig wrote: The problem is that the SCSI stack does not send this command, so we should do it in the driver. In fact we do it for VIRTIO_SCSI_EVT_RESET_RESCAN (hotplug), but not for VIRTIO_SCSI_EVT_RESET_REMOVED (hotunplug). No, you should absolutely no do it in

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 12:14 PM Stefano Garzarella wrote: > > On Wed, Jul 12, 2023 at 10:06:56AM +0200, Paolo Bonzini wrote: > >On 7/11/23 22:21, Mike Christie wrote: > >>What was the issue you are seeing? > >> > >>Was it something like you get the UA. We retry then on one of the > >>retries the

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Christian König via Virtualization
Am 12.07.23 um 15:38 schrieb Uwe Kleine-König: Hello Maxime, On Wed, Jul 12, 2023 at 02:52:38PM +0200, Maxime Ripard wrote: On Wed, Jul 12, 2023 at 01:02:53PM +0200, Uwe Kleine-König wrote: Background is that this makes merge conflicts easier to handle and detect. Really? FWIW, I agree with

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Christoph Hellwig
On Wed, Jul 12, 2023 at 10:28:00AM +0200, Stefano Garzarella wrote: > The problem is that the SCSI stack does not send this command, so we > should do it in the driver. In fact we do it for > VIRTIO_SCSI_EVT_RESET_RESCAN (hotplug), but not for > VIRTIO_SCSI_EVT_RESET_REMOVED (hotunplug). No, you

[PATCH 2/7] drm/qxl: switch to using drm_exec

2023-07-12 Thread Christian König
Just a straightforward conversion without any optimization. Only compile tested for now. Signed-off-by: Christian König Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/Kconfig | 1 +

[PATCH 4/7] drm/virtgpu: switch to using drm_exec

2023-07-12 Thread Christian König
Just a straightforward conversion without any optimization. Only compile tested for now. Signed-off-by: Christian König Cc: David Airlie Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu Cc: virtualization@lists.linux-foundation.org --- drivers/gpu/drm/virtio/Kconfig | 1 +

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Christian König via Virtualization
Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: Hello, while I debugged an issue in the imx-lcdc driver I was constantly irritated about struct drm_device pointer variables being named "dev" because with that name I usually expect a struct device pointer. I think there is a big benefit when

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 10:35:48AM +0200, Paolo Bonzini wrote: On 7/11/23 19:06, Stefano Garzarella wrote: CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, since I found a few things in the virtio-scsi driver... FYI we have seen that Linux has problems with a QEMU patch for

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Thomas Zimmermann
Hi Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: Hello, while I debugged an issue in the imx-lcdc driver I was constantly irritated about struct drm_device pointer variables being named "dev" because with that name I usually expect a struct device pointer. I think there is a big benefit when

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 10:06:56AM +0200, Paolo Bonzini wrote: On 7/11/23 22:21, Mike Christie wrote: What was the issue you are seeing? Was it something like you get the UA. We retry then on one of the retries the sense is not setup correctly, so the scsi error handler runs? That fails and

Re: [PATCH net-next V1 3/4] virtio_net: support per queue interrupt coalesce command

2023-07-12 Thread Xuan Zhuo
On Mon, 10 Jul 2023 12:20:04 +0300, Gavin Li wrote: > Add interrupt_coalesce config in send_queue and receive_queue to cache user > config. > > Send per virtqueue interrupt moderation config to underline device in order > to have more efficient interrupt moderation and cpu utilization of guest >

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Xuan Zhuo
On Wed, 12 Jul 2023 16:37:43 +0800, Jason Wang wrote: > On Wed, Jul 12, 2023 at 4:33 PM Xuan Zhuo wrote: > > > > On Wed, 12 Jul 2023 15:54:58 +0800, Xuan Zhuo > > wrote: > > > On Tue, 11 Jul 2023 10:58:51 +0800, Jason Wang > > > wrote: > > > > On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo > >

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Jason Wang
On Wed, Jul 12, 2023 at 4:33 PM Xuan Zhuo wrote: > > On Wed, 12 Jul 2023 15:54:58 +0800, Xuan Zhuo > wrote: > > On Tue, 11 Jul 2023 10:58:51 +0800, Jason Wang wrote: > > > On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 11 Jul 2023 10:36:17 +0800, Jason Wang

Re: [PATCH vhost v11 03/10] virtio_ring: introduce virtqueue_set_premapped()

2023-07-12 Thread Xuan Zhuo
On Wed, 12 Jul 2023 16:24:18 +0800, Jason Wang wrote: > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo > wrote: > > > This helper allows the driver change the dma mode to premapped mode. > > Under the premapped mode, the virtio core do not do dma mapping > > internally. > > > > This just work when

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Paolo Bonzini
On 7/11/23 19:06, Stefano Garzarella wrote: CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, since I found a few things in the virtio-scsi driver... FYI we have seen that Linux has problems with a QEMU patch for the virtio-scsi device (details at the bottom of this email in

Re: [PATCH vhost v11 04/10] virtio_ring: support add premapped buf

2023-07-12 Thread Xuan Zhuo
On Wed, 12 Jul 2023 16:31:35 +0800, Jason Wang wrote: > On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > > > If the vq is the premapped mode, use the sg_dma_address() directly. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/virtio/virtio_ring.c | 19 +-- > > 1 file

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Xuan Zhuo
On Wed, 12 Jul 2023 15:54:58 +0800, Xuan Zhuo wrote: > On Tue, 11 Jul 2023 10:58:51 +0800, Jason Wang wrote: > > On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 11 Jul 2023 10:36:17 +0800, Jason Wang > > > wrote: > > > > On Mon, Jul 10, 2023 at 8:41 PM Xuan Zhuo

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > caller can do dma operation in advance. The purpose is to keep memory > mapped across multiple add/get buf operations. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang

Re: [PATCH vhost v11 04/10] virtio_ring: support add premapped buf

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > > If the vq is the premapped mode, use the sg_dma_address() directly. > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Tue, Jul 11, 2023 at 01:41:31PM -0400, Stefan Hajnoczi wrote: On Tue, 11 Jul 2023 at 13:06, Stefano Garzarella wrote: CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, since I found a few things in the virtio-scsi driver... FYI we have seen that Linux has problems with a

Re: [PATCH vhost v11 03/10] virtio_ring: introduce virtqueue_set_premapped()

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 11:42 AM Xuan Zhuo wrote: > This helper allows the driver change the dma mode to premapped mode. > Under the premapped mode, the virtio core do not do dma mapping > internally. > > This just work when the use_dma_api is true. If the use_dma_api is false, > the dma options

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Paolo Bonzini
On 7/11/23 22:21, Mike Christie wrote: What was the issue you are seeing? Was it something like you get the UA. We retry then on one of the retries the sense is not setup correctly, so the scsi error handler runs? That fails and the device goes offline? If you turn on scsi debugging you would

Re: [PATCH net-next V1 3/4] virtio_net: support per queue interrupt coalesce command

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 5:21 PM Gavin Li wrote: > Add interrupt_coalesce config in send_queue and receive_queue to cache user > config. > > Send per virtqueue interrupt moderation config to underline device in order > to have more efficient interrupt moderation and cpu utilization of guest > VM.

Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page

2023-07-12 Thread Xuan Zhuo
On Tue, 11 Jul 2023 10:58:51 +0800, Jason Wang wrote: > On Tue, Jul 11, 2023 at 10:42 AM Xuan Zhuo wrote: > > > > On Tue, 11 Jul 2023 10:36:17 +0800, Jason Wang wrote: > > > On Mon, Jul 10, 2023 at 8:41 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 10 Jul 2023 07:59:03 -0400, "Michael S.

Re: [PATCH net-next V1 2/4] virtio_net: extract get/set interrupt coalesce to a function

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 5:21 PM Gavin Li wrote: > Extract get/set interrupt coalesce to a function to be reused by global > and per queue config. > > Signed-off-by: Gavin Li > Reviewed-by: Dragos Tatulea > Reviewed-by: Jiri Pirko > --- > drivers/net/virtio_net.c | 22 +- >

Re: [PATCH net-next V1 1/4] virtio_net: extract interrupt coalescing settings to a structure

2023-07-12 Thread Jason Wang
On Mon, Jul 10, 2023 at 5:21 PM Gavin Li wrote: > Extract interrupt coalescing settings to a structure so that it could be > reused in other data structures. > > Signed-off-by: Gavin Li > Reviewed-by: Dragos Tatulea > Reviewed-by: Jiri Pirko > --- > drivers/net/virtio_net.c | 35