Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Si-Wei Liu
On 10/19/2023 9:11 PM, Jason Wang wrote: On Fri, Oct 20, 2023 at 6:28 AM Si-Wei Liu wrote: On 10/19/2023 7:39 AM, Eugenio Perez Martin wrote: On Thu, Oct 19, 2023 at 10:27 AM Jason Wang wrote: On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: On 10/18/2023 7:53 PM, Jason Wang wrote:

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Jason Wang
On Fri, Oct 20, 2023 at 6:28 AM Si-Wei Liu wrote: > > > > On 10/19/2023 7:39 AM, Eugenio Perez Martin wrote: > > On Thu, Oct 19, 2023 at 10:27 AM Jason Wang wrote: > >> On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: > >>> > >>> > >>> On 10/18/2023 7:53 PM, Jason Wang wrote: > On Wed,

Re: Re: PING: [PATCH] virtio-blk: fix implicit overflow on virtio_max_dma_size

2023-10-19 Thread zhenwei pi via Virtualization
Cc Paolo, Stefan, Xuan and linux-block. On 10/19/23 17:52, Michael S. Tsirkin wrote: On Thu, Oct 19, 2023 at 05:43:55PM +0800, zhenwei pi wrote: Hi Michael, This seems to have been ignored as you suggested. LINK: https://www.spinics.net/lists/linux-virtualization/msg63015.html Pls Cc more

Re: [RFC v2 PATCH] vdpa_sim: implement .reset_map support

2023-10-19 Thread Si-Wei Liu
On 10/19/2023 2:29 AM, Stefano Garzarella wrote: On Wed, Oct 18, 2023 at 04:47:48PM -0700, Si-Wei Liu wrote: On 10/18/2023 1:05 AM, Stefano Garzarella wrote: On Tue, Oct 17, 2023 at 10:11:33PM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. Works

Re: [PATCH vhost v4 00/16] vdpa: Add support for vq descriptor mappings

2023-10-19 Thread Si-Wei Liu
For patches 05-16: Reviewed-by: Si-Wei Liu Tested-by: Si-Wei Liu Thanks for the fixes! On 10/18/2023 10:14 AM, Dragos Tatulea wrote: This patch series adds support for vq descriptor table mappings which are used to improve vdpa live migration downtime. The improvement comes from using

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Dongli Zhang
Hi Vitaly, Sean and David, On 10/19/23 08:40, Sean Christopherson wrote: > On Thu, Oct 19, 2023, Vitaly Kuznetsov wrote: >> Dongli Zhang writes: >> >>> As mentioned in the linux kernel development document, "sched_clock() is >>> used for scheduling and timestamping". While there is a default

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Si-Wei Liu
On 10/17/2023 10:27 PM, Jason Wang wrote: If we do this without a negotiation, IOTLB will not be clear but the Qemu will try to re-program the IOTLB after reset. Which will break? 1) stick the exact old behaviour with just one line of check It's not just one line of check here, the old

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Si-Wei Liu
On 10/19/2023 7:39 AM, Eugenio Perez Martin wrote: On Thu, Oct 19, 2023 at 10:27 AM Jason Wang wrote: On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: On 10/18/2023 7:53 PM, Jason Wang wrote: On Wed, Oct 18, 2023 at 4:49 PM Si-Wei Liu wrote: On 10/18/2023 12:00 AM, Jason Wang wrote:

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread David Woodhouse
On Thu, 2023-10-19 at 08:40 -0700, Sean Christopherson wrote: > > > Normally, it should be up to the hypervisor to tell the guest which > > clock to use, i.e. if TSC is reliable or not. Let me put my question > > this way: if TSC on the particular host is good for everything, why > > does the

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-19 Thread Xuan Zhuo
On Thu, 19 Oct 2023 12:16:24 +0200, Jakub Sitnicki wrote: > Since commit 19e226e8cc5d ("virtio: Make vp_set_vq_affinity() take a > mask.") it is actually not needed to have a local copy of the cpu mask. Could you give more info to prove this? If you are right, I think you should delete all

Re: [PATCH 2/2] virtio_pci: Switch away from deprecated irq_set_affinity_hint

2023-10-19 Thread Xuan Zhuo
On Thu, 19 Oct 2023 12:16:25 +0200, Jakub Sitnicki wrote: > Since commit 65c7cdedeb30 ("genirq: Provide new interfaces for affinity > hints") irq_set_affinity_hint is being phased out. > > Switch to new interfaces for setting and applying irq affinity hints. > > Signed-off-by: Jakub Sitnicki

Re: [PATCH v3 5/5] x86/paravirt: remove no longer needed paravirt patching code

2023-10-19 Thread kernel test robot
-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Juergen-Gross/x86-paravirt-move-some-functions-and-defines-to-alternative/20231019-171709 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue patch link: https://lore.kernel.org

