[PATCH AUTOSEL 5.17 28/43] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

RE: [PATCH V2 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > To: jasow...@redhat.com; m...@redhat.com > Cc: virtualization@lists.linux-foundation.org; net...@vger.kernel.org; Parav > Pandit ; xieyon...@bytedance.com; > gautam.da...@amd.com; Zhu Lingshan > Subject: [PATCH V2 5/6] vDPA: answer

RE: [PATCH V2 3/6] vDPA: allow userspace to query features of a vDPA device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > device > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/vdpa.c

[PATCH AUTOSEL 5.15 28/41] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

[PATCH AUTOSEL 5.10 22/29] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

RE: [PATCH V2 4/6] vDPA: !FEATURES_OK should not block querying device config space

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > > Users may want to query the config space of a vDPA device, to choose a > appropriate one for a certain guest. This means the users need to read the > config space before FEATURES_OK, and the existence of config space > contents

[PATCH AUTOSEL 4.9 09/12] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

RE: [PATCH V2 3/6] vDPA: allow userspace to query features of a vDPA device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/vdpa.c |

[PATCH AUTOSEL 5.18 31/47] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

[PATCH AUTOSEL 4.19 14/18] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

[PATCH AUTOSEL 4.14 11/14] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

[PATCH AUTOSEL 5.4 19/23] virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

2022-06-13 Thread Sasha Levin
From: chengkaitao [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ] The reference must be released when device_register(_cmdline_parent) failed. Add the corresponding 'put_device()' in the error handling path. Signed-off-by: chengkaitao Message-Id:

Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean

2022-06-13 Thread Nadav Amit via Virtualization
On Jun 13, 2022, at 11:48 AM, Srivatsa S. Bhat wrote: > ⚠ External Email > > On 6/8/22 4:27 PM, Peter Zijlstra wrote: >> vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() >> leaves .noinstr.text section >> vmlinux.o: warning: objtool: default_idle+0x4: call to

[PATCH v1] vduse: Tie vduse mgmtdev and its device

2022-06-13 Thread Parav Pandit via Virtualization
vduse devices are not backed by any real devices such as PCI. Hence it doesn't have any parent device linked to it. Kernel driver model in [1] suggests to avoid an empty device release callback. Hence tie the mgmtdevice object's life cycle to an allocate dummy struct device instead of static

RE: [PATCH] vduse: Tie vduse mgmtdev and its device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Yongji Xie > Sent: Monday, June 13, 2022 5:54 AM > > On Mon, Jun 13, 2022 at 2:02 AM Parav Pandit wrote: > > > > vduse devices are not backed by any real devices such as PCI. Hence it > > doesn't have any parent device linked to it. > > > > Kernel driver model in [1] suggests to

Re: [PATCH 1/2] vdpa/mlx5: Update Control VQ callback information

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 4:00 PM Eli Cohen wrote: > > The control VQ specific information is stored in the dedicated struct > mlx5_control_vq. When the callback is updated through > mlx5_vdpa_set_vq_cb(), make sure to update the control VQ struct. > > Fixes: 5262912ef3cf ("vdpa/mlx5: Add support

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 04:07:09PM +0800, Jason Wang wrote: > On Mon, Jun 13, 2022 at 3:23 PM Michael S. Tsirkin wrote: > > > > On Mon, Jun 13, 2022 at 01:26:59PM +0800, Jason Wang wrote: > > > On Sat, Jun 11, 2022 at 1:12 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Fri, May 27, 2022

Re: [PATCH 21/36] x86/tdx: Remove TDX_HCALL_ISSUE_STI

2022-06-13 Thread Peter Zijlstra
On Mon, Jun 13, 2022 at 04:26:01PM +0800, Lai Jiangshan wrote: > On Wed, Jun 8, 2022 at 10:48 PM Peter Zijlstra wrote: > > > > Now that arch_cpu_idle() is expected to return with IRQs disabled, > > avoid the useless STI/CLI dance. > > > > Per the specs this is supposed to work, but nobody has yet

Re: [RFC PATCH v2 0/8] virtio/vsock: experimental zerocopy receive

2022-06-13 Thread Stefano Garzarella
On Thu, Jun 09, 2022 at 12:33:32PM +, Arseniy Krasnov wrote: On 09.06.2022 11:54, Stefano Garzarella wrote: Hi Arseniy, I left some comments in the patches, and I'm adding something also here: Thanks for comments On Fri, Jun 03, 2022 at 05:27:56AM +, Arseniy Krasnov wrote:   

Re: [PATCH] virtio_ring : fix vring_packed_desc memory out of bounds bug

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 02:56:19PM +0800, Jason Wang wrote: > On Fri, Jun 10, 2022 at 10:51 PM Michael S. Tsirkin wrote: > > > > On Fri, Jun 10, 2022 at 06:33:14PM +0800, huangjie.albert wrote: > > > ksoftirqd may consume the packet and it will call: > > > virtnet_poll > > >

Re: [PATCH] virtio_ring : fix vring_packed_desc memory out of bounds bug

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 10:17:58PM +0800, 黄杰 wrote: > OK, thank you for the explanation, I get it. By the way, if we could > fix the the OOB access first, it seems that even if we do this, the > OOB access also exists. > > I think we can do this since 16bit/32bit operations are guaranteed to be

Re: [PATCH] virtio_ring : fix vring_packed_desc memory out of bounds bug

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 09:47:55PM +0800, 黄杰 wrote: > Michael S. Tsirkin 于2022年6月13日周一 16:55写道: > > > > On Mon, Jun 13, 2022 at 04:44:03PM +0800, 黄杰 wrote: > > > Michael S. Tsirkin 于2022年6月12日周日 22:13写道: > > > > > > > > On Sun, Jun 12, 2022 at 07:02:25PM +0800, 黄杰 wrote: > > > > > Michael S.

Re: [PATCH] virtio_ring : fix vring_packed_desc memory out of bounds bug

2022-06-13 Thread Jason Wang
On Fri, Jun 10, 2022 at 10:51 PM Michael S. Tsirkin wrote: > > On Fri, Jun 10, 2022 at 06:33:14PM +0800, huangjie.albert wrote: > > ksoftirqd may consume the packet and it will call: > > virtnet_poll > > -->virtnet_receive > > -->virtqueue_get_buf_ctx > >

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 05:14:59PM +0800, Jason Wang wrote: > On Mon, Jun 13, 2022 at 5:08 PM Jason Wang wrote: > > > > On Mon, Jun 13, 2022 at 4:59 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jun 13, 2022 at 04:51:08PM +0800, Jason Wang wrote: > > > > On Mon, Jun 13, 2022 at 4:19 PM

Re: [PATCH RFC v1 4/7] swiotlb: to implement io_tlb_high_mem

2022-06-13 Thread Christoph Hellwig
On Fri, Jun 10, 2022 at 02:56:08PM -0700, Dongli Zhang wrote: > Since this patch file has 200+ lines, would you please help clarify what does > 'this' indicate? This indicates that any choice of a different swiotlb pools needs to be hidden inside of ѕwiotlb. The dma mapping API already provides

Re: [PATCH] Bluetooth: virtio_bt: fix device removal

2022-06-13 Thread Michael S. Tsirkin
On Fri, Jan 14, 2022 at 03:12:47PM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 16, 2021 at 08:58:31PM +0100, Marcel Holtmann wrote: > > Hi Michael, > > > > > Device removal is clearly out of virtio spec: it attempts to remove > > > unused buffers from a VQ before invoking device reset.

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 01:26:59PM +0800, Jason Wang wrote: > On Sat, Jun 11, 2022 at 1:12 PM Michael S. Tsirkin wrote: > > > > On Fri, May 27, 2022 at 02:01:19PM +0800, Jason Wang wrote: > > > This is a rework on the previous IRQ hardening that is done for > > > virtio-pci where several

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 3:23 PM Michael S. Tsirkin wrote: > > On Mon, Jun 13, 2022 at 01:26:59PM +0800, Jason Wang wrote: > > On Sat, Jun 11, 2022 at 1:12 PM Michael S. Tsirkin wrote: > > > > > > On Fri, May 27, 2022 at 02:01:19PM +0800, Jason Wang wrote: > > > > This is a rework on the previous

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 4:19 PM Michael S. Tsirkin wrote: > > On Mon, Jun 13, 2022 at 04:07:09PM +0800, Jason Wang wrote: > > On Mon, Jun 13, 2022 at 3:23 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jun 13, 2022 at 01:26:59PM +0800, Jason Wang wrote: > > > > On Sat, Jun 11, 2022 at 1:12 PM

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 04:51:08PM +0800, Jason Wang wrote: > On Mon, Jun 13, 2022 at 4:19 PM Michael S. Tsirkin wrote: > > > > On Mon, Jun 13, 2022 at 04:07:09PM +0800, Jason Wang wrote: > > > On Mon, Jun 13, 2022 at 3:23 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jun 13, 2022

Re: [PATCH] virtio_ring : fix vring_packed_desc memory out of bounds bug

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 04:44:03PM +0800, 黄杰 wrote: > Michael S. Tsirkin 于2022年6月12日周日 22:13写道: > > > > On Sun, Jun 12, 2022 at 07:02:25PM +0800, 黄杰 wrote: > > > Michael S. Tsirkin 于2022年6月11日周六 08:35写道: > > > > > > > > On Sat, Jun 11, 2022 at 12:38:10AM +0800, 黄杰 wrote: > > > > > > This pattern

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 4:59 PM Michael S. Tsirkin wrote: > > On Mon, Jun 13, 2022 at 04:51:08PM +0800, Jason Wang wrote: > > On Mon, Jun 13, 2022 at 4:19 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jun 13, 2022 at 04:07:09PM +0800, Jason Wang wrote: > > > > On Mon, Jun 13, 2022 at 3:23 PM

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 5:08 PM Jason Wang wrote: > > On Mon, Jun 13, 2022 at 4:59 PM Michael S. Tsirkin wrote: > > > > On Mon, Jun 13, 2022 at 04:51:08PM +0800, Jason Wang wrote: > > > On Mon, Jun 13, 2022 at 4:19 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jun 13, 2022 at

Re: [PATCH 2/2] vdpa/mlx5: Initializde CVQ vringh only once

2022-06-13 Thread Jason Wang
On Mon, Jun 13, 2022 at 4:00 PM Eli Cohen wrote: > > Currently, CVQ vringh is initialized inside setup_virtqueues() which is > called every time a memory update is done. This is undesirable since it > resets all the context of the vring, including the available and used > indices. > > Move the

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-06-13 Thread Peter Zijlstra
On Thu, Jun 09, 2022 at 04:49:21PM -0700, Jacob Pan wrote: > Hi Peter, > > On Wed, 08 Jun 2022 16:27:27 +0200, Peter Zijlstra > wrote: > > > Commit c227233ad64c ("intel_idle: enable interrupts before C1 on > > Xeons") wrecked intel_idle in two ways: > > > > - must not have tracing in idle

Re: [RFC PATCH v2 3/8] af_vsock: add zerocopy receive logic

2022-06-13 Thread Stefano Garzarella
On Thu, Jun 09, 2022 at 12:20:22PM +, Arseniy Krasnov wrote: On 09.06.2022 11:39, Stefano Garzarella wrote: On Fri, Jun 03, 2022 at 05:35:48AM +, Arseniy Krasnov wrote: This: 1) Adds callback for 'mmap()' call on socket. It checks vm   area flags and sets vm area ops. 2) Adds special

Re: [PATCH V6 8/9] virtio: harden vring IRQ

2022-06-13 Thread Michael S. Tsirkin
On Mon, Jun 13, 2022 at 05:08:20PM +0800, Jason Wang wrote: > On Mon, Jun 13, 2022 at 4:59 PM Michael S. Tsirkin wrote: > > > > On Mon, Jun 13, 2022 at 04:51:08PM +0800, Jason Wang wrote: > > > On Mon, Jun 13, 2022 at 4:19 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jun 13, 2022

Re: [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean

2022-06-13 Thread Srivatsa S. Bhat
On 6/8/22 4:27 PM, Peter Zijlstra wrote: > vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() > leaves .noinstr.text section > vmlinux.o: warning: objtool: default_idle+0x4: call to arch_safe_halt() > leaves .noinstr.text section > vmlinux.o: warning: objtool: