Re: [PATCH v2 2/4] fuse: Make DAX mount option a tri-state

2021-07-19 Thread JeffleXu
On 7/20/21 2:02 AM, Vivek Goyal wrote: > On Fri, Jul 16, 2021 at 06:47:51PM +0800, Jeffle Xu wrote: >> We add 'always', 'never', and 'inode' (default). '-o dax' continues to >> operate the same which is equivalent to 'always'. >> >> By the time this patch is applied, 'inode' mode is actually

Re: [PATCH v2 0/4] virtiofs,fuse: support per-file DAX

2021-07-19 Thread JeffleXu
On 7/20/21 5:30 AM, Vivek Goyal wrote: > On Fri, Jul 16, 2021 at 06:47:49PM +0800, Jeffle Xu wrote: >> This patchset adds support of per-file DAX for virtiofs, which is >> inspired by Ira Weiny's work on ext4[1] and xfs[2]. >> >> There are three related scenarios: >> 1. Alloc inode: get

Re: [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb

2021-07-19 Thread Jason Wang
在 2021/7/19 下午9:44, Eli Cohen 写道: When calling vringh_init_iotlb(), use the negotiated features which might be different than the supported features. Fixes: 011c35bac5ef ("vdpa_sim: add supported_features field in vdpasim_dev_attr) As Stefano said. It should be 2c53d0f64c06f ("vdpasim:

Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

2021-07-19 Thread Jason Wang
在 2021/7/19 下午12:22, tianxianting 写道: thanks, I checked, actually all virtio drivers have switched to use the helper after this one merged. Ok. Cool. Thanks 在 2021/7/19 上午11:46, Jason Wang 写道: 在 2021/7/16 下午8:46, tianxianting 写道: Do you interest in this patch? just little

Re: [PATCH v2 0/4] virtiofs,fuse: support per-file DAX

2021-07-19 Thread Vivek Goyal
On Fri, Jul 16, 2021 at 06:47:49PM +0800, Jeffle Xu wrote: > This patchset adds support of per-file DAX for virtiofs, which is > inspired by Ira Weiny's work on ext4[1] and xfs[2]. > > There are three related scenarios: > 1. Alloc inode: get per-file DAX flag from fuse_attr.flags. (patch 3) > 2.

Re: [RFC 1/3] cpuidle: add poll_source API

2021-07-19 Thread Marcelo Tosatti
Hi Stefan, On Tue, Jul 13, 2021 at 05:19:04PM +0100, Stefan Hajnoczi wrote: > Introduce an API for adding cpuidle poll callbacks: > > struct poll_source_ops { > void (*start)(struct poll_source *src); > void (*stop)(struct poll_source *src); > void (*poll)(struct poll_source

Re: [PATCH v2 4/4] fuse: support changing per-file DAX flag inside guest

2021-07-19 Thread Vivek Goyal
On Fri, Jul 16, 2021 at 06:47:53PM +0800, Jeffle Xu wrote: > Fuse client can enable or disable per-file DAX inside guest by > chattr(1). Similarly the new state won't be updated until the file is > closed and reopened later. > > It is worth nothing that it is a best-effort style, since whether >

Re: [PATCH v2 3/4] fuse: add per-file DAX flag

2021-07-19 Thread Vivek Goyal
On Fri, Jul 16, 2021 at 06:47:52PM +0800, Jeffle Xu wrote: > Add one flag for fuse_attr.flags indicating if DAX shall be enabled for > this file. > > When the per-file DAX flag changes for an *opened* file, the state of > the file won't be updated until this file is closed and reopened later. >

Re: [PATCH v2 3/4] fuse: add per-file DAX flag

2021-07-19 Thread Vivek Goyal
On Fri, Jul 16, 2021 at 06:47:52PM +0800, Jeffle Xu wrote: > Add one flag for fuse_attr.flags indicating if DAX shall be enabled for > this file. > > When the per-file DAX flag changes for an *opened* file, the state of > the file won't be updated until this file is closed and reopened later. >

Re: [PATCH v2 2/4] fuse: Make DAX mount option a tri-state

2021-07-19 Thread Vivek Goyal
On Fri, Jul 16, 2021 at 06:47:51PM +0800, Jeffle Xu wrote: > We add 'always', 'never', and 'inode' (default). '-o dax' continues to > operate the same which is equivalent to 'always'. > > By the time this patch is applied, 'inode' mode is actually equal to > 'always' mode, before the per-file DAX

RE: [PATCH 1/4] virtio: Improve vq->broken access to avoid any compiler optimization

2021-07-19 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, July 19, 2021 5:35 PM > > On Mon, Jul 19, 2021 at 05:26:22AM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Sunday, July 18, 2021 2:09 AM > > > > > > On Sat, Jul 17, 2021 at 10:42:55AM +0300, Parav Pandit wrote: > > >

RE: [PATCH 4/4] virtio_pci: Support surprise removal of virtio pci device

2021-07-19 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, July 19, 2021 5:37 PM > > On Mon, Jul 19, 2021 at 05:44:49AM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Sunday, July 18, 2021 2:17 AM > > > > > > On Sat, Jul 17, 2021 at 10:42:58AM +0300, Parav Pandit wrote: > > > >

Re: [RFC v3 00/29] vDPA software assisted live migration

2021-07-19 Thread Stefan Hajnoczi
On Mon, May 24, 2021 at 07:29:06AM -0400, Michael S. Tsirkin wrote: > On Mon, May 24, 2021 at 12:37:48PM +0200, Eugenio Perez Martin wrote: > > On Mon, May 24, 2021 at 11:38 AM Michael S. Tsirkin wrote: > > > > > > On Wed, May 19, 2021 at 06:28:34PM +0200, Eugenio Pérez wrote: > > > > Commit 17

Re: [PATCH 4/4] virtio_pci: Support surprise removal of virtio pci device

2021-07-19 Thread Michael S. Tsirkin
On Mon, Jul 19, 2021 at 05:44:49AM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Sunday, July 18, 2021 2:17 AM > > > > On Sat, Jul 17, 2021 at 10:42:58AM +0300, Parav Pandit wrote: > > > When a virtio pci device undergo surprise removal (aka async removaln > > > in > >

Re: [PATCH 1/4] virtio: Improve vq->broken access to avoid any compiler optimization

2021-07-19 Thread Michael S. Tsirkin
On Mon, Jul 19, 2021 at 05:26:22AM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Sunday, July 18, 2021 2:09 AM > > > > On Sat, Jul 17, 2021 at 10:42:55AM +0300, Parav Pandit wrote: > > > Currently vq->broken field is read by virtqueue_is_broken() in busy > > > loop in

Re: [PATCH net-next 1/2] tools: add missing infrastructure for building ptr_ring.h

2021-07-19 Thread Michael S. Tsirkin
On Mon, Jul 19, 2021 at 09:40:39AM +0800, Yunsheng Lin wrote: > On 2021/7/18 10:09, Michael S. Tsirkin wrote: > > On Tue, Jul 06, 2021 at 10:04:02AM +0800, Yunsheng Lin wrote: > >> On 2021/7/6 2:39, Michael S. Tsirkin wrote: > >>> On Mon, Jul 05, 2021 at 11:57:34AM +0800, Yunsheng Lin wrote: > >

[PATCH v2 4/4] virtio_pci: Support surprise removal of virtio pci device

2021-07-19 Thread Parav Pandit via Virtualization
When a virtio pci device undergo surprise removal (aka async removal in PCIe spec), mark the device as broken so that any upper layer drivers can abort any outstanding operation. When a virtio net pci device undergo surprise removal which is used by a NetworkManager, a below call trace was

[PATCH v2 2/4] virtio: Keep vring_del_virtqueue() mirror of VQ create

2021-07-19 Thread Parav Pandit via Virtualization
Keep the vring_del_virtqueue() mirror of the create routines. i.e. to delete list entry first as it is added last during the create routine. Signed-off-by: Parav Pandit --- drivers/virtio/virtio_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 0/4] virtio short improvements

2021-07-19 Thread Parav Pandit via Virtualization
Hi, This series contains small improvements for virtio pci driver. The main idea support surprise removal of virtio pci device. Patches 1 to 3 prepare the code to handle surprise removal by marking the device as broken in patch-4. Patch summary: patch-1: ensures that compiler optimization

[PATCH v2 1/4] virtio: Improve vq->broken access to avoid any compiler optimization

2021-07-19 Thread Parav Pandit via Virtualization
Currently vq->broken field is read by virtqueue_is_broken() in busy loop in one context by virtnet_send_command(). vq->broken is set to true in other process context by virtio_break_device(). Reader and writer are accessing it without any synchronization. This may lead to a compiler optimization

[PATCH v2 3/4] virtio: Protect vqs list access

2021-07-19 Thread Parav Pandit via Virtualization
VQs may be accessed to mark the device broken while they are created/destroyed. Hence protect the access to the vqs list. Fixes: e2dcdfe95c0b ("virtio: virtio_break_device() to mark all virtqueues broken.") Signed-off-by: Parav Pandit --- changelog: v1->v2: - use the hole in current struct to

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-19 Thread Viresh Kumar
On 14-07-21, 23:07, Arnd Bergmann wrote: > On Wed, Jul 14, 2021 at 5:43 PM Rob Herring wrote: > > I guess it comes down to is 'virtio,mmio' providing a bus or is it > > just a device? I guess a bus (so 2 nodes) does make sense here. > > 'virtio,mmio' defines how you access/discover the virtio

Re: [PATCH 4/4] virtio_pci: Support surprise removal of virtio pci device

2021-07-19 Thread Cornelia Huck
On Sat, Jul 17 2021, "Michael S. Tsirkin" wrote: > On Sat, Jul 17, 2021 at 10:42:58AM +0300, Parav Pandit wrote: >> When a virtio pci device undergo surprise removal (aka async removaln in > > typo > >> PCIe spec), mark the device is broken so that any upper layer drivers can >> abort any

[PATCH v1 2/4] virtio: Keep vring_del_virtqueue() mirror of VQ create

2021-07-19 Thread Parav Pandit via Virtualization
Keep the vring_del_virtqueue() mirror of the create routines. i.e. to delete list entry first as it is added last during the create routine. Signed-off-by: Parav Pandit --- drivers/virtio/virtio_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v1 4/4] virtio_pci: Support surprise removal of virtio pci device

2021-07-19 Thread Parav Pandit via Virtualization
When a virtio pci device undergo surprise removal (aka async removal in PCIe spec), mark the device as broken so that any upper layer drivers can abort any outstanding operation. When a virtio net pci device undergo surprise removal which is used by a NetworkManager, a below call trace was

[PATCH v1 1/4] virtio: Improve vq->broken access to avoid any compiler optimization

2021-07-19 Thread Parav Pandit via Virtualization
Currently vq->broken field is read by virtqueue_is_broken() in busy loop in one context by virtnet_send_command(). vq->broken is set to true in other process context by virtio_break_device(). Reader and writer are accessing it without any synchronization. This may lead to a compiler optimization

[PATCH v1 3/4] virtio: Protect vqs list access

2021-07-19 Thread Parav Pandit via Virtualization
VQs may be accessed to mark the device broken while they are created/destroyed. Hence protect the access to the vqs list. Fixes: e2dcdfe95c0b ("virtio: virtio_break_device() to mark all virtqueues broken.") Signed-off-by: Parav Pandit --- changelog: v0->v1: - use spinlock instead of rwlock ---

[PATCH v1 0/4] virtio short improvements

2021-07-19 Thread Parav Pandit via Virtualization
Hi, This series contains small improvements for virtio pci driver. The main idea support surprise removal of virtio pci device. Patches 1 to 3 prepare the code to handle surprise removal by marking the device as broken in patch-4. Patch summary: patch-1: ensures that compiler optimization