[PATCH v4 11/16] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()

2019-01-16 Thread Gerd Hoffmann
It's always NULL, so just remove it. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 2 +- drivers/gpu/drm/bochs/bochs_fbdev.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +-

[PATCH v4 12/16] drm/bochs: move ttm_bo_(un)reserve calls into bochs_bo_{pin, unpin}

2019-01-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_fbdev.c | 8 drivers/gpu/drm/bochs/bochs_kms.c | 14 +- drivers/gpu/drm/bochs/bochs_mm.c| 8 3 files changed, 9 insertions(+), 21 deletions(-) diff --git

[PATCH v4 04/16] drm/bochs: atomic: add mode_set_nofb callback.

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step two. Add mode_set_nofb crtc helper callback. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v4 14/16] drm/bochs: switch to generic drm fbdev emulation

2019-01-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_drv.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index a3f4e21078..cea42ac64d 100644 ---

[PATCH net V4] vhost: log dirty page correctly

2019-01-16 Thread Jason Wang
Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve this issue, when logging with device IOTLB enabled, we will: 1) reuse the device IOTLB translation result of

Re: [PATCH v3 2/3] virtio-balloon: improve update_balloon_size_func

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 07, 2019 at 03:01:05PM +0800, Wei Wang wrote: > There is no need to update the balloon actual register when there is no > ballooning request. This patch avoids update_balloon_size when diff is 0. > > Signed-off-by: Wei Wang > Reviewed-by: Cornelia Huck > Reviewed-by: Halil Pasic

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dave Chinner
On Mon, Jan 14, 2019 at 01:35:57PM -0800, Dan Williams wrote: > On Mon, Jan 14, 2019 at 1:25 PM Dave Chinner wrote: > > > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > multiple guests.

[PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Gerd Hoffmann
Add a helper functions to check video modes. Also add a helper to check framebuffer buffer objects, using the former for consistency. That way we should not fail in qxl_primary_atomic_check() because video modes which are too big will not be added to the mode list in the first place.

Re: [PATCH v3 1/3] virtio-balloon: tweak config_changed implementation

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 07, 2019 at 02:49:03PM +0100, Christian Borntraeger wrote: > > > On 07.01.2019 08:01, Wei Wang wrote: > > virtio-ccw has deadlock issues with reading the config space inside the > > interrupt context, so we tweak the virtballoon_changed implementation > > by moving the config read

Re: [PATCH 1/3] swiotlb: Export maximum allocation size

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 14, 2019 at 03:49:07PM -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 11, 2019 at 10:12:31AM +0100, Joerg Roedel wrote: > > On Thu, Jan 10, 2019 at 12:02:05PM -0500, Konrad Rzeszutek Wilk wrote: > > > Why not use swiotlb_nr_tbl ? That is how drivers/gpu/drm use to figure if > > >

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 14, 2019 at 09:19:35PM +0100, Christoph Hellwig wrote: > > Christoph is saying that !IOMMU_PLATFORM devices should hide the > > compatibility code in a special per-device DMA API implementation. > > Which would be fine especially if we can manage not to introduce a bunch > > of

Re: [PATCH 1/3] swiotlb: Export maximum allocation size

2019-01-16 Thread Konrad Rzeszutek Wilk
On Fri, Jan 11, 2019 at 10:12:31AM +0100, Joerg Roedel wrote: > On Thu, Jan 10, 2019 at 12:02:05PM -0500, Konrad Rzeszutek Wilk wrote: > > Why not use swiotlb_nr_tbl ? That is how drivers/gpu/drm use to figure if > > they > > need to limit the size of pages. > > That function just exports the

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dave Chinner
On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > Until you have images (and hence host page cache) shared between > > > multiple guests. People will want to do this, because it means they > > > only need a single set of pages in host memory for executable > > > binaries

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dan Williams
On Mon, Jan 14, 2019 at 1:25 PM Dave Chinner wrote: > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > Until you have images (and hence host page cache) shared between > > > > multiple guests. People will want to do this, because it means they > > > > only need a single

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Christoph Hellwig
On Mon, Jan 14, 2019 at 07:12:08PM +, Robin Murphy wrote: > Now, in theory, yes, the real issue at hand is not unique to virtio-blk nor > SEV - any driver whose device has a sufficiently large DMA segment size and > who manages to get sufficient physically-contiguous memory could >

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 14, 2019 at 07:12:08PM +, Robin Murphy wrote: > On 14/01/2019 18:20, Michael S. Tsirkin wrote: > > On Mon, Jan 14, 2019 at 08:41:37PM +0800, Jason Wang wrote: > > > > > > On 2019/1/14 下午5:50, Christoph Hellwig wrote: > > > > On Mon, Jan 14, 2019 at 05:41:56PM +0800, Jason Wang

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Christoph Hellwig
On Mon, Jan 14, 2019 at 01:20:45PM -0500, Michael S. Tsirkin wrote: > I don't think so - the issue is really that DMA API does not yet handle > the SEV case 100% correctly. I suspect passthrough devices would have > the same issue. The DMA API handles the SEV case perfectly. Its just that

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Robin Murphy
On 14/01/2019 18:20, Michael S. Tsirkin wrote: On Mon, Jan 14, 2019 at 08:41:37PM +0800, Jason Wang wrote: On 2019/1/14 下午5:50, Christoph Hellwig wrote: On Mon, Jan 14, 2019 at 05:41:56PM +0800, Jason Wang wrote: On 2019/1/11 下午5:15, Joerg Roedel wrote: On Fri, Jan 11, 2019 at 11:29:31AM

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Michael S. Tsirkin
On Mon, Jan 14, 2019 at 08:41:37PM +0800, Jason Wang wrote: > > On 2019/1/14 下午5:50, Christoph Hellwig wrote: > > On Mon, Jan 14, 2019 at 05:41:56PM +0800, Jason Wang wrote: > > > On 2019/1/11 下午5:15, Joerg Roedel wrote: > > > > On Fri, Jan 11, 2019 at 11:29:31AM +0800, Jason Wang wrote: > > > >

Re: [PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-16 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 08:17:33PM +0530, Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range

Re: [PATCH net V3] vhost: log dirty page correctly

2019-01-16 Thread Michael S. Tsirkin
On Fri, Jan 11, 2019 at 12:00:36PM +0800, Jason Wang wrote: > Vhost dirty page logging API is designed to sync through GPA. But we > try to log GIOVA when device IOTLB is enabled. This is wrong and may > lead to missing data after migration. > > To solve this issue, when logging with device IOTLB

RE: [PATCH] VMCI: Verify PPNs before sending to device

2019-01-16 Thread Jorgen S. Hansen via Virtualization
> -Original Message- > From: Jorgen Hansen [mailto:jhan...@vmware.com] > Sent: Friday, January 11, 2019 8:58 AM > To: linux-ker...@vger.kernel.org; virtualization@lists.linux-foundation.org > Cc: gre...@linuxfoundation.org; Pv-drivers ; > Jorgen S. Hansen > Subject: [PATCH] VMCI: Verify

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Jan Kara
On Sat 12-01-19 21:17:46, Pankaj Gupta wrote: > > > > Right. Thinking about this I would be more concerned about the fact that > > > > guest can effectively pin amount of host's page cache upto size of the > > > > device/file passed to guest as PMEM, can't it Pankaj? Or is there some > > > > QEMU

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Christoph Hellwig
On Mon, Jan 14, 2019 at 05:41:56PM +0800, Jason Wang wrote: > > On 2019/1/11 下午5:15, Joerg Roedel wrote: >> On Fri, Jan 11, 2019 at 11:29:31AM +0800, Jason Wang wrote: >>> Just wonder if my understanding is correct IOMMU_PLATFORM must be set for >>> all virtio devices under AMD-SEV guests? >> Yes,

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Jason Wang
On 2019/1/14 下午5:50, Christoph Hellwig wrote: On Mon, Jan 14, 2019 at 05:41:56PM +0800, Jason Wang wrote: On 2019/1/11 下午5:15, Joerg Roedel wrote: On Fri, Jan 11, 2019 at 11:29:31AM +0800, Jason Wang wrote: Just wonder if my understanding is correct IOMMU_PLATFORM must be set for all virtio

Re: [PATCH 1/2] virtio: fix virtio_config_ops description

2019-01-16 Thread Cornelia Huck
On Thu, 3 Jan 2019 17:08:03 +0100 Cornelia Huck wrote: > - get_features has returned 64 bits since commit d025477368792 > ("virtio: add support for 64 bit features.") > - properly mark all optional callbacks > > Signed-off-by: Cornelia Huck > --- > include/linux/virtio_config.h | 8

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > Right. Thinking about this I would be more concerned about the fact > > > > > that > > > > > guest can effectively pin amount of host's page cache upto size of > > > > > the > > > > > device/file passed to guest as PMEM, can't it Pankaj? Or is there > > > > > some > > > > > QEMU > > >

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Jason Wang
On 2019/1/11 下午5:15, Joerg Roedel wrote: On Fri, Jan 11, 2019 at 11:29:31AM +0800, Jason Wang wrote: Just wonder if my understanding is correct IOMMU_PLATFORM must be set for all virtio devices under AMD-SEV guests? Yes, that is correct. Emulated DMA can only happen on the SWIOTLB aperture,

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dave Chinner
On Fri, Jan 11, 2019 at 02:45:04AM -0500, Pankaj Gupta wrote: > > > > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > This patch series has implementation for "virtio pmem". > > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > > which allows to bypass the

Re: [PATCH] drm/cirrus: fix connector leak at unload

2019-01-16 Thread Gerd Hoffmann
On Fri, Jan 11, 2019 at 11:16:38PM +0100, Daniel Vetter wrote: > On Fri, Jan 11, 2019 at 11:06:20PM +0100, Daniel Vetter wrote: > > On Fri, Jan 11, 2019 at 09:02:34AM -0500, Rob Clark wrote: > > > This fixes an '*ERROR* connector VGA-2 leaked!' splat at driver unload. > > > > > > Signed-off-by:

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dave Chinner
On Sun, Jan 13, 2019 at 03:38:21PM -0800, Matthew Wilcox wrote: > On Mon, Jan 14, 2019 at 10:29:02AM +1100, Dave Chinner wrote: > > Until you have images (and hence host page cache) shared between > > multiple guests. People will want to do this, because it means they > > only need a single set of

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Matthew Wilcox
On Mon, Jan 14, 2019 at 10:29:02AM +1100, Dave Chinner wrote: > Until you have images (and hence host page cache) shared between > multiple guests. People will want to do this, because it means they > only need a single set of pages in host memory for executable > binaries rather than a set of

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > Until you have images (and hence host page cache) shared between > > multiple guests. People will want to do this, because it means they > > only need a single set of pages in host memory for executable > > binaries rather than a set of pages per guest. Then you have > > multiple guests

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > > > > > > > > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > > > This patch series has implementation for "virtio pmem". > > > > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > > > > which

Re: [PATCH] drm/cirrus: fix connector leak at unload

2019-01-16 Thread Daniel Vetter
On Fri, Jan 11, 2019 at 11:06:20PM +0100, Daniel Vetter wrote: > On Fri, Jan 11, 2019 at 09:02:34AM -0500, Rob Clark wrote: > > This fixes an '*ERROR* connector VGA-2 leaked!' splat at driver unload. > > > > Signed-off-by: Rob Clark > > --- > > Similar case to the issue that was fixed recently

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > This patch series has implementation for "virtio pmem". > > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > > which allows to bypass the guest page cache.

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dan Williams
On Sat, Jan 12, 2019 at 5:38 PM Pankaj Gupta wrote: > > > > > > > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > > This patch series has implementation for "virtio pmem". > > > > "virtio pmem" is fake persistent

Re: [PATCH] drm/cirrus: fix connector leak at unload

2019-01-16 Thread Daniel Vetter
On Fri, Jan 11, 2019 at 09:02:34AM -0500, Rob Clark wrote: > This fixes an '*ERROR* connector VGA-2 leaked!' splat at driver unload. > > Signed-off-by: Rob Clark > --- > Similar case to the issue that was fixed recently in drm/ast Reviewed-by: Daniel Vetter > >

Re: [PATCH] vhost/vsock: fix vhost vsock cid hashing inconsistent

2019-01-16 Thread David Miller
From: Zha Bin Date: Tue, 8 Jan 2019 16:07:03 +0800 > The vsock core only supports 32bit CID, but the Virtio-vsock spec define > CID (dst_cid and src_cid) as u64 and the upper 32bits is reserved as > zero. This inconsistency causes one bug in vhost vsock driver. The > scenarios is: > > 0. A

Re: [PATCH] drm/qxl: drop prime import/export callbacks

2019-01-16 Thread Dave Airlie
On Thu, 10 Jan 2019 at 18:17, Gerd Hoffmann wrote: > > Also set prime_handle_to_fd and prime_fd_to_handle to NULL, > so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to > userspace. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie > --- > drivers/gpu/drm/qxl/qxl_drv.c | 4

Re: [PATCH] drm/virtio: drop prime import/export callbacks

2019-01-16 Thread Dave Airlie
On Thu, 10 Jan 2019 at 21:16, Gerd Hoffmann wrote: > > Also set prime_handle_to_fd and prime_fd_to_handle to NULL, > so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to > userspace. Reviewed-by: Dave Airlie > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/virtio/virtgpu_drv.h

[PATCH] VMCI: Verify PPNs before sending to device

2019-01-16 Thread Jorgen Hansen via Virtualization
The current version of the VMCI device only supports 32 bit PPNs, so check whether we are truncating PPNs, and fail the operation if we do. One such check did exist, but was wrong. Another check was missing. Testing through code modification: constructed PPN not representable by 32-bit and

Re: [Intel-gfx] [PATCH 7/7] drm: Split out drm_probe_helper.h

2019-01-16 Thread Daniel Vetter
On Tue, Dec 18, 2018 at 10:27:47AM +0100, Benjamin Gaignard wrote: > Le lun. 17 déc. 2018 à 21:48, Rodrigo Vivi a écrit : > > > > On Mon, Dec 17, 2018 at 08:43:03PM +0100, Daniel Vetter wrote: > > > Having the probe helper stuff (which pretty much everyone needs) in > > > the drm_crtc_helper.h

Re: [PATCH v6 0/7] Add virtio-iommu driver

2019-01-16 Thread Jean-Philippe Brucker
On 11/01/2019 12:28, Joerg Roedel wrote: > Hi Jean-Philippe, > > On Thu, Dec 13, 2018 at 12:50:29PM +, Jean-Philippe Brucker wrote: >> We already do deferred flush: UNMAP requests are added to the queue by >> iommu_unmap(), and then flushed out by iotlb_sync(). So we switch to the >> host

Re: [PATCH v6 0/7] Add virtio-iommu driver

2019-01-16 Thread Joerg Roedel
Hi Jean-Philippe, On Thu, Dec 13, 2018 at 12:50:29PM +, Jean-Philippe Brucker wrote: > We already do deferred flush: UNMAP requests are added to the queue by > iommu_unmap(), and then flushed out by iotlb_sync(). So we switch to the > host only on iotlb_sync(), or when the request queue is

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Joerg Roedel
On Fri, Jan 11, 2019 at 11:29:31AM +0800, Jason Wang wrote: > Just wonder if my understanding is correct IOMMU_PLATFORM must be set for > all virtio devices under AMD-SEV guests? Yes, that is correct. Emulated DMA can only happen on the SWIOTLB aperture, because that memory is not encrypted. The

Re: [PATCH 1/3] swiotlb: Export maximum allocation size

2019-01-16 Thread Joerg Roedel
On Thu, Jan 10, 2019 at 12:02:05PM -0500, Konrad Rzeszutek Wilk wrote: > Why not use swiotlb_nr_tbl ? That is how drivers/gpu/drm use to figure if they > need to limit the size of pages. That function just exports the overall size of the swiotlb aperture, no? What I need here is the maximum size

Re: [RFC PATCH V3 0/5] Hi:

2019-01-16 Thread Jason Wang
On 2019/1/8 下午6:12, Jason Wang wrote: On 2019/1/7 下午10:47, Michael S. Tsirkin wrote: On Mon, Jan 07, 2019 at 02:58:08PM +0800, Jason Wang wrote: On 2019/1/5 上午5:41, Michael S. Tsirkin wrote: On Sat, Dec 29, 2018 at 08:46:51PM +0800, Jason Wang wrote: This series tries to access virtqueue

[PATCH v4 05/16] drm/bochs: atomic: switch planes to atomic, wire up helpers.

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step three. Wire up atomic helpers. Switch planes to atomic. We are late to the party, the transitional helpers are gone, so this can't be splitted into smaller steps any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > This patch series has implementation for "virtio pmem". > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > which allows to bypass the guest page cache. This also > > implements a VIRTIO based asynchronous

[PATCH v4 10/16] drm/bochs: remove old bochs_crtc_* functions

2019-01-16 Thread Gerd Hoffmann
Remove the old, now unused crtc callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 81 --- 1 file changed, 81 deletions(-) diff --git

[PATCH v4 08/16] drm/bochs: atomic: use suspend/resume helpers

2019-01-16 Thread Gerd Hoffmann
Switch to atomic helpers: drm_mode_config_helper_suspend/resume(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index

[PATCH v4 15/16] drm/bochs: drop old fbdev emulation code

2019-01-16 Thread Gerd Hoffmann
Not needed any more, bochs uses the generic emulation now. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 9 --- drivers/gpu/drm/bochs/bochs_fbdev.c | 129 2 files

[PATCH v4 16/16] drm/bochs: move remaining fb bits to kms

2019-01-16 Thread Gerd Hoffmann
bochs_fbdev.c is almost empty now. Move the remaining framebuffer bits over to bochs_kms.c. Pure code motion. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_fbdev.c | 29

[PATCH v4 09/16] drm/bochs: atomic: set DRIVER_ATOMIC

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, final step. Set the DRIVER_ATOMIC flag. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 03/16] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks.

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step one. Add atomic crtc helper callbacks. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c

[PATCH v4 02/16] drm/bochs: split bochs_hw_setmode

2019-01-16 Thread Gerd Hoffmann
Create a separate bochs_hw_setformat function to configure the framebuffer format (actually just the byteorder). Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 5 +++-- drivers/gpu/drm/bochs/bochs_hw.c | 19

[PATCH v4 13/16] drm/bochs: add basic prime support

2019-01-16 Thread Gerd Hoffmann
Just enough to make the generic framebuffer emulation happy. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 7 ++ drivers/gpu/drm/bochs/bochs_drv.c | 11 - drivers/gpu/drm/bochs/bochs_mm.c | 49

[PATCH v4 01/16] drm/bochs: encoder cleanup

2019-01-16 Thread Gerd Hoffmann
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 26 -- 1 file changed, 26 deletions(-)

[PATCH v4 07/16] drm/bochs: atomic: use atomic page_flip helper

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step five. Use atomic page_flip helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-)

[PATCH v4 06/16] drm/bochs: atomic: use atomic set_config helper

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next] virtio_net: bulk free tx skbs

