Re: [PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 11:35:52AM +0100, Miguel Ojeda wrote: > On Tue, Jan 8, 2019 at 6:44 PM Nick Desaulniers > wrote: > > > > Also for more context, see: > > commit 7829fb09a2b4 ("lib: make memzero_explicit more robust against > > dead store elimination") > > By the way, shouldn't that

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

2019-01-09 Thread Dave Chinner
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 flush

Re: [PATCH] virtio-ccw: wire up ->bus_name callback

2019-01-09 Thread Cornelia Huck
On Thu, 3 Jan 2019 15:11:45 +0100 Cornelia Huck wrote: > Return the bus id of the ccw proxy device. This makes 'ethtool -i' > show a more useful value than 'virtio' in the bus-info field. > > Signed-off-by: Cornelia Huck > --- > drivers/s390/virtio/virtio_ccw.c | 8 > 1 file

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

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 07:22:50PM +0100, Christian Borntraeger wrote: > > On 09.01.2019 15:52, Michael S. Tsirkin wrote: > > On Wed, Jan 09, 2019 at 01:07:16PM +0100, Christian Borntraeger wrote: > >> On 09.01.2019 11:35, Wei Wang wrote: > >>> On 01/08/2019 04:46 PM, Christian Borntraeger wrote:

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

2019-01-09 Thread Christian Borntraeger
On 09.01.2019 15:52, Michael S. Tsirkin wrote: > On Wed, Jan 09, 2019 at 01:07:16PM +0100, Christian Borntraeger wrote: >> On 09.01.2019 11:35, Wei Wang wrote: >>> On 01/08/2019 04:46 PM, Christian Borntraeger wrote: On 08.01.2019 06:35, Wei Wang wrote: > On 01/07/2019 09:49 PM,

Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Alex Deucher
On Wed, Jan 9, 2019 at 12:36 PM Daniel Vetter wrote: > > On Wed, Jan 9, 2019 at 3:54 PM Gerd Hoffmann wrote: > > > > On Wed, Jan 09, 2019 at 11:10:44AM +0100, Daniel Vetter wrote: > > > On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote: > > > > The buffer object must be reserved

Re: [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_BUFFERED' flag which is set > > for virtio pmem corresponding nd_region. This later > > is used to disable MAP_SYNC functionality for ext4 > > & xfs filesystem. > > > > Signed-off-by: Pankaj Gupta > > --- > > drivers/dax/super.c | 17 + >

Re: [PATCH v1 2/2] virtio: don't allocate vqs when names[i] = NULL

2019-01-09 Thread Christian Borntraeger
Cc: sta...@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") On 28.12.2018 03:26, Wei Wang wrote: > Some vqs may not need to be allocated when their related feature bits > are disabled. So callers may pass in such vqs with "names = NULL". > Then we skip such

Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Daniel Vetter
On Wed, Jan 9, 2019 at 3:54 PM Gerd Hoffmann wrote: > > On Wed, Jan 09, 2019 at 11:10:44AM +0100, Daniel Vetter wrote: > > On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote: > > > The buffer object must be reserved before calling > > > ttm_bo_validate for pinning/unpinning. > > > > >

Re: [PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 11:35:52AM +0100, Miguel Ojeda wrote: > On Tue, Jan 8, 2019 at 6:44 PM Nick Desaulniers > wrote: > > > > Also for more context, see: > > commit 7829fb09a2b4 ("lib: make memzero_explicit more robust against > > dead store elimination") > > By the way, shouldn't that

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

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 01:07:16PM +0100, Christian Borntraeger wrote: > On 09.01.2019 11:35, Wei Wang wrote: > > On 01/08/2019 04:46 PM, Christian Borntraeger wrote: > >> > >> On 08.01.2019 06:35, Wei Wang wrote: > >>> On 01/07/2019 09:49 PM, Christian Borntraeger wrote: > On 07.01.2019

Re: [PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > On Wed 09-01-19 19:26:05, Pankaj Gupta wrote: > > 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 > ... > > @@ -371,6 +373,13 @@ static int ext4_file_mmap(struct file

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

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

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 06:35:01PM +0800, Wei Wang wrote: > On 01/08/2019 04:46 PM, Christian Borntraeger wrote: > > > > On 08.01.2019 06:35, Wei Wang wrote: > > > On 01/07/2019 09:49 PM, Christian Borntraeger wrote: > > > > On 07.01.2019 08:01, Wei Wang wrote: > > > > > virtio-ccw has deadlock

[PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c| 3 +++

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

2019-01-09 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 v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-09 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 v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 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

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

2019-01-09 Thread Pankaj Gupta
Please ignore this series as my network went down while sending this. I will send this series again. Thanks, Pankaj > > 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

Re: [PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Jan Kara
On Wed 09-01-19 19:26:05, Pankaj Gupta wrote: > 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 ... > @@ -371,6 +373,13 @@ static int ext4_file_mmap(struct file *file, struct >

Re: [PATCH] virtio:linux:kernel:NULL check after kmalloc is needed

2019-01-09 Thread Michael S. Tsirkin
On Tue, Jan 08, 2019 at 01:40:33PM +0800, Yi Wang wrote: > From: "huang.zijiang" > > NULL check is needed because kmalloc maybe return NULL. > > Signed-off-by: huang.zijiang Can't hurt I will queue it. > --- > tools/virtio/linux/kernel.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff

Re: [PATCH net-next V2 1/3] virtio: introduce in order feature bit

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 04:05:28PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang > --- > include/uapi/linux/virtio_config.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/include/uapi/linux/virtio_config.h > b/include/uapi/linux/virtio_config.h > index

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

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

2019-01-09 Thread Michael S. Tsirkin
On Wed, Jan 09, 2019 at 03:29:47PM +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 v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Daniel Vetter
On Wed, Jan 9, 2019 at 9:52 PM Gerd Hoffmann wrote: > > Hi, > > > > If I understand things correctly it is valid to set all import/export > > > callbacks (prime_handle_to_fd, prime_fd_to_handle, > > > gem_prime_get_sg_table, gem_prime_import_sg_table) to NULL when not > > > supporting dma-buf

Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Gerd Hoffmann
Hi, > > If I understand things correctly it is valid to set all import/export > > callbacks (prime_handle_to_fd, prime_fd_to_handle, > > gem_prime_get_sg_table, gem_prime_import_sg_table) to NULL when not > > supporting dma-buf import/export and still advertise DRIVER_PRIME to > > indicate the

Re: [PATCH net-next V2 0/3] basic in order support for vhost_net

2019-01-09 Thread Jason Wang
On 2019/1/9 下午4:05, Jason Wang wrote: Hi: This series implement basic in order feature support for vhost_net. This feature requires both driver and device to use descriptors in order which can simplify the implementation and optimizaton for both side. The series also implement a simple

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

2019-01-09 Thread Christian Borntraeger
On 09.01.2019 11:35, Wei Wang wrote: > On 01/08/2019 04:46 PM, Christian Borntraeger wrote: >> >> On 08.01.2019 06:35, Wei Wang wrote: >>> On 01/07/2019 09:49 PM, Christian Borntraeger wrote: On 07.01.2019 08:01, Wei Wang wrote: > virtio-ccw has deadlock issues with reading the config

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

2019-01-09 Thread Wei Wang
On 01/08/2019 04:46 PM, Christian Borntraeger wrote: On 08.01.2019 06:35, Wei Wang wrote: On 01/07/2019 09:49 PM, 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

Re: [PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > 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 | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/fs/xfs/xfs_file.c

Re: [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Dan Williams
On Wed, Jan 9, 2019 at 5:53 AM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_BUFFERED' flag which is set > for virtio pmem corresponding nd_region. This later > is used to disable MAP_SYNC functionality for ext4 > & xfs filesystem. > > Signed-off-by: Pankaj Gupta > --- > drivers/dax/super.c

Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Daniel Vetter
On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote: > The buffer object must be reserved before calling > ttm_bo_validate for pinning/unpinning. > > Signed-off-by: Gerd Hoffmann Seems a bit a bisect fumble in your series here: legacy kms code reserved the ttm bo before calling

Re: [PATCH v1 1/2] virtio_pci: use queue idx instead of array idx to set up the vq

2019-01-09 Thread Christian Borntraeger
Cc: sta...@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") On 28.12.2018 03:26, Wei Wang wrote: > When find_vqs, there will be no vq[i] allocation if its corresponding > names[i] is NULL. For example, the caller may pass in names[i] (i=4) > with names[2]

Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-09 Thread Gerd Hoffmann
On Wed, Jan 09, 2019 at 11:10:44AM +0100, Daniel Vetter wrote: > On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote: > > The buffer object must be reserved before calling > > ttm_bo_validate for pinning/unpinning. > > > > Signed-off-by: Gerd Hoffmann > > Seems a bit a bisect fumble

[PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c| 3 +++

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

2019-01-09 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 v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 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 v3 0/5] kvm "virtio pmem" device

2019-01-09 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

Re: [PATCH v2 03/15] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks.

2019-01-09 Thread Daniel Vetter
On Tue, Jan 08, 2019 at 12:25:07PM +0100, Gerd Hoffmann wrote: > Conversion to atomic modesetting, step one. > Add atomic crtc helper callbacks. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/bochs/bochs_kms.c | 25 + > 1 file changed, 25 insertions(+) > >

Re: [PATCH] qxl: Use struct_size() in kzalloc()

2019-01-09 Thread Gerd Hoffmann
On Tue, Jan 08, 2019 at 10:21:52AM -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding the > size of a structure that has a zero-sized array at the end, along with memory > for some number of elements for that array. For example: > > struct

Re: [PATCH v2] drm/virtio: Drop deprecated load/unload initialization

2019-01-09 Thread Gerd Hoffmann
On Tue, Jan 08, 2019 at 11:59:30AM -0300, Ezequiel Garcia wrote: > Move the code around so the driver is probed the bus > .probe and removed from the bus .remove callbacks. > This commit is just a cleanup and shouldn't affect > functionality. That one works. thanks, Gerd

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

2019-01-09 Thread Christian Borntraeger
Adding Peter, is this the same problem that you reported me today? Can you test Zha Bins patch? Christian On 08.01.2019 09:07, Zha Bin wrote: > 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.

[PATCH net-next V2 3/3] vhost: don't touch avail ring if in_order is negotiated

2019-01-09 Thread Jason Wang
Device use descriptors table in order, so there's no need to read index from available ring. This eliminate the cache contention on available ring completely. Virito-user + vhost_kernel + XDP_DROP on 2.60GHz Broadwell Before /After SMAP on: 4.8Mpps 5.3Mpps(+10%) SMAP off: 6.6Mpps

[PATCH net-next V2 2/3] vhost_net: support in order feature

2019-01-09 Thread Jason Wang
This makes vhost_net to support in order feature. This is as simple as use datacopy path when it was negotiated. An alternative is not to advertise in order when zerocopy is enabled which tends to be suboptimal consider zerocopy may suffer from e.g HOL issues. Signed-off-by: Jason Wang ---

[PATCH net-next V2 1/3] virtio: introduce in order feature bit

2019-01-09 Thread Jason Wang
Signed-off-by: Jason Wang --- include/uapi/linux/virtio_config.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 1196e1c1d4f6..2698e069ed9e 100644 --- a/include/uapi/linux/virtio_config.h +++

[PATCH net-next V2 0/3] basic in order support for vhost_net

2019-01-09 Thread Jason Wang
Hi: This series implement basic in order feature support for vhost_net. This feature requires both driver and device to use descriptors in order which can simplify the implementation and optimizaton for both side. The series also implement a simple optimization that avoid read available ring.