Conceptually, kvm_arch_vcpu_runnable() should be "not waiting,
or waiting for interrupts and interrupts are pending",
!waiting-uninterruptable &&
(!waiting-for-interrupts || interrupts-pending)
but the implementation was only
!waiting-uninterruptable && interrupts-pending
Thanks to the co
When the vPMU is in use if a VCPU's perf event overflow handler
were to fire after the VCPU started waiting, then the wake up
done by the kvm_vcpu_kick() call in the handler would do nothing,
as no "pmu overflow" state is checked in kvm_arch_vcpu_runnable().
Fix this by checking the IRQ_PENDING VCP
Before we add more common code to the wfi emulation, let's first
factor out everything common.
Signed-off-by: Andrew Jones
---
arch/arm/include/asm/kvm_host.h | 2 ++
arch/arm/kvm/handle_exit.c| 14 +-
arch/arm64/include/asm/kvm_host.h | 2 ++
arch/arm64/kvm/handle_exit.c
Introduce vcpu_should_sleep() in order to tidy several places up
that the compound 'power_off || pause' condition is used.
Signed-off-by: Andrew Jones
---
virt/kvm/arm/arm.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/
This prepares for more MP states to be used.
Signed-off-by: Andrew Jones
---
arch/arm/include/asm/kvm_host.h | 6 --
arch/arm64/include/asm/kvm_host.h | 6 --
virt/kvm/arm/arm.c| 26 ++
virt/kvm/arm/psci.c | 17 +
Only patch 5/5 fixes anything, and that's just a theoretical bug,
but, IMHO, this series future-proofs and improves the maintainability
of the code. See https://www.spinics.net/lists/kvm-arm/msg27254.html
for a TL;DR analysis that led to this series.
Thanks,
drew
Andrew Jones (5):
KVM: arm/arm
On Sun, Sep 17, 2017 at 06:32:10PM +0200, Andrew Jones wrote:
> Oh, kvm_arch_vcpu_runnable(), how I love thee. Let me count the ways:
I just sent patches for this, as patches speak louder than poetry, but
the series makes a couple changes to the proposal:
>
>
> Proposal
>
>
>
On Thu, Sep 14, 2017 at 01:57:08PM +0100, Alex Bennée wrote:
>
> Dave Martin writes:
>
> > This patch defines and implements a new regset NT_ARM_SVE, which
> > describes a thread's SVE register state. This allows a debugger to
> > manipulate the SVE state, as well as being included in ELF
> > c
On Thu, Sep 14, 2017 at 02:31:13PM +0100, Alex Bennée wrote:
>
> Dave Martin writes:
>
> > When trapping forbidden attempts by a guest to use SVE, we want the
> > guest to see a trap consistent with SVE not being implemented.
> >
> > This patch injects an undefined instruction exception into the
Dave Martin writes:
> On Thu, Sep 14, 2017 at 02:31:13PM +0100, Alex Bennée wrote:
>>
>> Dave Martin writes:
>>
>> > When trapping forbidden attempts by a guest to use SVE, we want the
>> > guest to see a trap consistent with SVE not being implemented.
>> >
>> > This patch injects an undefined
10 matches
Mail list logo