Re: [v5.15] WARNING in kvm_arch_vcpu_ioctl_run

2023-12-25 Thread syzbot
This bug is marked as fixed by commit: KVM: x86: Remove WARN sanity check on hypervisor timer vs. UNINITIALIZED vCPU But I can't find it in the tested trees[1] for more than 90 days. Is it a correct commit? Please update it by replying: #syz fix: exact-commit-title Until then the bug is still co

[PATCH V12 00/14] riscv: Add Native/Paravirt qspinlock support

2023-12-25 Thread guoren
From: Guo Ren patch[1 - 8]: Native qspinlock patch[9 -14]: Paravirt qspinlock This series based on: - v6.7-rc7 - Rework & improve riscv cmpxchg.h and atomic.h https://lore.kernel.org/linux-riscv/20230810040349.92279-2-leob...@redhat.com/ You can directly try it: https://github.com/guore

[PATCH V12 01/14] asm-generic: ticket-lock: Reuse arch_spinlock_t of qspinlock

2023-12-25 Thread guoren
From: Guo Ren The arch_spinlock_t of qspinlock has contained the atomic_t val, which satisfies the ticket-lock requirement. Thus, unify the arch_spinlock_t into qspinlock_types.h. This is the preparation for the next combo spinlock. Reviewed-by: Leonardo Bras Suggested-by: Arnd Bergmann Link:

[PATCH V12 02/14] asm-generic: ticket-lock: Add separate ticket-lock.h

2023-12-25 Thread guoren
From: Guo Ren Add a separate ticket-lock.h to include multiple spinlock versions and select one at compile time or runtime. Reviewed-by: Leonardo Bras Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/linux-riscv/cak8p3a2rnz9mqqhn6-e0cguuv9rntrelfdxt_weid7fxh7f...@mail.gmail.com/ Sign

[PATCH V12 03/14] riscv: errata: Move errata vendor func-id into vendorid_list.h

2023-12-25 Thread guoren
From: Guo Ren Move errata vendor func-id definitions from errata_list into vendorid_list.h. Unifying these definitions is also for following rwonce errata implementation. Suggested-by: Leonardo Bras Link: https://lore.kernel.org/linux-riscv/zqlfj1cmq8pao...@redhat.com/ Signed-off-by: Guo Ren S

[PATCH V12 04/14] riscv: qspinlock: errata: Add ERRATA_THEAD_WRITE_ONCE fixup

2023-12-25 Thread guoren
From: Guo Ren The early version of T-Head C9xx cores has a store merge buffer delay problem. The store merge buffer could improve the store queue performance by merging multi-store requests, but when there are not continued store requests, the prior single store request would be waiting in the st

[PATCH V12 05/14] riscv: qspinlock: Add basic queued_spinlock support

2023-12-25 Thread guoren
From: Guo Ren The requirements of qspinlock have been documented by commit: a8ad07e5240c ("asm-generic: qspinlock: Indicate the use of mixed-size atomics"). Although RISC-V ISA gives out a weaker forward guarantee LR/SC, which doesn't satisfy the requirements of qspinlock above, it won't prevent

[PATCH V12 06/14] riscv: qspinlock: Introduce combo spinlock

2023-12-25 Thread guoren
From: Guo Ren Combo spinlock could support queued and ticket in one Linux Image and select them during boot time via command line. Here is the func size (Bytes) comparison table below: TYPE: COMBO | TICKET | QUEUED arch_spin_lock : 106 | 60 | 50 arch_spin_unloc

[PATCH V12 07/14] riscv: qspinlock: Add virt_spin_lock() support for VM guest

2023-12-25 Thread guoren
From: Guo Ren Add a static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. The VM guests should fall back to a Test-and-Set spinlock, because fair locks have horrible lock 'holder' preemption issues. The virt_spin_lock_key wo

[PATCH V12 08/14] riscv: qspinlock: Force virt_spin_lock for KVM guests

2023-12-25 Thread guoren
From: Guo Ren Force to enable virt_spin_lock when KVM guest, because fair locks have horrible lock 'holder' preemption issues. Suggested-by: Leonardo Bras Link: https://lkml.kernel.org/kvm/zqk9-tn2mepxl...@redhat.com/ Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/riscv/include/asm/s

