Re: [PATCH v3] virtio_net: Fix mismatched buf address when unmapping for small packets

2024-09-18 Thread Michael S. Tsirkin
On Wed, Sep 18, 2024 at 09:20:05PM +0800, Wenbo Li wrote: > Currently, the virtio-net driver will perform a pre-dma-mapping for > small or mergeable RX buffer. But for small packets, a mismatched address > without VIRTNET_RX_PAD and xdp_headroom is used for unmapping. > > That will result in unsyn

[PATCH] virtio_console: fix misc probe bugs

2024-09-16 Thread Michael S. Tsirkin
find_port_by_vq which attempts to take ports_lock which also has not been initialized. To fix, init all locks and work before creating vqs. Fixes: 17634ba25544 ("virtio: console: Add a new MULTIPORT feature, support for generic ports") Signed-off-by: Michael S. Tsirkin --- dr

[PATCH v2] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
should probably look at ways to make this more straight-forwardly correct. Cc: Marco Elver Reported-by: syzbot+8a02104389c2e0ef5...@syzkaller.appspotmail.com Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 04:46:28PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 16:34, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > > > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > >

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: >

[PATCH] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
. Cc: Marco Elver Reported-by: syzbot+8a02104389c2e0ef5...@syzkaller.appspotmail.com Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index be7309b

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: >

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:7c6a3a65ace7 minmax: reduce min/max macro expansion in ato.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1608e49f98 > kernel

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2024 at 11:20:30AM -0500, Mike Christie wrote: > If people are ok with something similar as in this patchset where > we have both vhost_tasks and kthreads, then I can send something. It would be better, as you say, to modify the vhost_task code so it can emulate the kthread behavi

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2024 at 11:45:33AM +0800, Jason Wang wrote: > On Tue, Sep 10, 2024 at 4:43 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 10, 2024 at 04:37:52PM +0800, Jason Wang wrote: > > > On Tue, Sep 10, 2024 at 3:42 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v1 0/5] virtio-mem: s390x support

2024-09-10 Thread Michael S. Tsirkin
lkml.kernel.org/r/20240910175809.2135596-1-da...@redhat.com > [2] https://gitlab.com/davidhildenbrand/s390x-os-virt-spec > [3] https://virtio-mem.gitlab.io/user-guide/user-guide-linux.html > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Alexander Gordeev > Cc: Christian B

Re: [PATCH v1 3/5] virtio-mem: s390x support

2024-09-10 Thread Michael S. Tsirkin
27;t currently dump virtio-mem memory. The virtio-mem > driver has a special kdump mode, from where we can detect memory ranges > to dump. Based on this, support for dumping virtio-mem memory can be > added in the future fairly easily. > > Signed-off-by: David Hildenbrand Acked-by

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-10 Thread Michael S. Tsirkin
On Tue, Sep 10, 2024 at 04:37:52PM +0800, Jason Wang wrote: > On Tue, Sep 10, 2024 at 3:42 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 09, 2024 at 10:00:38AM +0800, Cindy Lu wrote: > > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), &

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-10 Thread Michael S. Tsirkin
On Mon, Sep 09, 2024 at 10:00:38AM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > vhost removed the support for the kthread API. However, there are > still situations where there is a request to use kthread. > In this PATCH, the support of kthread i

Re: [PATCH v3 0/2] Properly initialize speed/duplex and remove vDPA config updates

2024-09-09 Thread Michael S. Tsirkin
On Wed, Sep 04, 2024 at 10:11:13AM -0500, Carlos Bilbao wrote: > From: Carlos Bilbao > > Initialize speed and duplex for virtio_net_config to UNKNOWN (mlx5_vdpa > vDPA devices currently do not support VIRTIO_NET_F_SPEED_DUPLEX). Remove > ioctl VHOST_VDPA_SET_CONFIG and its related logic as it is

Re: [PATCH RFC 1/3] Revert "virtio_net: rx remove premapped failover code"

2024-09-08 Thread Michael S. Tsirkin
t; > For the series then: > > Tested-by: Darren Kenny > > Thanks, > > Darren. > > On Wednesday, 2024-08-14 at 02:59:20 -04, Michael S. Tsirkin wrote: > > This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. > > > > leads to crashes with no

