Re: [RFC PATCH 09/16] KVM: arm64: Allow ID registers to by dynamically read-as-zero

2018-08-08 Thread Peter Maydell
On 8 August 2018 at 10:11, Dave Martin wrote: > At its heart, I'm trying to abstract out the special behaviour of > all unallocated ID registers, so that we can decide at runtime which > ones to hide fro the guest: within the ID register block, each > unallocated register becomes RAZ, not

[PATCH 2/4] KVM: arm/arm64: vgic-v3: Add core support for Group0 SGIs

2018-08-08 Thread Marc Zyngier
Although vgic-v3 now supports Group0 interrupts, it still doesn't deal with Group0 SGIs. As usually with the GIC, nothing is simple: - ICC_SGI1R can signal SGIs of both groups, since GICD_CTLR.DS==1 with KVM (as per 8.1.10, Non-secure EL1 access) - ICC_SGI0R can only generate Group0 SGIs -

[PATCH 0/4] KVM: arm/arm64: vgic-v3: Group0 SGI support

2018-08-08 Thread Marc Zyngier
Although we now have Group0 support, we still miss support for Group0 SGIs (which amounts to handling ICC_SGI0R_EL1 and ICC_ASGI1R_EL1 traps), and this small series adds such support. I appreciate this is *very* late for 4.19, I'd like to take it in as they complement Christoffer's Group0

[PATCH 4/4] KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses

2018-08-08 Thread Marc Zyngier
In order to generate Group0 SGIs, let's add some decoding logic to access_gic_sgi(), and pass the generating group accordingly. Signed-off-by: Marc Zyngier --- arch/arm/kvm/coproc.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git

[PATCH 3/4] KVM: arm64: vgic-v3: Add support for ICC_SGI0R_EL1 and ICC_ASGI1R_EL1 accesses

2018-08-08 Thread Marc Zyngier
In order to generate Group0 SGIs, let's add some decoding logic to access_gic_sgi(), and pass the generating group accordingly. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/sysreg.h | 2 ++ arch/arm64/kvm/sys_regs.c | 41 +++-- 2 files changed, 41

[PATCH] KVM: arm: Use true and false for boolean values

2018-08-08 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- arch/arm/include/asm/kvm_emulate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [RFC PATCH 09/16] KVM: arm64: Allow ID registers to by dynamically read-as-zero

2018-08-08 Thread Christoffer Dall
On Wed, Aug 08, 2018 at 10:11:11AM +0100, Dave Martin wrote: > On Tue, Aug 07, 2018 at 09:35:12PM +0200, Christoffer Dall wrote: > > On Tue, Aug 07, 2018 at 12:09:58PM +0100, Dave Martin wrote: > > > On Mon, Aug 06, 2018 at 03:03:24PM +0200, Christoffer Dall wrote: > > > > Hi Dave, > > > > > > >

Re: [RFC PATCH 09/16] KVM: arm64: Allow ID registers to by dynamically read-as-zero

2018-08-08 Thread Dave Martin
On Tue, Aug 07, 2018 at 09:35:12PM +0200, Christoffer Dall wrote: > On Tue, Aug 07, 2018 at 12:09:58PM +0100, Dave Martin wrote: > > On Mon, Aug 06, 2018 at 03:03:24PM +0200, Christoffer Dall wrote: > > > Hi Dave, > > > > > > I think there's a typo in the subject "to be" rather than "to by". > >

Re: [RFC PATCH 08/16] KVM: arm64: Support dynamically hideable system registers

2018-08-08 Thread Dave Martin
On Tue, Aug 07, 2018 at 09:20:10PM +0200, Christoffer Dall wrote: [...] > > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c > > index a436373..31a351a 100644 > > --- a/arch/arm64/kvm/sys_regs.c > > +++ b/arch/arm64/kvm/sys_regs.c > > @@ -1840,7 +1840,7 @@ static int

Re: [RFC PATCH 16/16] KVM: arm64/sve: Report and enable SVE API extensions for userspace

2018-08-08 Thread Dave Martin
On Tue, Aug 07, 2018 at 10:08:28PM +0200, Christoffer Dall wrote: > On Tue, Aug 07, 2018 at 12:23:45PM +0100, Dave Martin wrote: > > On Mon, Aug 06, 2018 at 03:41:33PM +0200, Christoffer Dall wrote: [...] > > > I'm personally fine with both feature flags and vcpu device ioctls. If > > > using

Re: [RFC PATCH 12/16] KVM: arm64/sve: Context switch the SVE registers

2018-08-08 Thread Dave Martin
On Tue, Aug 07, 2018 at 09:43:38PM +0200, Christoffer Dall wrote: > On Tue, Aug 07, 2018 at 12:15:26PM +0100, Dave Martin wrote: > > On Mon, Aug 06, 2018 at 03:19:10PM +0200, Christoffer Dall wrote: [...] > > > nit: this may also be folded nicely into a static bool > > >