Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-19 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 04:23:24PM +, Anton Ivanov wrote: > > On 13/02/2020 15:53, Michael S. Tsirkin wrote: > > On Thu, Feb 13, 2020 at 07:44:06AM -0800, Eric Dumazet wrote: > > > > > > On 2/13/20 2:00 AM, Michael S. Tsirkin wrote: > > > > On Wed, Feb 12, 2020 at 05:38:09PM +, Anton

[PATCH V4 5/5] vdpasim: vDPA device simulator

2020-02-19 Thread Jason Wang
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops

[PATCH V4 3/5] vDPA: introduce vDPA bus

2020-02-19 Thread Jason Wang
vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: -

[PATCH V4 4/5] virtio: introduce a vDPA based transport

2020-02-19 Thread Jason Wang
This patch introduces a vDPA transport for virtio. This is used to use kernel virtio driver to drive the vDPA device that is capable of populating virtqueue directly. A new virtio-vdpa driver will be registered to the vDPA bus, when a new virtio-vdpa device is probed, it will register the device

[PATCH V4 2/5] vringh: IOTLB support

2020-02-19 Thread Jason Wang
This patch implements the third memory accessor for vringh besides current kernel and userspace accessors. This idea is to allow vringh to do the address translation through an IOTLB which is implemented via vhost_map interval tree. Users should setup and IOVA to PA mapping in this IOTLB. This

[PATCH V4 1/5] vhost: factor out IOTLB

2020-02-19 Thread Jason Wang
This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the case of vhost device IOTLB implementation. Signed-off-by: Jason Wang ---

[PATCH V4 0/5] vDPA support

2020-02-19 Thread Jason Wang
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices

Re: [PATCH V3 5/5] vdpasim: vDPA device simulator

2020-02-19 Thread Jason Wang
On 2020/2/20 下午12:09, Randy Dunlap wrote: On 2/19/20 7:56 PM, Jason Wang wrote: diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig index 7a99170e6c30..e3656b722654 100644 --- a/drivers/virtio/vdpa/Kconfig +++ b/drivers/virtio/vdpa/Kconfig @@ -7,3 +7,21 @@ config VDPA

Re: [PATCH V3 4/5] virtio: introduce a vDPA based transport

2020-02-19 Thread Jason Wang
On 2020/2/20 下午12:07, Randy Dunlap wrote: On 2/19/20 7:56 PM, Jason Wang wrote: diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 9c4fdb64d9ac..0df3676b0f4f 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -43,6 +43,19 @@ config VIRTIO_PCI_LEGACY If

Re: [PATCH V3 3/5] vDPA: introduce vDPA bus

2020-02-19 Thread Jason Wang
On 2020/2/20 下午12:06, Randy Dunlap wrote: On 2/19/20 7:56 PM, Jason Wang wrote: diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig new file mode 100644 index ..7a99170e6c30 --- /dev/null +++ b/drivers/virtio/vdpa/Kconfig @@ -0,0 +1,9 @@ +#

Re: [PATCH V3 1/5] vhost: factor out IOTLB

2020-02-19 Thread Jason Wang
On 2020/2/20 下午12:04, Randy Dunlap wrote: On 2/19/20 7:56 PM, Jason Wang wrote: This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the

Re: [PATCH V3 5/5] vdpasim: vDPA device simulator

2020-02-19 Thread Randy Dunlap
On 2/19/20 7:56 PM, Jason Wang wrote: > diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig > index 7a99170e6c30..e3656b722654 100644 > --- a/drivers/virtio/vdpa/Kconfig > +++ b/drivers/virtio/vdpa/Kconfig > @@ -7,3 +7,21 @@ config VDPA >datapath which complies with

Re: [PATCH V3 4/5] virtio: introduce a vDPA based transport

2020-02-19 Thread Randy Dunlap
On 2/19/20 7:56 PM, Jason Wang wrote: > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig > index 9c4fdb64d9ac..0df3676b0f4f 100644 > --- a/drivers/virtio/Kconfig > +++ b/drivers/virtio/Kconfig > @@ -43,6 +43,19 @@ config VIRTIO_PCI_LEGACY > > If unsure, say Y. > > +config

Re: [PATCH V3 3/5] vDPA: introduce vDPA bus

2020-02-19 Thread Randy Dunlap
On 2/19/20 7:56 PM, Jason Wang wrote: > diff --git a/drivers/virtio/vdpa/Kconfig b/drivers/virtio/vdpa/Kconfig > new file mode 100644 > index ..7a99170e6c30 > --- /dev/null > +++ b/drivers/virtio/vdpa/Kconfig > @@ -0,0 +1,9 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +config VDPA >

Re: [PATCH V3 1/5] vhost: factor out IOTLB