[PATCH V12 09/14] RISC-V: paravirt: Add pvqspinlock KVM backend

2023-12-25 Thread guoren
From: Guo Ren Add the files functions needed to support the SBI PVLOCK (paravirt qspinlock kick_cpu) extension. Implement kvm_sbi_ext_pvlock_kick_- cpu(), and we only need to call the kvm_vcpu_kick() and bring target_vcpu from the halt state. No irq raised, no other request, just a pure vcpu_kick

[PATCH V12 10/14] RISC-V: paravirt: Add pvqspinlock frontend skeleton

2023-12-25 Thread guoren
From: Guo Ren Using static_call to switch between: native_queued_spin_lock_slowpath()__pv_queued_spin_lock_slowpath() native_queued_spin_unlock() __pv_queued_spin_unlock() Finish the pv_wait implementation, but pv_kick needs the SBI definition of the next patches. Reviewed-by:

[PATCH V12 11/14] RISC-V: paravirt: pvqspinlock: Add SBI implementation

2023-12-25 Thread guoren
From: Guo Ren Implement pv_kick with SBI guest implementation, and add SBI_EXT_PVLOCK extension detection. The backend part is in the KVM pvqspinlock patch. Reviewed-by: Leonardo Bras Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/riscv/include/asm/sbi.h | 6 ++ arch/ri

[PATCH V12 12/14] RISC-V: paravirt: pvqspinlock: Add nopvspin kernel parameter

2023-12-25 Thread guoren
From: Guo Ren Disables the qspinlock slow path using PV optimizations which allow the hypervisor to 'idle' the guest on lock contention. Reviewed-by: Leonardo Bras Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/riscv/kernel/qsp

[PATCH V12 13/14] RISC-V: paravirt: pvqspinlock: Add kconfig entry

2023-12-25 Thread guoren
From: Guo Ren Add kconfig entry for paravirt_spinlock, an unfair qspinlock virtualization-friendly backend, by halting the virtual CPU rather than spinning. Reviewed-by: Leonardo Bras Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- arch/riscv/Kconfig | 12 arch/riscv/k

[PATCH V12 14/14] RISC-V: paravirt: pvqspinlock: Add trace point for pv_kick/wait

2023-12-25 Thread guoren
From: Guo Ren Add trace point for pv_kick&wait, here is the output: ls /sys/kernel/debug/tracing/events/paravirt/ enable filter pv_kick pv_wait cat /sys/kernel/debug/tracing/trace entries-in-buffer/entries-written: 33927/33927 #P:12 _-=> irqs-off/BH

[GIT PULL] virtio: bugfixes

2023-12-25 Thread Michael S. Tsirkin
The following changes since commit cefc9ba6aed48a3aa085888e3262ac2aa975714b: pds_vdpa: set features order (2023-12-01 09:55:01 -0500) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to b8e079244

[PATCH 0/2] vdpa: Block vq property change in DRIVER_OK

2023-12-25 Thread Dragos Tatulea
This series prevents the change of virtqueue address or state when a device is in DRIVER_OK and not suspended. The virtio spec doesn't allow changing virtqueue addresses and state in DRIVER_OK, but some devices do support this operation when the device is suspended. The series leaves the door open

[PATCH 1/2] vdpa: Track device suspended state

2023-12-25 Thread Dragos Tatulea
Set vdpa device suspended state on successful suspend. Clear it on successful resume and reset. The state will be locked by the vhost_vdpa mutex. The mutex is taken during suspend, resume and reset in vhost_vdpa_unlocked_ioctl. The exception is vhost_vdpa_open which does a device reset but that sh

[PATCH 2/2] vdpa: Block vq property changes in DRIVER_OK

2023-12-25 Thread Dragos Tatulea
The virtio standard doesn't allow for virtqueue address and state changes when the device is in DRIVER_OK. Return an error in such cases unless the device is suspended. The suspended device exception is needed because some devices support virtqueue changes when the device is suspended. Signed-off

Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag

2023-12-25 Thread Dragos Tatulea
On Fri, 2023-12-22 at 11:51 +0100, Dragos Tatulea wrote: > On Fri, 2023-12-22 at 03:29 -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 21, 2023 at 03:07:22PM +, Dragos Tatulea wrote: > > > > > > In that case you're right, we don't need feature flags. But I think > > > > > > it > > > > > > wou

