Re: [PATCH 2/2] tools/virtio: remove smp_read_barrier_depends()

2022-11-27 Thread Xuan Zhuo
On Sun, 27 Nov 2022 19:43:47 -0800, Davidlohr Bueso wrote: > This gets rid of the last references to smp_read_barrier_depends() > which for the kernel side was removed in v5.9. The serialization > required for Alpha is done inside READ_ONCE() instead of having > users deal with it. Simply use a f

Re: [PATCH 1/2] tools/virtio: remove stray characters

2022-11-27 Thread Xuan Zhuo
On Sun, 27 Nov 2022 19:43:46 -0800, Davidlohr Bueso wrote: > __read_once_size() is not a macro, remove those '/'s. > > Signed-off-by: Davidlohr Bueso Reviewed-by: Xuan Zhuo > --- > tools/virtio/ringtest/main.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > >

[PATCH 2/2] tools/virtio: remove smp_read_barrier_depends()

2022-11-27 Thread Davidlohr Bueso
This gets rid of the last references to smp_read_barrier_depends() which for the kernel side was removed in v5.9. The serialization required for Alpha is done inside READ_ONCE() instead of having users deal with it. Simply use a full barrier, the architecture does not have rmb in the first place.

[PATCH 0/2] tools/virtio: remove smp_read_barrier_depends()

2022-11-27 Thread Davidlohr Bueso
Hi, To my surprise, this call is still git-greppable in the tree, the kernel having gotten rid of it a while back. Thanks! Davidlohr Bueso (2): tools/virtio: remove stray characters tools/virtio: remove smp_read_barrier_depends() tools/virtio/ringtest/main.h | 37 +++---

[PATCH 1/2] tools/virtio: remove stray characters

2022-11-27 Thread Davidlohr Bueso
__read_once_size() is not a macro, remove those '/'s. Signed-off-by: Davidlohr Bueso --- tools/virtio/ringtest/main.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h index 6d1fccd3d86c..9ed09ca

Re: [PATCH] vduse: Fix a possible warning in vduse_create_dev()

2022-11-27 Thread Dan Carpenter
Btw, after you add the check to vduse_validate_config() you can test that it silences the Smatch warning by doing: kchecker --info drivers/vdpa/vdpa_user/vduse_dev.c | tee out ~/smatch/smatch_data/db/reload_partial.sh out kchecker drivers/vdpa/vdpa_user/vduse_dev.c You might need to do a second -

Re: [PATCH] vdpasim: support doorbell mapping

2022-11-27 Thread Jason Wang
On Mon, Nov 28, 2022 at 10:56 AM Longpeng(Mike) wrote: > > From: Longpeng > > Support doorbell mapping for vdpasim devices, then we can test the notify > passthrough feature even if there's no real hardware on hand. You can use vp_vdpa in L1 plus page_ver_vq in L0 to test it in L2. That is how I

Re: [PATCH v2] x86/paravirt: Use relative reference for original instruction

2022-11-27 Thread H. Peter Anvin
On November 27, 2022 7:03:20 PM PST, Hou Wenlong wrote: >On Sun, Nov 27, 2022 at 09:24:34AM -0800, H. Peter Anvin wrote: >> On November 24, 2022 3:51:53 AM PST, Hou Wenlong >> wrote: >> >Similar to the alternative patching, use relative reference for original >> >instruction rather than absolut

Re: [PATCH v2] x86/paravirt: Use relative reference for original instruction

2022-11-27 Thread H. Peter Anvin
On November 24, 2022 3:51:53 AM PST, Hou Wenlong wrote: >Similar to the alternative patching, use relative reference for original >instruction rather than absolute one, which saves 8 bytes for one entry >on x86_64. And it could generate R_X86_64_PC32 relocation instead of >R_X86_64_64 relocation

Re: [PATCH] vduse: Fix a possible warning in vduse_create_dev()

2022-11-27 Thread Michael S. Tsirkin
On Sun, Nov 27, 2022 at 08:16:24AM +0530, Harshit Mogalapalli wrote: > Hi Micheal, > > On 27/11/22 4:52 am, Michael S. Tsirkin wrote: > > On Fri, Nov 25, 2022 at 07:59:58PM -0800, Harshit Mogalapalli wrote: > > > As 'dev->vq_num' is user-controlled data, if user tries to allocate > > > memory larg