2020-02-19 Thread Randy Dunlap
On 2/19/20 7:56 PM, Jason Wang wrote: > This patch factors out IOTLB into a dedicated module in order to be > reused by other modules like vringh. User may choose to enable the > automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit > for the case of vhost device IOTLB

[PATCH V3 5/5] vdpasim: vDPA device simulator

2020-02-19 Thread Jason Wang
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops

[PATCH V3 3/5] vDPA: introduce vDPA bus

2020-02-19 Thread Jason Wang
vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: -

[PATCH V3 4/5] virtio: introduce a vDPA based transport

2020-02-19 Thread Jason Wang
This patch introduces a vDPA transport for virtio. This is used to use kernel virtio driver to drive the vDPA device that is capable of populating virtqueue directly. A new virtio-vdpa driver will be registered to the vDPA bus, when a new virtio-vdpa device is probed, it will register the device

[PATCH V3 2/5] vringh: IOTLB support

2020-02-19 Thread Jason Wang
This patch implements the third memory accessor for vringh besides current kernel and userspace accessors. This idea is to allow vringh to do the address translation through an IOTLB which is implemented via vhost_map interval tree. Users should setup and IOVA to PA mapping in this IOTLB. This

[PATCH V3 0/5] vDPA support

2020-02-19 Thread Jason Wang
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices

[PATCH V3 1/5] vhost: factor out IOTLB

2020-02-19 Thread Jason Wang
This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the case of vhost device IOTLB implementation. Signed-off-by: Jason Wang ---

Re: [PATCH] vhost: introduce vDPA based backend

2020-02-19 Thread Tiwei Bie
On Wed, Feb 19, 2020 at 09:11:02AM -0400, Jason Gunthorpe wrote: > On Wed, Feb 19, 2020 at 10:52:38AM +0800, Tiwei Bie wrote: > > > > +static int __init vhost_vdpa_init(void) > > > > +{ > > > > + int r; > > > > + > > > > + idr_init(_vdpa.idr); > > > > + mutex_init(_vdpa.mutex); >

[PATCH] virtio_balloon: Fix build error seen with CONFIG_BALLOON_COMPACTION=n

2020-02-19 Thread Guenter Roeck
0day reports: drivers//virtio/virtio_balloon.c: In function 'virtballoon_probe': drivers//virtio/virtio_balloon.c:960:1: error: label 'out_del_vqs' defined but not used [-Werror=unused-label] This is seen with CONFIG_BALLOON_COMPACTION=n. Reported-by: kbuild test robot Fixes:

Re: [PATCH 0/2] virtio-blk: improve handling of DMA mapping failures

2020-02-19 Thread Stefan Hajnoczi
On Thu, Feb 13, 2020 at 01:37:26PM +0100, Halil Pasic wrote: > Two patches are handling new edge cases introduced by doing DMA mappings > (which can fail) in virtio core. > > I stumbled upon this while stress testing I/O for Protected Virtual > Machines. I deliberately chose a tiny swiotlb size

[RESEND PATCH v2 9/9] ath5k: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 7/9] drm/nouveau: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 8/9] media: fsl-viu: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 5/9] arc: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 3/9] ntb: intel: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 2/9] rtl818x: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 4/9] virtio: pci: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among

[RESEND PATCH v2 0/9] iomap: Constify ioreadX() iomem argument

2020-02-19 Thread Krzysztof Kozlowski
Hi, Changes since v1 https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-k...@kernel.org/ 1. Constify also ioreadX_rep() and mmio_insX(), 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability, 3. Add acks and reviews, 4. Re-order patches so all

