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

2019-04-25 Thread Gerd Hoffmann
This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime import/export callbacks". We have to do the same with qxl, for the same reasons (it breaks DRI3). Drop the WARN_ON_ONCE(). Fixes: f4c34b1e2a37d5676180901fa6ff188bcb6371f8

[PATCH v7 6/6] xfs: disable map_sync for async flush

2019-04-25 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta --- fs/xfs/xfs_file.c | 9 ++--- 1 file changed, 6

[PATCH v7 4/6] dax: check synchronous mapping is supported

2019-04-25 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj

[PATCH v7 5/6] ext4: disable map_sync for async flush

2019-04-25 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10 ++

[PATCH v7 3/6] libnvdimm: add dax_dev sync flag

2019-04-25 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c| 2 +-

[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-04-25 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' driver can reserve this into

[PATCH v7 1/6] libnvdimm: nd_region flush callback support

2019-04-25 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host

[PATCH v7 0/6] virtio pmem driver

2019-04-25 Thread Pankaj Gupta
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 flush mechanism. Sharing guest kernel driver in this patchset with the changes

[PATCH v4 4/4] vmw_balloon: Split refused pages

2019-04-25 Thread Nadav Amit via Virtualization
The hypervisor might refuse to inflate pages. While the balloon driver handles this scenario correctly, a refusal to inflate a 2MB pages might cause the same page to be allocated again later just for its inflation to be refused again. This wastes energy and time. To avoid this situation, split

[PATCH v4 2/4] vmw_balloon: Compaction support

2019-04-25 Thread Nadav Amit via Virtualization
Add support for compaction for VMware balloon. Since unlike the virtio balloon, we also support huge-pages, which are not going through compaction, we keep these pages in vmballoon and handle this list separately. We use the same lock to protect both lists, as this lock is not supposed to be

[PATCH v4 3/4] vmw_balloon: Add memory shrinker

2019-04-25 Thread Nadav Amit via Virtualization
Add a shrinker to the VMware balloon to prevent out-of-memory events. We reuse the deflate logic for this matter. Deadlocks should not happen, as no memory allocation is performed while the locks of the communication (batch/page) and page-list are taken. In the unlikely event in which the

[PATCH v4 1/4] mm/balloon_compaction: List interfaces

2019-04-25 Thread Nadav Amit via Virtualization
Introduce interfaces for ballooning enqueueing and dequeueing of a list of pages. These interfaces reduce the overhead of storing and restoring IRQs by batching the operations. In addition they do not panic if the list of pages is empty. Cc: Jason Wang Cc: linux...@kvack.org Cc:

[PATCH v4 0/4] vmw_balloon: Compaction and shrinker support

2019-04-25 Thread Nadav Amit via Virtualization
VMware balloon enhancements: adding support for memory compaction, memory shrinker (to prevent OOM) and splitting of refused pages to prevent recurring inflations. Patches 1-2: Support for compaction Patch 3: Support for memory shrinker - disabled by default Patch 4: Split refused pages to

Re: [PATCH v3 1/4] mm/balloon_compaction: list interfaces

2019-04-25 Thread Nadav Amit via Virtualization
> On Apr 24, 2019, at 6:49 AM, Michael S. Tsirkin wrote: > > On Tue, Apr 23, 2019 at 04:45:28PM -0700, Nadav Amit wrote: >> Introduce interfaces for ballooning enqueueing and dequeueing of a list >> of pages. These interfaces reduce the overhead of storing and restoring >> IRQs by batching the

Re: [PATCH net] vhost_net: fix possible infinite loop

2019-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2019 at 03:33:19AM -0400, Jason Wang wrote: > When the rx buffer is too small for a packet, we will discard the vq > descriptor and retry it for the next packet: > > while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, > _intr)))

[PATCH net] vhost_net: fix possible infinite loop

2019-04-25 Thread Jason Wang
When the rx buffer is too small for a packet, we will discard the vq descriptor and retry it for the next packet: while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, _intr))) { ... /* On overrun, truncate and discard */ if