Re: [PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-19 Thread Leonardo Bras
On Tue, Sep 19, 2023 at 04:04:48PM +0800, Guo Ren wrote: > On Tue, Sep 19, 2023 at 1:30 PM Leonardo Bras wrote: > > > > On Sun, Sep 17, 2023 at 11:12:31PM +0800, Guo Ren wrote: > > > On Thu, Sep 14, 2023 at 4:02 PM Leonardo Bras wrote: > > > > > > > > On Sun, Sep 10, 2023 at 04:29:02AM -0400, guo

Re: [PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-19 Thread Guo Ren
On Tue, Sep 19, 2023 at 1:30 PM Leonardo Bras wrote: > > On Sun, Sep 17, 2023 at 11:12:31PM +0800, Guo Ren wrote: > > On Thu, Sep 14, 2023 at 4:02 PM Leonardo Bras wrote: > > > > > > On Sun, Sep 10, 2023 at 04:29:02AM -0400, guo...@kernel.org wrote: > > > > From: Guo Ren > > > > > > > > Add a st

Re: [PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-18 Thread Leonardo Bras
On Sun, Sep 17, 2023 at 11:12:31PM +0800, Guo Ren wrote: > On Thu, Sep 14, 2023 at 4:02 PM Leonardo Bras wrote: > > > > On Sun, Sep 10, 2023 at 04:29:02AM -0400, guo...@kernel.org wrote: > > > From: Guo Ren > > > > > > Add a static key controlling whether virt_spin_lock() should be > > > called o

Re: [PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-17 Thread Guo Ren
On Thu, Sep 14, 2023 at 4:02 PM Leonardo Bras wrote: > > On Sun, Sep 10, 2023 at 04:29:02AM -0400, guo...@kernel.org wrote: > > 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. > > > >

Re: [PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-14 Thread Leonardo Bras
On Sun, Sep 10, 2023 at 04:29:02AM -0400, guo...@kernel.org wrote: > 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 KVM guests fall back to a Test-and-Set spinlock, because fair > l

[PATCH V11 08/17] riscv: qspinlock: Add virt_spin_lock() support for KVM guest

2023-09-10 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 KVM guests fall back to a Test-and-Set spinlock, because fair locks have horrible lock 'holder' preemption issues. The virt_spin_lock_key would sh