[RESEND PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-19 Thread Krzysztof Kozlowski
The ioreadX() and ioreadX_rep() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and

Re: [PATCH 1/2] virtio-blk: fix hw_queue stopped on arbitrary error

2020-02-19 Thread Halil Pasic
On Wed, 19 Feb 2020 09:46:56 +0800 Ming Lei wrote: > On Tue, Feb 18, 2020 at 8:35 PM Halil Pasic wrote: > > > > On Tue, 18 Feb 2020 10:21:18 +0800 > > Ming Lei wrote: > > > > > On Thu, Feb 13, 2020 at 8:38 PM Halil Pasic wrote: > > > > > > > > Since nobody else is going to restart our

Re: [PATCH] vhost: introduce vDPA based backend

2020-02-19 Thread Jason Gunthorpe
On Wed, Feb 19, 2020 at 10:52:38AM +0800, Tiwei Bie wrote: > > > +static int __init vhost_vdpa_init(void) > > > +{ > > > + int r; > > > + > > > + idr_init(_vdpa.idr); > > > + mutex_init(_vdpa.mutex); > > > + init_waitqueue_head(_vdpa.release_q); > > > + > > > + /*

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-19 Thread Jason Gunthorpe
On Wed, Feb 19, 2020 at 01:35:25PM +0800, Jason Wang wrote: > > But it is > > open coded and duplicated because .. vdpa? > > > I'm not sure I get here, vhost module is reused for vhost-vdpa and all > current vhost device (e.g net) uses their own char device. I mean there shouldn't be two fops

Re: [PATCH] iommu/virtio: Build virtio-iommu as module

2020-02-19 Thread Joerg Roedel
On Wed, Feb 19, 2020 at 12:41:33PM +0100, Jean-Philippe Brucker wrote: > No, I meant Will's changes in 5.6 to make the SMMU drivers modular. This > patch doesn't depend on the x86 enablement patch-set, but there is a small > conflict in Kconfig since they both modify it (locally I have this patch

Re: [PATCH] iommu/virtio: Build virtio-iommu as module

2020-02-19 Thread Jean-Philippe Brucker
Hi Joerg, On Wed, Feb 19, 2020 at 12:16:04PM +0100, Joerg Roedel wrote: > On Fri, Feb 14, 2020 at 05:38:27PM +0100, Jean-Philippe Brucker wrote: > > From: Jean-Philippe Brucker > > > > Now that the infrastructure changes are in place, enable virtio-iommu to > > be built as a module. Remove the

Re: [PATCH] iommu/virtio: Build virtio-iommu as module

2020-02-19 Thread Joerg Roedel
On Fri, Feb 14, 2020 at 05:38:27PM +0100, Jean-Philippe Brucker wrote: > From: Jean-Philippe Brucker > > Now that the infrastructure changes are in place, enable virtio-iommu to > be built as a module. Remove the redundant pci_request_acs() call, since > it's not exported but is already invoked

Re: [PATCH 23/62] x86/idt: Move IDT to data segment

2020-02-19 Thread Jürgen Groß
On 19.02.20 11:42, Joerg Roedel wrote: Hi Jürgen, On Wed, Feb 12, 2020 at 05:28:21PM +0100, Jürgen Groß wrote: Xen-PV is clearing BSS as the very first action. In the kernel image? Or in the ELF loader before jumping to the kernel image? In the kernel image. See arch/x86/xen/xen-head.S -

Re: [PATCH 23/62] x86/idt: Move IDT to data segment

2020-02-19 Thread Joerg Roedel
Hi Jürgen, On Wed, Feb 12, 2020 at 05:28:21PM +0100, Jürgen Groß wrote: > Xen-PV is clearing BSS as the very first action. In the kernel image? Or in the ELF loader before jumping to the kernel image? Regards, Joerg ___ Virtualization mailing

[PATCH 29/52] drm/bochs: Drop explicit drm_mode_config_cleanup

2020-02-19 Thread Daniel Vetter
Instead rely on the automatic clean, for which we just need to check that drm_mode_config_init succeeded. To avoid an inversion in the cleanup we also have to move the dev_private allocation over to drmm_kzalloc. Signed-off-by: Daniel Vetter Cc: Gerd Hoffmann Cc:

[PATCH 31/52] drm/cirrus: Fully embrace devm_

2020-02-19 Thread Daniel Vetter
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc:

[PATCH 30/52] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-02-19 Thread Daniel Vetter
We can even delete the drm_driver.release hook now! Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: virtualization@lists.linux-foundation.org --- drivers/gpu/drm/cirrus/cirrus.c | 21

[PATCH 08/52] drm/qxl: Use drmm_add_final_kfree

2020-02-19 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

[PATCH 10/52] drm/cirrus: Use drmm_add_final_kfree

2020-02-19 Thread Daniel Vetter
With this we can drop the final kfree from the release function. I also noticed that cirrus forgot to call drm_dev_fini(). v2: Don't call kfree(cirrus) after we've handed overship of that to drm_device and the drmm_ stuff. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc:

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-19 Thread Jürgen Groß
On 19.02.20 10:22, Thomas Gleixner wrote: Jürgen Groß writes: On 18.02.20 22:03, Thomas Gleixner wrote: BTW, why isn't stuff like this not catched during next or at least before the final release? Is nothing running CI on upstream with all that XEN muck active? This problem showed up by not

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-19 Thread Thomas Gleixner
Jürgen Groß writes: > On 18.02.20 22:03, Thomas Gleixner wrote: >> BTW, why isn't stuff like this not catched during next or at least >> before the final release? Is nothing running CI on upstream with all >> that XEN muck active? > > This problem showed up by not being able to start the X server

Re: [PATCH] x86/ioperm: add new paravirt function update_io_bitmap

2020-02-19 Thread Jan Beulich
On 19.02.2020 06:35, Jürgen Groß wrote: > On 18.02.20 22:03, Thomas Gleixner wrote: >> Juergen Gross writes: >>> Commit 111e7b15cf10f6 ("x86/ioperm: Extend IOPL config to control >>> ioperm() as well") reworked the iopl syscall to use I/O bitmaps. >>> >>> Unfortunately this broke Xen PV domains