* [GIT PULL] KVM/riscv fixes for 5.19, take #2
@ 2022-07-13 5:47 ` Anup Patel
0 siblings, 0 replies; 8+ messages in thread
From: Anup Patel @ 2022-07-13 5:47 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
Hi Paolo,
We have two more fixes for 5.19 which were discovered recently:
1) Fix missing PAGE_PFN_MASK
2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
Please pull.
Regards,
Anup
The following changes since commit 32346491ddf24599decca06190ebca03ff9de7f8:
Linux 5.19-rc6 (2022-07-10 14:40:51 -0700)
are available in the Git repository at:
https://github.com/kvm-riscv/linux.git tags/kvm-riscv-fixes-5.19-2
for you to fetch changes up to be82abe6a76ba8e76f25312566182b0f13c4fbf9:
RISC-V: KVM: Fix SRCU deadlock caused by
kvm_riscv_check_vcpu_requests() (2022-07-11 09:36:32 +0530)
----------------------------------------------------------------
KVM/riscv fixes for 5.19, take #2
- Fix missing PAGE_PFN_MASK
- Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
----------------------------------------------------------------
Alexandre Ghiti (1):
riscv: Fix missing PAGE_PFN_MASK
Anup Patel (1):
RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
arch/riscv/include/asm/pgtable-64.h | 12 ++++++------
arch/riscv/include/asm/pgtable.h | 6 +++---
arch/riscv/kvm/mmu.c | 2 +-
arch/riscv/kvm/vcpu.c | 2 ++
4 files changed, 12 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [GIT PULL] KVM/riscv fixes for 5.19, take #2
@ 2022-07-13 5:47 ` Anup Patel
0 siblings, 0 replies; 8+ messages in thread
From: Anup Patel @ 2022-07-13 5:47 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
Hi Paolo,
We have two more fixes for 5.19 which were discovered recently:
1) Fix missing PAGE_PFN_MASK
2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
Please pull.
Regards,
Anup
The following changes since commit 32346491ddf24599decca06190ebca03ff9de7f8:
Linux 5.19-rc6 (2022-07-10 14:40:51 -0700)
are available in the Git repository at:
https://github.com/kvm-riscv/linux.git tags/kvm-riscv-fixes-5.19-2
for you to fetch changes up to be82abe6a76ba8e76f25312566182b0f13c4fbf9:
RISC-V: KVM: Fix SRCU deadlock caused by
kvm_riscv_check_vcpu_requests() (2022-07-11 09:36:32 +0530)
----------------------------------------------------------------
KVM/riscv fixes for 5.19, take #2
- Fix missing PAGE_PFN_MASK
- Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
----------------------------------------------------------------
Alexandre Ghiti (1):
riscv: Fix missing PAGE_PFN_MASK
Anup Patel (1):
RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
arch/riscv/include/asm/pgtable-64.h | 12 ++++++------
arch/riscv/include/asm/pgtable.h | 6 +++---
arch/riscv/kvm/mmu.c | 2 +-
arch/riscv/kvm/vcpu.c | 2 ++
4 files changed, 12 insertions(+), 10 deletions(-)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
2022-07-13 5:47 ` Anup Patel
@ 2022-07-13 6:00 ` Paolo Bonzini
-1 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-13 6:00 UTC (permalink / raw)
To: Anup Patel
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On 7/13/22 07:47, Anup Patel wrote:
> Hi Paolo,
>
> We have two more fixes for 5.19 which were discovered recently:
> 1) Fix missing PAGE_PFN_MASK
> 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
Pulled, thanks.
For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
kvm_vcpu_block.
Also, I only had a quick look but it seems like vcpu->arch.pause is
never written?
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
@ 2022-07-13 6:00 ` Paolo Bonzini
0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-13 6:00 UTC (permalink / raw)
To: Anup Patel
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On 7/13/22 07:47, Anup Patel wrote:
> Hi Paolo,
>
> We have two more fixes for 5.19 which were discovered recently:
> 1) Fix missing PAGE_PFN_MASK
> 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
Pulled, thanks.
For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
kvm_vcpu_block.
Also, I only had a quick look but it seems like vcpu->arch.pause is
never written?
Paolo
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
2022-07-13 6:00 ` Paolo Bonzini
@ 2022-07-13 7:17 ` Anup Patel
-1 siblings, 0 replies; 8+ messages in thread
From: Anup Patel @ 2022-07-13 7:17 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On Wed, Jul 13, 2022 at 11:30 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 7/13/22 07:47, Anup Patel wrote:
> > Hi Paolo,
> >
> > We have two more fixes for 5.19 which were discovered recently:
> > 1) Fix missing PAGE_PFN_MASK
> > 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
>
> Pulled, thanks.
>
> For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
> key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
> kvm_vcpu_block.
We are using KVM_REQ_SLEEP for VCPU hotplug. The secondary
VCPUs will block until woken-up by using an SBI call from other VCPU.
This is different from blocking on WFI where VCPU will wake-up upon
any interrupt.
I agree with your suggestion, we should definitely use kvm_vcpu_block()
here.
>
> Also, I only had a quick look but it seems like vcpu->arch.pause is
> never written?
Yes, the vcpu->arch.pause is redundant. I will remove it.
>
> Paolo
>
Thanks,
Anup
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
@ 2022-07-13 7:17 ` Anup Patel
0 siblings, 0 replies; 8+ messages in thread
From: Anup Patel @ 2022-07-13 7:17 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On Wed, Jul 13, 2022 at 11:30 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 7/13/22 07:47, Anup Patel wrote:
> > Hi Paolo,
> >
> > We have two more fixes for 5.19 which were discovered recently:
> > 1) Fix missing PAGE_PFN_MASK
> > 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
>
> Pulled, thanks.
>
> For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
> key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
> kvm_vcpu_block.
We are using KVM_REQ_SLEEP for VCPU hotplug. The secondary
VCPUs will block until woken-up by using an SBI call from other VCPU.
This is different from blocking on WFI where VCPU will wake-up upon
any interrupt.
I agree with your suggestion, we should definitely use kvm_vcpu_block()
here.
>
> Also, I only had a quick look but it seems like vcpu->arch.pause is
> never written?
Yes, the vcpu->arch.pause is redundant. I will remove it.
>
> Paolo
>
Thanks,
Anup
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
2022-07-13 7:17 ` Anup Patel
@ 2022-07-13 7:27 ` Paolo Bonzini
-1 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-13 7:27 UTC (permalink / raw)
To: Anup Patel
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On 7/13/22 09:17, Anup Patel wrote:
> On Wed, Jul 13, 2022 at 11:30 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 7/13/22 07:47, Anup Patel wrote:
>>> Hi Paolo,
>>>
>>> We have two more fixes for 5.19 which were discovered recently:
>>> 1) Fix missing PAGE_PFN_MASK
>>> 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
>>
>> Pulled, thanks.
>>
>> For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
>> key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
>> kvm_vcpu_block.
>
> We are using KVM_REQ_SLEEP for VCPU hotplug. The secondary
> VCPUs will block until woken-up by using an SBI call from other VCPU.
> This is different from blocking on WFI where VCPU will wake-up upon
> any interrupt.
Yes, I understand. The idea is to have something like
if (kvm_arch_vcpu_runnable())
vcpu_enter_guest(vcpu);
else
kvm_vcpu_block(vcpu);
instead of using KVM_REQ_SLEEP to enter the blocking loop. This works
for both WFI and hotplug, the only difference between the two cases is
the event that changes kvm_arch_vcpu_runnable() to true.
Paolo
> I agree with your suggestion, we should definitely use kvm_vcpu_block()
> here.
>
>>
>> Also, I only had a quick look but it seems like vcpu->arch.pause is
>> never written?
>
> Yes, the vcpu->arch.pause is redundant. I will remove it.
>
>>
>> Paolo
>>
>
> Thanks,
> Anup
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] KVM/riscv fixes for 5.19, take #2
@ 2022-07-13 7:27 ` Paolo Bonzini
0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-13 7:27 UTC (permalink / raw)
To: Anup Patel
Cc: Palmer Dabbelt, Atish Patra, KVM General,
open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv),
linux-riscv
On 7/13/22 09:17, Anup Patel wrote:
> On Wed, Jul 13, 2022 at 11:30 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 7/13/22 07:47, Anup Patel wrote:
>>> Hi Paolo,
>>>
>>> We have two more fixes for 5.19 which were discovered recently:
>>> 1) Fix missing PAGE_PFN_MASK
>>> 2) Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
>>
>> Pulled, thanks.
>>
>> For the latter, my suggestion is to remove KVM_REQ_SLEEP completely and
>> key the waiting on kvm_arch_vcpu_runnable using kvm_vcpu_halt or
>> kvm_vcpu_block.
>
> We are using KVM_REQ_SLEEP for VCPU hotplug. The secondary
> VCPUs will block until woken-up by using an SBI call from other VCPU.
> This is different from blocking on WFI where VCPU will wake-up upon
> any interrupt.
Yes, I understand. The idea is to have something like
if (kvm_arch_vcpu_runnable())
vcpu_enter_guest(vcpu);
else
kvm_vcpu_block(vcpu);
instead of using KVM_REQ_SLEEP to enter the blocking loop. This works
for both WFI and hotplug, the only difference between the two cases is
the event that changes kvm_arch_vcpu_runnable() to true.
Paolo
> I agree with your suggestion, we should definitely use kvm_vcpu_block()
> here.
>
>>
>> Also, I only had a quick look but it seems like vcpu->arch.pause is
>> never written?
>
> Yes, the vcpu->arch.pause is redundant. I will remove it.
>
>>
>> Paolo
>>
>
> Thanks,
> Anup
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-07-13 7:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 5:47 [GIT PULL] KVM/riscv fixes for 5.19, take #2 Anup Patel
2022-07-13 5:47 ` Anup Patel
2022-07-13 6:00 ` Paolo Bonzini
2022-07-13 6:00 ` Paolo Bonzini
2022-07-13 7:17 ` Anup Patel
2022-07-13 7:17 ` Anup Patel
2022-07-13 7:27 ` Paolo Bonzini
2022-07-13 7:27 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.