2019-01-16 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 14 Jan 2019 20:34:26 -0500 > Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is > safe to call in a non-napi context as long as the napi_budget flag is > correct. > > Signed-off-by: Michael S. Tsirkin > --- > > My perf testing setup

Re: [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Sam Ravnborg
Hi Daniel. > v5: Actually try to sort them, and while at it, sort all the ones I > touch. Applied this variant on top of drm-misc and did a build test. Looked good for ia64, x86 and alpha. Took a closer look at the changes to atmel_hlcd - and they looked OK. But I noticed that atmel_hlcdc uses

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 02:20:19PM +0100, Christoph Hellwig wrote: > On Tue, Jan 15, 2019 at 09:37:42AM +0100, Joerg Roedel wrote: > > On Mon, Jan 14, 2019 at 01:20:45PM -0500, Michael S. Tsirkin wrote: > > > Which would be fine especially if we can manage not to introduce a bunch > > > of

[PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Daniel Vetter
Having the probe helper stuff (which pretty much everyone needs) in the drm_crtc_helper.h file (which atomic drivers should never need) is confusing. Split them out. To make sure I actually achieved the goal here I went through all drivers. And indeed, all atomic drivers are now free of

Re: [PATCH 3/3] virtio-blk: Consider dma_max_mapping_size() for maximum segment size

2019-01-16 Thread Joerg Roedel
On Wed, Jan 16, 2019 at 09:05:40AM -0500, Michael S. Tsirkin wrote: > On Tue, Jan 15, 2019 at 02:22:57PM +0100, Joerg Roedel wrote: > > + max_size = dma_max_mapping_size(>dev); > > + > > > Should this be limited to ACCESS_PLATFORM? > > I see no reason to limit this without as guest can >

[PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Daniel Vetter
Having the probe helper stuff (which pretty much everyone needs) in the drm_crtc_helper.h file (which atomic drivers should never need) is confusing. Split them out. To make sure I actually achieved the goal here I went through all drivers. And indeed, all atomic drivers are now free of

Re: [PATCH 3/3] virtio-blk: Consider dma_max_mapping_size() for maximum segment size

2019-01-16 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 02:22:57PM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Segments can't be larger than the maximum DMA mapping size > supported on the platform. Take that into account when > setting the maximum segment size for a block device. > > Signed-off-by: Joerg Roedel >

Re: [Spice-devel] [PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Daniel Vetter
On Wed, Jan 16, 2019 at 12:28:00PM +0100, Gerd Hoffmann wrote: > > > +static int qxl_check_mode(struct qxl_device *qdev, > > > + unsigned int width, > > > + unsigned int height) > > > +{ > > > + if (width * height * 4 > qdev->vram_size) > > > > Is someone

Re: [Spice-devel] [PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Gerd Hoffmann
> > +static int qxl_check_mode(struct qxl_device *qdev, > > + unsigned int width, > > + unsigned int height) > > +{ > > + if (width * height * 4 > qdev->vram_size) > > Is someone checking for integer overflows already? Need to have a look. This is just

[PATCH 3/3] drm/qxl: use kernel mode db

2019-01-16 Thread Gerd Hoffmann
Add all standard modes from the kernel's video mode data base. Keep a few non-standard modes in the qxl mode list. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git

[PATCH 2/3] drm/qxl: add qxl_add_mode helper function

2019-01-16 Thread Gerd Hoffmann
Add a helper function to add custom video modes to a connector. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 84 +++ 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

Re: [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Alex Deucher
On Tue, Jan 15, 2019 at 5:41 AM Daniel Vetter wrote: > > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here I went through all

Re: [PATCH 2/3] dma: Introduce dma_max_mapping_size()

2019-01-16 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 05:23:22PM +0100, Joerg Roedel wrote: > Right, I thought about that too, but didn't find a generic way to check > for all the cases. There are various checks that could be done: > > 1) Check if SWIOTLB is initialized at all, if not, return > SIZE_MAX as the

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Dave Chinner
On Tue, Jan 15, 2019 at 12:35:06AM -0500, Pankaj Gupta wrote: > > > > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > > multiple guests. People will want to do this, because it

[PATCH 2/3] dma: Introduce dma_max_mapping_size()

2019-01-16 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be mapped using DMA-API functions. The patch also adds the implementation for direct DMA and a new dma_map_ops pointer so that other implementations can expose their limit. Signed-off-by: Joerg Roedel ---

Re: [PATCH 2/3] dma: Introduce dma_max_mapping_size()

2019-01-16 Thread Joerg Roedel
On Tue, Jan 15, 2019 at 02:37:54PM +0100, Christoph Hellwig wrote: > > +size_t dma_direct_max_mapping_size(struct device *dev) > > +{ > > + /* > > +* Return the minimum of the direct DMA limit and the SWIOTLB limit. > > +* Since direct DMA has no limit, it is fine to just return the

Re: [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Laurent Pinchart
Hi Daniel, Thank you for the patch. On Tuesday, 15 January 2019 12:41:37 EET Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I

Re: [PATCH 2/3] dma: Introduce dma_max_mapping_size()

2019-01-16 Thread Christoph Hellwig
> +size_t dma_direct_max_mapping_size(struct device *dev) > +{ > + /* > + * Return the minimum of the direct DMA limit and the SWIOTLB limit. > + * Since direct DMA has no limit, it is fine to just return the SWIOTLB > + * limit. > + */ > + return

[PATCH 0/3 v2] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Joerg Roedel
Hi, here is the second version of my patch-set to fix a DMA mapping size issue triggered by the virtio-blk driver. The problem is a limitation of the SWIOTLB implementation, which does not support allocations larger than 256kb. When the virtio-blk driver tries to read/write a block larger than

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 09:37:42AM +0100, Joerg Roedel wrote: > On Mon, Jan 14, 2019 at 01:20:45PM -0500, Michael S. Tsirkin wrote: > > Which would be fine especially if we can manage not to introduce a bunch > > of indirect calls all over the place and hurt performance. > > Which indirect calls?

[PATCH 3/3] virtio-blk: Consider dma_max_mapping_size() for maximum segment size

2019-01-16 Thread Joerg Roedel
From: Joerg Roedel Segments can't be larger than the maximum DMA mapping size supported on the platform. Take that into account when setting the maximum segment size for a block device. Signed-off-by: Joerg Roedel --- drivers/block/virtio_blk.c | 10 ++ 1 file changed, 6

[PATCH 1/3] swiotlb: Introduce swiotlb_max_mapping_size()

2019-01-16 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be remapped by the SWIOTLB implementation. This function will be later exposed to users through the DMA-API. Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 5 + kernel/dma/swiotlb.c| 5 + 2 files changed,

[PATCH v7 7/7] iommu/virtio: Add event queue

2019-01-16 Thread Jean-Philippe Brucker
The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Tested-by: Bharat Bhushan Tested-by: Eric Auger Reviewed-by: Eric

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Christoph Hellwig
On Mon, Jan 14, 2019 at 03:48:47PM -0500, Michael S. Tsirkin wrote: > I think you are exaggerating a little here. Limited access with e.g. > need to flush caches is common on lower end but less common on higher > end systems used for virtualization. As you point out that changes with > e.g. SEV

Re: [PATCH 1/3] swiotlb: Export maximum allocation size

2019-01-16 Thread Christoph Hellwig
On Mon, Jan 14, 2019 at 04:59:27PM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 14, 2019 at 03:49:07PM -0500, Konrad Rzeszutek Wilk wrote: > > On Fri, Jan 11, 2019 at 10:12:31AM +0100, Joerg Roedel wrote: > > > On Thu, Jan 10, 2019 at 12:02:05PM -0500, Konrad Rzeszutek Wilk wrote: > > > > Why

Re: [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Neil Armstrong
On 15/01/2019 11:41, Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here I went through all > drivers.

[PATCH v7 5/7] iommu: Add virtio-iommu driver

2019-01-16 Thread Jean-Philippe Brucker
The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into

[PATCH v7 6/7] iommu/virtio: Add probe request

2019-01-16 Thread Jean-Philippe Brucker
When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the

[PATCH v7 4/7] PCI: OF: Initialize dev->fwnode appropriately

2019-01-16 Thread Jean-Philippe Brucker
For PCI devices that have an OF node, set the fwnode as well. This way drivers that rely on fwnode don't need the special case described by commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately"). Acked-by: Bjorn Helgaas Signed-off-by: Jean-Philippe Brucker ---

[PATCH v7 3/7] of: Allow the iommu-map property to omit untranslated devices

2019-01-16 Thread Jean-Philippe Brucker
In PCI root complex nodes, the iommu-map property describes the IOMMU that translates each endpoint. On some platforms, the IOMMU itself is presented as a PCI endpoint (e.g. AMD IOMMU and virtio-iommu). This isn't supported by the current OF driver, which expects all endpoints to have an IOMMU.

[PATCH v7 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2019-01-16 Thread Jean-Philippe Brucker
Some systems implement virtio-iommu as a PCI endpoint. The operating system needs to discover the relationship between IOMMU and masters long before the PCI endpoint gets probed. Add a PCI child node to describe the virtio-iommu device. The virtio-pci-iommu is conceptually split between a PCI

[PATCH v7 1/7] dt-bindings: virtio-mmio: Add IOMMU description

2019-01-16 Thread Jean-Philippe Brucker
The nature of a virtio-mmio node is discovered by the virtio driver at probe time. However the DMA relation between devices must be described statically. When a virtio-mmio node is a virtio-iommu device, it needs an "#iommu-cells" property as specified by bindings/iommu/iommu.txt. Otherwise, the

[PATCH v7 0/7] Add virtio-iommu driver

2019-01-16 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver, following specification v0.9 [1]. This is a simple rebase onto Linux v5.0-rc2. We now use the dev_iommu_fwspec_get() helper introduced in v5.0 instead of accessing dev->iommu_fwspec, but there aren't any functional change from v6 [2]. Our current goal for

Re: [PATCH 0/3] Fix virtio-blk issue with SWIOTLB

2019-01-16 Thread Joerg Roedel
On Mon, Jan 14, 2019 at 01:20:45PM -0500, Michael S. Tsirkin wrote: > Which would be fine especially if we can manage not to introduce a bunch > of indirect calls all over the place and hurt performance. Which indirect calls? In case of unset dma_ops the DMA-API functions call directly into the

Re: [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Jani Nikula
On Tue, 15 Jan 2019, Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here I went through all > drivers.

Re: [PATCH net V3] vhost: log dirty page correctly

2019-01-16 Thread Jason Wang
On 2019/1/15 上午2:04, Michael S. Tsirkin wrote: On Fri, Jan 11, 2019 at 12:00:36PM +0800, Jason Wang wrote: Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve

Re: [PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-16 Thread Pankaj Gupta
> > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the persistent memory > > range information so that existing 'nvdimm/pmem'

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > > > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > > multiple guests. People will want to do this, because it means > > > > > > > they > > > > > > > only need a single

Re: [PATCH 1/2] virtio: fix virtio_config_ops description

2019-01-16 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 10:15:39AM +0800, Wei Wang wrote: > On 01/14/2019 10:09 PM, Cornelia Huck wrote: > > On Thu, 3 Jan 2019 17:08:03 +0100 > > Cornelia Huck wrote: > > > > > - get_features has returned 64 bits since commit d025477368792 > > >("virtio: add support for 64 bit features.")

  1   2   >