Re: [RFC PATCH v2 5/7] Revert "virtio_net: rx remove premapped failover code"

2024-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2024 at 06:02:50PM +0800, Xuan Zhuo wrote: > On Fri, 6 Sep 2024 05:52:36 -0400, "Michael S. Tsirkin" > wrote: > > This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. > > > > leads to crashes with no ACCESS_PLATFORM when > > sy

[RFC PATCH v2 7/7] Revert "virtio_ring: enable premapped mode whatever use_dma_api"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit f9dac92ba9081062a6477ee015bd3b8c5914efc4. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 7 ++- 1 file changed, 6

[RFC PATCH v2 6/7] Revert "virtio_net: big mode skip the unmap check"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit a377ae542d8d0a20a3173da3bbba72e045bea7a9. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions

[RFC PATCH v2 5/7] Revert "virtio_net: rx remove premapped failover code"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 89

[RFC PATCH v2 4/7] Revert "virtio_net: xsk: bind/unbind xsk for rx"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit 09d2b3182c8e3a215a9b2a1834f81dd07305989f. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 134

[RFC PATCH v2 3/7] Revert "virtio_net: xsk: rx: support fill with xsk buffer"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit e9f3962441c0a4d6f16c656e6c8aa02a3ccdd568. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 70

[RFC PATCH v2 2/7] Revert "virtio_net: xsk: rx: support recv small mode"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit a4e7ba7027012f009f22a68bcfde670f9298d3a4. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 198

[RFC PATCH v2 1/7] Revert "virtio_net: xsk: rx: support recv merge mode"

2024-09-06 Thread Michael S. Tsirkin
This reverts commit 99c861b44eb1fb9dfe8776854116a6a9064c19bb. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Cc: Xuan Zhuo Reported-by: Si-Wei Liu Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 144

[RFC PATCH v2 0/7] Revert "virtio_net: rx enable premapped mode by default"

2024-09-06 Thread Michael S. Tsirkin
). And virtnet_rq_unmap() seems to only work with high order pages. Suggest reverting for now, unfortunately this implies reverting the xsk enhancements. Try again next merge window. Michael S. Tsirkin (7): Revert "virtio_net: xsk: rx: support recv merge mode" Revert "virti

Re: [External] Re: [PATCH v2] virtio_net: Fix mismatched buf address when unmapping for small packets

2024-09-04 Thread Michael S. Tsirkin
On Wed, Sep 04, 2024 at 03:30:02PM +0800, Xuan Zhuo wrote: > On Wed, 4 Sep 2024 15:21:28 +0800, =?utf-8?b?5paH5Y2a5p2O?= > wrote: > > When SWIOTLB is enabled, a DMA map will allocate a bounce buffer for real > > DMA operations, > > and when unmapping, SWIOTLB copies the content in the bounce buff

Re: [PATCH net-next v4 0/2] vsock: avoid queuing on intermediate queue if possible

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 02:33:11PM +0200, Stefano Garzarella wrote: > On Thu, Aug 29, 2024 at 08:19:31AM GMT, Michael S. Tsirkin wrote: > > On Thu, Aug 29, 2024 at 01:00:37PM +0200, Luigi Leonardi wrote: > > > Hi All, > > > > > > It has been a while since t

Re: [PATCH net-next v4 0/2] vsock: avoid queuing on intermediate queue if possible

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 01:00:37PM +0200, Luigi Leonardi wrote: > Hi All, > > It has been a while since the last email and this patch has not been merged > yet. > This is just a gentle ping :) > > Thanks, > Luigi ok I can queue it for next. Next time pls remember to CC all maintainers. Thanks!

Re: [PATCH] vdpa: Set speed and duplex of mlx5_vnet to UNKNOWN

2024-08-29 Thread Michael S. Tsirkin
On Wed, Aug 28, 2024 at 01:16:25PM -0500, Carlos Bilbao wrote: > From: Carlos Bilbao > > mlx5_vdpa vDPA devices currently don't support reporting or setting the > speed and duplex and hence should be UNKNOWN instead of zero. > > Signed-off-by: Carlos Bilbao As Jason points out, commit log and