Re: [PATCH 0/2] vdpa: Block vq property change in DRIVER_OK

2023-12-25 Thread Michael S. Tsirkin
On Mon, Dec 25, 2023 at 03:42:08PM +0200, Dragos Tatulea wrote: > This series prevents the change of virtqueue address or state when a > device is in DRIVER_OK and not suspended. The virtio spec doesn't > allow changing virtqueue addresses and state in DRIVER_OK, but some devices > do support this

Re: [PATCH vhost v4 00/15] vdpa/mlx5: Add support for resumable vqs

2023-12-25 Thread Michael S. Tsirkin
On Tue, Dec 19, 2023 at 08:08:43PM +0200, Dragos Tatulea wrote: > Add support for resumable vqs in the mlx5_vdpa driver. This is a > firmware feature that can be used for the following benefits: > - Full device .suspend/.resume. > - .set_map doesn't need to destroy and create new vqs anymore just t

Re: [PATCH vhost v4 00/15] vdpa/mlx5: Add support for resumable vqs

2023-12-25 Thread Dragos Tatulea
On Mon, 2023-12-25 at 09:41 -0500, Michael S. Tsirkin wrote: > On Tue, Dec 19, 2023 at 08:08:43PM +0200, Dragos Tatulea wrote: > > Add support for resumable vqs in the mlx5_vdpa driver. This is a > > firmware feature that can be used for the following benefits: > > - Full device .suspend/.resume. >

Re: [PATCH 0/2] vdpa: Block vq property change in DRIVER_OK

2023-12-25 Thread Dragos Tatulea
On Mon, 2023-12-25 at 09:40 -0500, Michael S. Tsirkin wrote: > On Mon, Dec 25, 2023 at 03:42:08PM +0200, Dragos Tatulea wrote: > > This series prevents the change of virtqueue address or state when a > > device is in DRIVER_OK and not suspended. The virtio spec doesn't > > allow changing virtqueue

[PATCH vhost v5 0/8] vdpa/mlx5: Add support for resumable vqs

2023-12-25 Thread Dragos Tatulea
Add support for resumable vqs in the mlx5_vdpa driver. This is a firmware feature that can be used for the following benefits: - Full device .suspend/.resume. - .set_map doesn't need to destroy and create new vqs anymore just to update the map. When resumable vqs are supported it is enough to s

[PATCH mlx5-vhost v5 1/8] vdpa/mlx5: Expose resumable vq capability

2023-12-25 Thread Dragos Tatulea
Necessary for checking if resumable vqs are supported by the hardware. Actual support will be added in a downstream patch. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea --- include/linux/mlx5/mlx5_ifc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH vhost v5 2/8] vdpa/mlx5: Allow modifying multiple vq fields in one modify command

2023-12-25 Thread Dragos Tatulea
Add a bitmask variable that tracks hw vq field changes that are supposed to be modified on next hw vq change command. This will be useful to set multiple vq fields when resuming the vq. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea --- d

[PATCH vhost v5 3/8] vdpa/mlx5: Introduce per vq and device resume

2023-12-25 Thread Dragos Tatulea
Implement vdpa vq and device resume if capability detected. Add support for suspend -> ready state change. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 69 +++ 1 file ch