Re: [PATCH v3 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-10-19 Thread kernel test robot
-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Juergen-Gross/x86-paravirt-move-some-functions-and-defines-to-alternative/20231019-171709 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue patch link: https://lore.kernel.org

Re: [PATCH RFC 1/1] x86/paravirt: introduce param to disable pv sched_clock

2023-10-19 Thread Vitaly Kuznetsov
Dongli Zhang writes: > As mentioned in the linux kernel development document, "sched_clock() is > used for scheduling and timestamping". While there is a default native > implementation, many paravirtualizations have their own implementations. > > About KVM, it uses kvm_sched_clock_read() and

Re: [PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-19 Thread kernel test robot
-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Juergen-Gross/x86-paravirt-move-some-functions-and-defines-to-alternative/20231019-171709 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue patch link: https://lore.kernel.org

[PATCH 2/2] virtio_pci: Switch away from deprecated irq_set_affinity_hint

2023-10-19 Thread Jakub Sitnicki via Virtualization
Since commit 65c7cdedeb30 ("genirq: Provide new interfaces for affinity hints") irq_set_affinity_hint is being phased out. Switch to new interfaces for setting and applying irq affinity hints. Signed-off-by: Jakub Sitnicki --- drivers/virtio/virtio_pci_common.c | 4 ++-- 1 file changed, 2

[PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-19 Thread Jakub Sitnicki via Virtualization
Since commit 19e226e8cc5d ("virtio: Make vp_set_vq_affinity() take a mask.") it is actually not needed to have a local copy of the cpu mask. Pass the cpu mask we got as argument to set the irq affinity hint. Cc: Caleb Raitto Signed-off-by: Jakub Sitnicki --- drivers/virtio/virtio_pci_common.c

Re: PING: [PATCH] virtio-blk: fix implicit overflow on virtio_max_dma_size

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 05:43:55PM +0800, zhenwei pi wrote: > Hi Michael, > > This seems to have been ignored as you suggested. > > LINK: https://www.spinics.net/lists/linux-virtualization/msg63015.html Pls Cc more widely then: Paolo Bonzini (reviewer:VIRTIO BLOCK AND SCSI DRIVERS) Stefan

PING: [PATCH] virtio-blk: fix implicit overflow on virtio_max_dma_size

2023-10-19 Thread zhenwei pi via Virtualization
Hi Michael, This seems to have been ignored as you suggested. LINK: https://www.spinics.net/lists/linux-virtualization/msg63015.html On 9/4/23 14:10, zhenwei pi wrote: The following codes have an implicit conversion from size_t to u32: (u32)max_size = (size_t)virtio_max_dma_size(vdev); This

Re: [RFC v2 PATCH] vdpa_sim: implement .reset_map support

2023-10-19 Thread Stefano Garzarella
On Wed, Oct 18, 2023 at 04:47:48PM -0700, Si-Wei Liu wrote: On 10/18/2023 1:05 AM, Stefano Garzarella wrote: On Tue, Oct 17, 2023 at 10:11:33PM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. Works fine with vdpa-sim-net which uses physical address to

[PATCH v3 5/5] x86/paravirt: remove no longer needed paravirt patching code

2023-10-19 Thread Juergen Gross via Virtualization
Now that paravirt is using the alternatives patching infrastructure, remove the paravirt patching code. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/paravirt.h | 18 arch/x86/include/asm/paravirt_types.h | 40

[PATCH v3 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-10-19 Thread Juergen Gross via Virtualization
Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful regarding the sequence of alternative and paravirt patching. For call depth tracking callthunks_setup() needs to

[PATCH v3 3/5] x86/paravirt: introduce ALT_NOT_XEN

2023-10-19 Thread Juergen Gross via Virtualization
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch --- arch/x86/include/asm/paravirt.h | 42 --- arch/x86/include/asm/paravirt_types.h

[PATCH v3 0/5] x86/paravirt: Get rid of paravirt patching

2023-10-19 Thread Juergen Gross via Virtualization
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro

[PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-19 Thread Juergen Gross via Virtualization
As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to alternative code and header. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/alternative.h| 16

Re: [PATCH] vsock: initialize the_virtio_vsock before using VQs

2023-10-19 Thread Stefano Garzarella
On Wed, Oct 18, 2023 at 09:32:47PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If 'the_virtio_vsock' is not initialized before, replies are silently dropped and do not reach the host. Are replies really dropped or

Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 03:13:48PM +0800, Xuan Zhuo wrote: > On Thu, 19 Oct 2023 02:38:16 -0400, "Michael S. Tsirkin" > wrote: > > On Tue, Oct 17, 2023 at 10:02:05AM +0800, Xuan Zhuo wrote: > > > On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski > > > wrote: > > > > On Mon, 16 Oct 2023

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Jason Wang
On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: > > > > On 10/18/2023 7:53 PM, Jason Wang wrote: > > On Wed, Oct 18, 2023 at 4:49 PM Si-Wei Liu wrote: > >> > >> > >> On 10/18/2023 12:00 AM, Jason Wang wrote: > Unfortunately, it's a must to stick to ABI. I agree it's a mess but we >

Re: [PATCH v5 9/9] drm: ci: Update xfails

2023-10-19 Thread Daniel Stone
Hi Vignesh, On Thu, 19 Oct 2023 at 09:07, Vignesh Raman wrote: > +# Some tests crashes with malloc error and IGT tests floods > +# the CI log with error messages and we end up with a warning message > +# Job's log exceeded limit of 4194304 bytes. > +# Job execution will continue but no more

Re: [PATCH net-next v1 04/19] virtio_net: move to virtio_net.h

2023-10-19 Thread Xuan Zhuo
On Thu, 19 Oct 2023 14:12:55 +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > > > Move some structure definitions and inline functions into the > > virtio_net.h file. > > Some of the functions are not inline one before the moving. I'm not > sure what's the criteria

Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer

2023-10-19 Thread Xuan Zhuo
On Thu, 19 Oct 2023 02:38:16 -0400, "Michael S. Tsirkin" wrote: > On Tue, Oct 17, 2023 at 10:02:05AM +0800, Xuan Zhuo wrote: > > On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski wrote: > > > On Mon, 16 Oct 2023 20:00:27 +0800 Xuan Zhuo wrote: > > > > @@ -305,9 +311,15 @@ static inline void

[PATCH vhost] virtio_ring: add BUG_ON() when vq is set to premapped mode and vq is not empty

2023-10-19 Thread Xuan Zhuo
Add BUG_ON check to make sure virtqueue_set_dma_premapped() is not misused. This function must be called immediately after creating the vq, or after vq reset, and before adding any buffers to it. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 5 + 1 file changed, 1

Re: [PATCH vhost] virtio-ring: split: update avali idx lazily

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 02:35:33PM +0800, Xuan Zhuo wrote: > If the vhost-user device is in busy-polling mode, the cachelines of > avali ring avail same in subject > are raced by the driver process and the vhost-user process. > Because that the idx will be updated everytime, when the new ring

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Si-Wei Liu
On 10/18/2023 7:53 PM, Jason Wang wrote: On Wed, Oct 18, 2023 at 4:49 PM Si-Wei Liu wrote: On 10/18/2023 12:00 AM, Jason Wang wrote: Unfortunately, it's a must to stick to ABI. I agree it's a mess but we don't have a better choice. Or we can fail the probe if userspace doesn't ack this

Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer

2023-10-19 Thread Michael S. Tsirkin
On Tue, Oct 17, 2023 at 10:02:05AM +0800, Xuan Zhuo wrote: > On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski wrote: > > On Mon, 16 Oct 2023 20:00:27 +0800 Xuan Zhuo wrote: > > > @@ -305,9 +311,15 @@ static inline void virtnet_free_old_xmit(struct > > > virtnet_sq *sq, bool in_napi, > > > > >

Re: [PATCH net-next v1 05/19] virtio_net: add prefix virtnet to all struct/api inside virtio_net.h

2023-10-19 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 02:14:27PM +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > We move some structures and APIs to the header file, but these > > structures and APIs do not prefixed with virtnet. This patch adds > > virtnet for these. > > What's the

[PATCH vhost] virtio-ring: split: update avali idx lazily

2023-10-19 Thread Xuan Zhuo
If the vhost-user device is in busy-polling mode, the cachelines of avali ring are raced by the driver process and the vhost-user process. Because that the idx will be updated everytime, when the new ring items are updated. So one cache line will be read too times, the two processes will race the

Re: [PATCH net-next v1 07/19] virtio_net: separate virtnet_tx_resize()

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > This patch separates two sub-functions from virtnet_tx_resize(): > > * virtnet_tx_pause > * virtnet_tx_resume > > Then the subsequent virtnet_tx_reset() can share these two functions. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks

Re: [PATCH net-next v1 06/19] virtio_net: separate virtnet_rx_resize()

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > This patch separates two sub-functions from virtnet_rx_resize(): > > * virtnet_rx_pause > * virtnet_rx_resume > > Then the subsequent reset rx for xsk can share these two functions. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks

Re: [PATCH net-next v1 05/19] virtio_net: add prefix virtnet to all struct/api inside virtio_net.h

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > We move some structures and APIs to the header file, but these > structures and APIs do not prefixed with virtnet. This patch adds > virtnet for these. What's the benefit of doing this? AFAIK virtio-net is the only user for virtio-net.h?

Re: [PATCH net-next v1 04/19] virtio_net: move to virtio_net.h

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > Move some structure definitions and inline functions into the > virtio_net.h file. Some of the functions are not inline one before the moving. I'm not sure what's the criteria to choose the function to be moved. > > Signed-off-by: Xuan Zhuo

Re: [PATCH net-next v1 03/19] virtio_net: independent directory

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > Create a separate directory for virtio-net. AF_XDP support will be added > later, then a separate xsk.c file will be added, so we should create a > directory for virtio-net. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- >