Re: [PATCH] vdpa: Set speed and duplex of mlx5_vnet to UNKNOWN

2024-08-28 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 12:49:24PM +0800, Jason Wang wrote: > On Thu, Aug 29, 2024 at 2:16 AM Carlos Bilbao > wrote: > > > > From: Carlos Bilbao > > > > mlx5_vdpa vDPA devices currently don't support reporting or setting the > > speed and duplex and hence should be UNKNOWN instead of zero. > > >

Re: [RFC] vDPA: Trying to make sense of config data

2024-08-27 Thread Michael S. Tsirkin
On Fri, Aug 23, 2024 at 09:51:24AM -0500, Carlos Bilbao wrote: > Hello again,  > > Answering my own question: > > https://elixir.bootlin.com/linux/v6.10.2/source/include/uapi/linux/virtio_net.h#L92 > > Thanks, Carlos Right. kernel.org would be the official source for that header. Or if you want

Re: [syzbot] [kvm?] [net?] [virt?] INFO: task hung in __vhost_worker_flush

2024-08-16 Thread Michael S. Tsirkin
On Fri, Aug 16, 2024 at 11:10:32AM -0700, Sean Christopherson wrote: > On Fri, Aug 16, 2024, syzbot wrote: > > > On Wed, May 29, 2024, syzbot wrote: > > >> Hello, > > >> > > >> syzbot found the following issue on: > > >> > > >> HEAD commit:9b62e02e6336 Merge tag > > >> 'mm-hotfixes-stable-20

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 11:23:19AM -0400, Michael S. Tsirkin wrote: > On Thu, Aug 15, 2024 at 09:14:27AM +0200, Linux regression tracking (Thorsten > Leemhuis) wrote: > > [side note: the message I have been replying to at least when downloaded > > from lore has two messag

Re: [PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 09:14:27AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote: > [side note: the message I have been replying to at least when downloaded > from lore has two message-ids, one of them identical two a older > message, which is why this looks odd in the lore archives:

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-14 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 04:20:44PM +0800, Jason Wang wrote: > We used to call irq_bypass_unregister_producer() in > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the > token pointer is still valid or not. > > Actually, we use the eventfd_ctx as the token so the life cycle of t

[PATCH RFC 3/3] Revert "virtio_ring: enable premapped mode whatever use_dma_api"

2024-08-14 Thread Michael S. Tsirkin
This reverts commit f9dac92ba9081062a6477ee015bd3b8c5914efc4. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Reported-by: Si-Wei Liu Message-ID: <8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com> Signed-off-by: Michael S. Tsirkin --- drivers/

[PATCH RFC 2/3] Revert "virtio_net: big mode skip the unmap check"

2024-08-14 Thread Michael S. Tsirkin
This reverts commit a377ae542d8d0a20a3173da3bbba72e045bea7a9. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Reported-by: Si-Wei Liu Message-ID: <8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com> Signed-off-by: Michael S. Tsirkin --- drive

[PATCH RFC 1/3] Revert "virtio_net: rx remove premapped failover code"

2024-08-14 Thread Michael S. Tsirkin
This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. leads to crashes with no ACCESS_PLATFORM when sysctl net.core.high_order_alloc_disable=1 Reported-by: Si-Wei Liu Message-ID: <8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com> Signed-off-by: Michael S. Tsirkin --- drive

[PATCH RFC 0/3] Revert "virtio_net: rx enable premapped mode by default"

2024-08-13 Thread Michael S. Tsirkin
). And virtnet_rq_unmap() seems to only work with high order pages. Suggest reverting for now. Michael S. Tsirkin (3): Revert "virtio_net: rx remove premapped failover code" Revert "virtio_net: big mode skip the unmap check" Revert "virtio_ring: enable premapped mode

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 04:15:25PM +0300, Kirill A. Shutemov wrote: > On Thu, Aug 08, 2024 at 08:10:34AM -0400, Michael S. Tsirkin wrote: > > On Thu, Aug 08, 2024 at 10:51:41AM +0300, Kirill A. Shutemov wrote: > > > Hongyu reported a hang on kexec in a VM. QEMU repor

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2024-08-08 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 10:51:41AM +0300, Kirill A. Shutemov wrote: > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > accesses during the hang. > > Invalid read at addr 0x102877002, size 2, region '(null)', reason: > rejected > Invalid write at addr 0x102877A44

[GIT PULL] virtio: bugfix

2024-08-06 Thread Michael S. Tsirkin
vdpa. Signed-off-by: Michael S. Tsirkin Jason Wang (1): vhost-vdpa: switch to use vmf_insert_pfn() in the fault handler drivers/vhost/vdpa.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-)

Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-05 Thread Michael S. Tsirkin
On Mon, Aug 05, 2024 at 04:21:06PM +0800, Jason Wang wrote: > Barry said [1]: > > """ > mm doesn't support non-blockable __GFP_NOFAIL allocation. Because > __GFP_NOFAIL without direct reclamation may just result in a busy > loop within non-sleepable contexts. > ""“ > > Unfortuantely, we do that u

Re: [PATCH V5 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-08-04 Thread Michael S. Tsirkin
On Mon, Aug 05, 2024 at 11:02:42AM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. synchronizes > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status to propagate >

Re: [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume

2024-08-04 Thread Michael S. Tsirkin
On Sun, Aug 04, 2024 at 11:48:39AM +0300, Leon Romanovsky wrote: > On Fri, Aug 02, 2024 at 09:14:28AM -0400, Michael S. Tsirkin wrote: > > On Fri, Aug 02, 2024 at 10:20:17AM +0300, Dragos Tatulea wrote: > > > This series parallelizes the mlx5_vdpa device suspend and resume > &

Re: [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume

2024-08-02 Thread Michael S. Tsirkin
On Fri, Aug 02, 2024 at 10:20:17AM +0300, Dragos Tatulea wrote: > This series parallelizes the mlx5_vdpa device suspend and resume > operations through the firmware async API. The purpose is to reduce live > migration downtime. > > The series starts with changing the VQ suspend and resume commands

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:55:10PM +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 2:42 PM Michael S. Tsirkin wrote: > > > > On Thu, Aug 01, 2024 at 02:13:18PM +0800, Jason Wang wrote: > > > On Thu, Aug 1, 2024 at 1:58 PM Michael S. Tsirkin wrote: > > > > &

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:13:49PM +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 2:06 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > > > This patch synchronize operstate with admin state per RFC2863. > > >

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 02:13:18PM +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 1:58 PM Michael S. Tsirkin wrote: > > > > On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > > > @@ -2885,6 +2886,25 @@ static void virtnet_cancel_dim(struct > >

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status > correctly to stacked devices l

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Thu, Aug 01, 2024 at 10:16:00AM +0800, Jason Wang wrote: > > > @@ -2885,6 +2886,25 @@ static void virtnet_cancel_dim(struct virtnet_info > > > *vi, struct dim *dim) > > > net_dim_work_cancel(dim); > > > } > > > > > > +static void virtnet_update_settings(struct virtnet_info *vi) > > > +{

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-31 Thread Michael S. Tsirkin
On Wed, Jul 31, 2024 at 10:59:47AM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status > correctly to stacked devices l

Re: [PATCH v1] MAINTAINERS: add me as reviewer of AF_VSOCK and virtio-vsock

2024-07-30 Thread Michael S. Tsirkin
On Tue, Jul 30, 2024 at 08:47:07AM -0700, Jakub Kicinski wrote: > On Sun, 28 Jul 2024 21:33:25 +0300 Arseniy Krasnov wrote: > > I'm working on AF_VSOCK and virtio-vsock. > > If you want to review the code perhaps you can use lore+lei > and filter on the paths? > > Adding people to MAINTAINERS is

Re: [PATCH v3] ptp: Add vDSO-style vmclock support

2024-07-29 Thread Michael S. Tsirkin
On Mon, Jul 29, 2024 at 11:42:22AM +0100, David Woodhouse wrote: > +struct vmclock_abi { > + /* CONSTANT FIELDS */ > + uint32_t magic; > +#define VMCLOCK_MAGIC0x4b4c4356 /* "VCLK" */ > + uint32_t size; /* Size of region containing this structure */ > + uint16_t vers

[GIT PULL] virtio: fixes for rc1

2024-07-28 Thread Michael S. Tsirkin
modpost warning when building virtio_dma_buf harmless, but the fix is trivial Signed-off-by: Michael S. Tsirkin Dan Carpenter (1): vdpa/octeon_ep: Fix error code in octep_process_mbox() Jeff Johnson (1): virtio: add

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2024 at 02:07:01PM +0100, David Woodhouse wrote: > On 28 July 2024 11:37:04 BST, "Michael S. Tsirkin" wrote: > >Glad you asked :) > > Heh, I'm not sure I'm so glad. Did I mention I hate ACPI? Perhaps it's still > not too late for me

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-28 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 07:28:28PM +0100, David Woodhouse wrote: > On 26 July 2024 17:49:58 BST, Jonathan Cameron > wrote: > >On Thu, 25 Jul 2024 14:50:50 +0100 > >David Woodhouse wrote: > > > >> On Thu, 2024-07-25 at 08:33 -0400, Michael S. Tsirkin wrote: >

Re: [PATCH v2] ptp: Add vDSO-style vmclock support

2024-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 01:28:17PM +0100, David Woodhouse wrote: > diff --git a/include/uapi/linux/vmclock-abi.h > b/include/uapi/linux/vmclock-abi.h > new file mode 100644 > index ..7b1b4759363c > --- /dev/null > +++ b/include/uapi/linux/vmclock-abi.h > @@ -0,0 +1,187 @@ > +/* SPDX-Li

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 02:00:25PM +0100, David Woodhouse wrote: > On Fri, 2024-07-26 at 08:52 -0400, Michael S. Tsirkin wrote: > > On Fri, Jul 26, 2024 at 09:35:51AM +0100, David Woodhouse wrote: > > > But for this use case, we only need a memory region that the hypervisor &g

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 09:35:51AM +0100, David Woodhouse wrote: > But for this use case, we only need a memory region that the hypervisor > can update. We don't need any of that complexity of gratuitously > interrupting all the vCPUs just to ensure that none of them can be > running userspace whil

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 09:06:29AM +0100, David Woodhouse wrote: > That's great. You don't even need it to be per-vCPU if you let the > hypervisor write directly to the single physical location that's mapped > to userspace. It can do that before it even starts *running* the vCPUs > after migration.

Re: [PATCH net-next v3 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-26 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 11:03:42AM +0800, Jason Wang wrote: > On Tue, Jul 9, 2024 at 9:28 PM Michael S. Tsirkin wrote: > > > > On Tue, Jul 09, 2024 at 04:02:14PM +0800, Jason Wang wrote: > > > This patch synchronize operstate with admin state per RFC2863. > > >

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 11:20:56PM +0100, David Woodhouse wrote: > We're rolling out the AMZNVCLK device for internal use cases, and plan > to add it in public instances some time later. Let's be real. If amazon does something in its own hypervisor, and the only way to use that is to expose the in

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 01:09:24AM -0400, Michael S. Tsirkin wrote: > On Thu, Jul 25, 2024 at 10:29:18PM +0100, David Woodhouse wrote: > > > > > Then can't we fix it by interrupting all CPUs right after LM? > > > > > > > > > > To me that see

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 10:29:18PM +0100, David Woodhouse wrote: > > > > Then can't we fix it by interrupting all CPUs right after LM? > > > > > > > > To me that seems like a cleaner approach - we then compartmentalize > > > > the ABI issue - kernel has its own ABI against userspace, > > > > devic

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 10:29:18PM +0100, David Woodhouse wrote: > > > > Then can't we fix it by interrupting all CPUs right after LM? > > > > > > > > To me that seems like a cleaner approach - we then compartmentalize > > > > the ABI issue - kernel has its own ABI against userspace, > > > > devic

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 10:00:24PM +0100, David Woodhouse wrote: > On Thu, 2024-07-25 at 16:50 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 08:35:40PM +0100, David Woodhouse wrote: > > > On Thu, 2024-07-25 at 12:38 -0400, Michael S. Tsirkin wrote: > > > &

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 08:35:40PM +0100, David Woodhouse wrote: > On Thu, 2024-07-25 at 12:38 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 04:18:43PM +0100, David Woodhouse wrote: > > > The use case isn't necessarily for all users of gettimeofday(), of &g

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 04:18:43PM +0100, David Woodhouse wrote: > On Thu, 2024-07-25 at 10:11 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 02:50:50PM +0100, David Woodhouse wrote: > > > Even if the virtio-rtc specification were official today, and I was > >

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 02:50:50PM +0100, David Woodhouse wrote: > Even if the virtio-rtc specification were official today, and I was > able to expose it via PCI, I probably wouldn't do it that way. There's > just far more in virtio-rtc than we need; the simple shared memory > region is perfectly

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 01:31:19PM +0100, David Woodhouse wrote: > On Thu, 2024-07-25 at 08:29 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 01:27:49PM +0100, David Woodhouse wrote: > > > On Thu, 2024-07-25 at 08:17 -0400, Michael S. Tsirkin wrote: > > > &

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 01:27:49PM +0100, David Woodhouse wrote: > On Thu, 2024-07-25 at 08:17 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 10:56:05AM +0100, David Woodhouse wrote: > > > > Do you want to just help complete virtio-rtc then? Would be easier t

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2024 at 10:56:05AM +0100, David Woodhouse wrote: > > Do you want to just help complete virtio-rtc then? Would be easier than > > trying to keep two specs in sync. > > The ACPI version is much more lightweight and doesn't take up a > valuable PCI slot#. (I know, you can do virtio wi

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-24 Thread Michael S. Tsirkin
On Wed, Jul 24, 2024 at 06:16:37PM +0100, David Woodhouse wrote: > From: David Woodhouse > > The vmclock "device" provides a shared memory region with precision clock > information. By using shared memory, it is safe across Live Migration. > > Like the KVM PTP clock, this can convert TSC-based c

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-24 Thread Michael S. Tsirkin
On Wed, Jul 24, 2024 at 06:16:37PM +0100, David Woodhouse wrote: > From: David Woodhouse > > The vmclock "device" provides a shared memory region with precision clock > information. By using shared memory, it is safe across Live Migration. > > Like the KVM PTP clock, this can convert TSC-based c

Re: [PATCH] tools/virtio:Fix the wrong format specifier

2024-07-24 Thread Michael S. Tsirkin
On Wed, Jul 24, 2024 at 12:41:08AM -0700, Zhu Jun wrote: > The unsigned int should use "%u" instead of "%d". > > Signed-off-by: Zhu Jun which matters why? > --- > tools/virtio/ringtest/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/virtio/ringtest/main.c

Re: [PATH v5 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-23 Thread Michael S. Tsirkin
On Tue, Jul 23, 2024 at 07:49:44AM +, Dragos Tatulea wrote: > On Tue, 2024-07-23 at 13:39 +0800, Cindy Lu wrote: > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > > > > Tested in ConnectX-6 Dx device

Re: [PATCH net-next v3 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-18 Thread Michael S. Tsirkin
On Fri, Jul 19, 2024 at 09:02:29AM +0800, Jason Wang wrote: > On Wed, Jul 17, 2024 at 2:53 PM Jason Wang wrote: > > > > On Wed, Jul 17, 2024 at 2:00 PM Michael S. Tsirkin wrote: > > > > > > On Wed, Jul 17, 2024 at 09:19:02AM +0800, Jason Wang wrote: > > >

Re: [PATCH V2 5/7] vhost-vdpa: VHOST_IOTLB_REMAP

2024-07-18 Thread Michael S. Tsirkin
On Thu, Jul 18, 2024 at 08:45:31AM +0800, Jason Wang wrote: > > > For example: > > > > > > 1) old owner pass fd to new owner which is another process > > > 2) the new owner do VHOST_NEW_OWNER > > > 3) new owner doesn't do remap correctly > > > > > > There's no way for the old owner to remove/unpin

Re: [GIT PULL] virtio: features, fixes, cleanups

2024-07-18 Thread Michael S. Tsirkin
On Wed, Jul 17, 2024 at 05:30:34AM -0400, Michael S. Tsirkin wrote: > This is relatively small. > I had to drop a buggy commit in the middle so some hashes > changed from what was in linux-next. > Deferred admin vq scalability fix to after rc2 as a minor issue was > found with it re

Re: [GIT PULL] virtio: features, fixes, cleanups

2024-07-18 Thread Michael S. Tsirkin
On Thu, Jul 18, 2024 at 08:52:28AM +0800, Jason Wang wrote: > On Wed, Jul 17, 2024 at 5:30 PM Michael S. Tsirkin wrote: > > > > This is relatively small. > > I had to drop a buggy commit in the middle so some hashes > > changed from what was in linux-next. > > Def

[GIT PULL] virtio: features, fixes, cleanups

2024-07-17 Thread Michael S. Tsirkin
ned-off-by: Michael S. Tsirkin Denis Arefev (1): net: missing check virtio Dragos Tatulea (24): vdpa/mlx5: Clarify meaning thorough function rename vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical vdpa/

Re: [PATCH net-next v3 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-16 Thread Michael S. Tsirkin
On Wed, Jul 17, 2024 at 09:19:02AM +0800, Jason Wang wrote: > On Wed, Jul 10, 2024 at 11:03 AM Jason Wang wrote: > > > > On Tue, Jul 9, 2024 at 9:28 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 09, 2024 at 04:02:14PM +0800, Jason Wang wrote: > > &g

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Michael S. Tsirkin
On Mon, Jul 15, 2024 at 10:29:26AM -0400, Steven Sistare wrote: > On 7/15/2024 5:07 AM, Michael S. Tsirkin wrote: > > On Fri, Jul 12, 2024 at 06:18:49AM -0700, Steve Sistare wrote: > > > Add an ioctl to transfer file descriptor ownership and pinned memory > > > acc

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Michael S. Tsirkin
On Fri, Jul 12, 2024 at 06:18:49AM -0700, Steve Sistare wrote: > Add an ioctl to transfer file descriptor ownership and pinned memory > accounting from one process to another. > > This is more efficient than VHOST_RESET_OWNER followed by VHOST_SET_OWNER, > as that would unpin all physical pages, r

Re: [PATCH V2 3/7] vhost-vdpa: VHOST_NEW_OWNER

2024-07-15 Thread Michael S. Tsirkin
On Mon, Jul 15, 2024 at 10:26:13AM +0800, Jason Wang wrote: > On Fri, Jul 12, 2024 at 9:19 PM Steve Sistare > wrote: > > > > Add an ioctl to transfer file descriptor ownership and pinned memory > > accounting from one process to another. > > > > This is more efficient than VHOST_RESET_OWNER follo

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-07-14 Thread Michael S. Tsirkin
even when it's not, such as in the netpoll case. > > To resolve this, modify virtnet_poll_tx() to only set NAPI when budget > is available. Same for virtnet_poll_cleantx(), which always assumed that > it was in a NAPI context. > > Fixes: df133f3f9625 ("virtio_ne

Re: [PATCH] virtio: add missing MODULE_DESCRIPTION() macro

2024-07-11 Thread Michael S. Tsirkin
On Thu, Jul 11, 2024 at 11:43:18AM -0700, Jeff Johnson wrote: > On 6/23/24 10:36, Jeff Johnson wrote: > > On 6/2/2024 1:25 PM, Jeff Johnson wrote: > > > make allmodconfig && make W=1 C=1 reports: > > > WARNING: modpost: missing MODULE_DESCRIPTION() in > > > drivers/virtio/virtio_dma_buf.o > > > >

Re: [PATCH v2 2/2] virtio: fix vq # for balloon

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 03:54:22PM -0700, Daniel Verkamp wrote: > On Wed, Jul 10, 2024 at 1:39 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 10, 2024 at 12:58:11PM -0700, Daniel Verkamp wrote: > > > On Wed, Jul 10, 2024 at 11:39 AM Michael S. Tsirkin > > > w

Re: [PATCH v2 2/2] virtio: fix vq # for balloon

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 12:58:11PM -0700, Daniel Verkamp wrote: > On Wed, Jul 10, 2024 at 11:39 AM Michael S. Tsirkin wrote: > > > > On Wed, Jul 10, 2024 at 11:12:34AM -0700, Daniel Verkamp wrote: > > > On Wed, Jul 10, 2024 at 4:43 AM Michael S. Tsirkin > > &

Re: [PATCH v2 2/2] virtio: fix vq # for balloon

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 11:12:34AM -0700, Daniel Verkamp wrote: > On Wed, Jul 10, 2024 at 4:43 AM Michael S. Tsirkin wrote: > > > > virtio balloon communicates to the core that in some > > configurations vq #s are non-contiguous by setting name > > pointer to NULL.

Re: [PATCH v2 2/2] virtio: fix vq # for balloon

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 11:12:34AM -0700, Daniel Verkamp wrote: > On Wed, Jul 10, 2024 at 4:43 AM Michael S. Tsirkin wrote: > > > > virtio balloon communicates to the core that in some > > configurations vq #s are non-contiguous by setting name > > pointer to NULL.

[PATCH v2 2/2] virtio: fix vq # for balloon

2024-07-10 Thread Michael S. Tsirkin
place. Compatibility with buggy hypervisors is handled inside virtio-balloon, which is the only driver making use of this facility, so far. Message-ID: Fixes: b0c504f15471 ("virtio-balloon: add support for providing free page reports to host") Cc: "Alexander Duyck" Signed-off-by

[PATCH v2 1/2] virtio_balloon: add work around for out of spec QEMU

2024-07-10 Thread Michael S. Tsirkin
bug. Message-ID: Fixes: b0c504f15471 ("virtio-balloon: add support for providing free page reports to host") Cc: "Alexander Duyck" Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletion

Re: [PATCH 1/2] virtio_balloon: add work around for out of spec QEMU

2024-07-10 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 03:37:49PM +0800, Jason Wang wrote: > On Wed, Jul 10, 2024 at 2:16 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 10, 2024 at 11:23:20AM +0800, Jason Wang wrote: > > > On Fri, Jul 5, 2024 at 6:09 PM Michael S. Tsirkin wrote: > > &g

Re: [PATCH 1/2] virtio_balloon: add work around for out of spec QEMU

2024-07-09 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 11:23:20AM +0800, Jason Wang wrote: > On Fri, Jul 5, 2024 at 6:09 PM Michael S. Tsirkin wrote: > > > > QEMU implemented the configuration > > VIRTIO_BALLOON_F_REPORTING && ! VIRTIO_BALLOON_F_FREE_PAGE_HINT > > incorrectly: it the

Re: [PATCH v3 0/2] vdpa: support set mac address from vdpa tool

2024-07-09 Thread Michael S. Tsirkin
On Wed, Jul 10, 2024 at 11:05:48AM +0800, Jason Wang wrote: > On Tue, Jul 9, 2024 at 8:42 PM Michael S. Tsirkin wrote: > > > > On Tue, Jul 09, 2024 at 02:19:19PM +0800, Cindy Lu wrote: > > > On Tue, 9 Jul 2024 at 11:59, Parav Pandit wrote: > > > > > > &

Re: [PATCH net-next v3 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-07-09 Thread Michael S. Tsirkin
On Tue, Jul 09, 2024 at 04:02:14PM +0800, Jason Wang wrote: > This patch synchronize operstate with admin state per RFC2863. > > This is done by trying to toggle the carrier upon open/close and > synchronize with the config change work. This allows propagate status > correctly to stacked devices l

Re: [PATCH v3 0/2] vdpa: support set mac address from vdpa tool

2024-07-09 Thread Michael S. Tsirkin
On Tue, Jul 09, 2024 at 02:19:19PM +0800, Cindy Lu wrote: > On Tue, 9 Jul 2024 at 11:59, Parav Pandit wrote: > > > > Hi Cindy, > > > > > From: Cindy Lu > > > Sent: Monday, July 8, 2024 12:17 PM > > > > > > Add support for setting the MAC address using the VDPA tool. > > > This feature will allow

Re: [PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-08 Thread Michael S. Tsirkin
On Mon, Jul 08, 2024 at 02:55:49PM +0800, Cindy Lu wrote: > Add the function to support setting the MAC address. > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > to set the mac address > > Tested in ConnectX-6 Dx device > > Signed-off-by: Cindy Lu Is this on top of your other patchset

  1   2   3   4   5   6   7   8   9   10   >