[PATCH vhost v5 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-25 Thread Dragos Tatulea
Addresses get set by .set_vq_address. hw vq addresses will be updated on next modify_virtqueue. Reviewed-by: Gal Pressman Signed-off-by: Dragos Tatulea --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 9 + include/linux/mlx5/mlx5_ifc_vdpa.h | 1 + 2 files changed, 10 insertions(+) diff --git a

[PATCH vhost v5 7/8] vdpa/mlx5: Introduce reference counting to mrs

2023-12-25 Thread Dragos Tatulea
Deleting the old mr during mr update (.set_map) and then modifying the vqs with the new mr is not a good flow for firmware. The firmware expects that mkeys are deleted after there are no more vqs referencing them. Introduce reference counting for mrs to fix this. It is the only way to make sure th

[PATCH vhost v5 5/8] vdpa/mlx5: Mark vq state for modification in hw vq

2023-12-25 Thread Dragos Tatulea
.set_vq_state will set the indices and mark the fields to be modified in the hw vq. Advertise that the device supports changing the vq state when the device is in DRIVER_OK state and suspended. Reviewed-by: Gal Pressman Signed-off-by: Dragos Tatulea Acked-by: Jason Wang --- drivers/vdpa/mlx5/

[PATCH vhost v5 6/8] vdpa/mlx5: Use vq suspend/resume during .set_map

2023-12-25 Thread Dragos Tatulea
Instead of tearing down and setting up vq resources, use vq suspend/resume during .set_map to speed things up a bit. The vq mr is updated with the new mapping while the vqs are suspended. If the device doesn't support resumable vqs, do the old teardown and setup dance. Reviewed-by: Gal Pressman

[PATCH vhost v5 8/8] vdpa/mlx5: Add mkey leak detection

2023-12-25 Thread Dragos Tatulea
Track allocated mrs in a list and show warning when leaks are detected on device free or reset. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea --- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 2 ++ drivers/vdpa/mlx5/core/mr.c| 23 +++ drive

Re: Avoid unprivileged splice(file->)/(->socket) pipe exclusion

2023-12-25 Thread Askar Safin
Hi, Ahelenia Ziemiańska! Thanks a lot for all this splice-related hard work! In https://lore.kernel.org/lkml/CAHk-=wgG_2cmHgZwKjydi7=iimyhyn8aessnbm9xq9ufbau...@mail.gmail.com/ Linus said: > I have grown to pretty much hate > splice() over the years, just because it's been a constant source of >

Re: Avoid unprivileged splice(file->)/(->socket) pipe exclusion

2023-12-25 Thread Ahelenia Ziemiańska
On Tue, Dec 26, 2023 at 12:34:44AM +0300, Askar Safin wrote: > In > https://lore.kernel.org/lkml/CAHk-=wgG_2cmHgZwKjydi7=iimyhyn8aessnbm9xq9ufbau...@mail.gmail.com/ > Linus said: > > I have grown to pretty much hate > > splice() over the years, just because it's been a constant source of > > sorro

Re: [GIT PULL] virtio: bugfixes

2023-12-25 Thread pr-tracker-bot
The pull request you sent on Mon, 25 Dec 2023 08:27:49 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/fbafc3e621c3f4ded43720fdb1d6ce1728ec664e Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH v5 11/34] function_graph: Have the instances use their own ftrace_ops for filtering

2023-12-25 Thread Google
Hi, On Mon, 18 Dec 2023 22:13:46 +0900 "Masami Hiramatsu (Google)" wrote: > @@ -408,15 +395,51 @@ int function_graph_enter(unsigned long ret, unsigned > long func, > return -EBUSY; > } > > +/* This is called from ftrace_graph_func() via ftrace */ > +int function_graph_enter_ops(unsigne

Re: [PATCH V12 00/14] riscv: Add Native/Paravirt qspinlock support

2023-12-25 Thread Guo Ren
Sorry, I missed people on the list. F.Y.I Waiman Long Boqun Feng Here is Link: https://lore.kernel.org/linux-riscv/20231225125847.2778638-1-guo...@kernel.org/ On Mon, Dec 25, 2023 at 8:59 PM wrote: > > From: Guo Ren > > patch[1 - 8]: Native qspinlock > patch[9 -14]: Paravirt qspinlock > >

[PATCH] block: Add ioprio to block_rq tracepoint

2023-12-25 Thread Dongliang Cui
Sometimes we need to track the processing order of requests with ioprio set, especially when using mq-deadline. So the ioprio of request can be useful information. Signed-off-by: Dongliang Cui --- include/trace/events/block.h | 20 ++-- 1 file changed, 14 insertions(+), 6 deletio

Re: [PATCH v2 3/5] thermal/cpufreq: Remove arch_update_thermal_pressure()

2023-12-25 Thread Viresh Kumar
On 21-12-23, 16:24, Vincent Guittot wrote: > arch_update_thermal_pressure() aims to update fast changing signal which > should be averaged using PELT filtering before being provided to the > scheduler which can't make smart use of fast changing signal. > cpufreq now provides the maximum freq_qos pr