Re: [PATCH] KVM: arm/arm64: timer: Fix hw sync for user space irqchip path

2016-09-20 Thread Marc Zyngier
Alex, On 16/09/16 06:16, Alexander Graf wrote: > While adding the new vgic implementation, apparently nobody tested > the non-vgic path where user space controls the vgic, so two functions > slipped through the cracks that get called in generic code but don't > check whether hardware support is

Re: [PATCH v4 2/2] KVM: arm/arm64: Route vtimer events to user space

2016-09-20 Thread Marc Zyngier
On 20/09/16 13:22, Alexander Graf wrote: > On 09/20/2016 12:28 PM, Marc Zyngier wrote: >> On 20/09/16 11:05, Alexander Graf wrote: >>> On 09/20/2016 11:39 AM, Marc Zyngier wrote: On 20/09/16 10:26, Alexander Graf wrote: > On 20.09.16 11:21, Marc Zyngier wrote: >> On 19/09/16 18:39,

Re: [PATCH v4 2/2] KVM: arm/arm64: Route vtimer events to user space

2016-09-20 Thread Marc Zyngier
On 20/09/16 11:05, Alexander Graf wrote: > On 09/20/2016 11:39 AM, Marc Zyngier wrote: >> On 20/09/16 10:26, Alexander Graf wrote: >>> >>> On 20.09.16 11:21, Marc Zyngier wrote: On 19/09/16 18:39, Alexander Graf wrote: > > On 19.09.16 16:48, Marc Zyngier wrote: >> On 19/09/16

Re: [PATCH v6 4/7] arm/arm64: vgic-new: Define required GICv3 reg definitions

2016-09-20 Thread Marc Zyngier
On 20/09/16 07:12, vijay.kil...@gmail.com wrote: > From: Vijaya Kumar K > > Define register definitions for ICH_VMCR_EL2, ICC_CTLR_EL1 and > ICH_VTR_EL2, ICC_BPR0_EL1, ICC_BPR1_EL1 registers. > > Signed-off-by: Vijaya Kumar K $SUBJECT should

Re: [PATCH v4 2/2] KVM: arm/arm64: Route vtimer events to user space

2016-09-20 Thread Alexander Graf
On 20.09.16 11:21, Marc Zyngier wrote: > On 19/09/16 18:39, Alexander Graf wrote: >> >> >> On 19.09.16 16:48, Marc Zyngier wrote: >>> On 19/09/16 12:14, Alexander Graf wrote: We have 2 modes for dealing with interrupts in the ARM world. We can either handle them all using hardware

Re: [PATCH v4 2/2] KVM: arm/arm64: Route vtimer events to user space

2016-09-20 Thread Marc Zyngier
On 19/09/16 18:39, Alexander Graf wrote: > > > On 19.09.16 16:48, Marc Zyngier wrote: >> On 19/09/16 12:14, Alexander Graf wrote: >>> We have 2 modes for dealing with interrupts in the ARM world. We can either >>> handle them all using hardware acceleration through the vgic or we can >>>

[PATCH v6 2/7] arm/arm64: vgic-new: Add distributor and redistributor access

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 Distributor and Redistributor registers are accessed using KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_DIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. These registers are accessed as 32-bit and cpu mpidr value

[PATCH v6 1/7] arm/arm64: vgic-new: Implement support for userspace access

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K Read and write of some registers like ISPENDR and ICPENDR from userspace requires special handling when compared to guest access for these registers. Refer to Documentation/virtual/kvm/devices/arm-vgic-v3.txt for handling of ISPENDR, ICPENDR

[PATCH v6 0/7] arm/arm64: vgic-new: Implement API for vGICv3 live migration

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K This patchset adds API for saving and restoring of VGICv3 registers to support live migration with new vgic feature. This API definition is as per version of VGICv3 specification

[PATCH v6 4/7] arm/arm64: vgic-new: Define required GICv3 reg definitions

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K Define register definitions for ICH_VMCR_EL2, ICC_CTLR_EL1 and ICH_VTR_EL2, ICC_BPR0_EL1, ICC_BPR1_EL1 registers. Signed-off-by: Vijaya Kumar K --- include/linux/irqchip/arm-gic-v3.h | 43

[PATCH v6 7/7] arm/arm64: vgic-new: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K Userspace requires to store and restore of line_level for level triggered interrupts using ioctl KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO. Signed-off-by: Vijaya Kumar K --- arch/arm64/include/uapi/asm/kvm.h | 6 +

[PATCH v6 5/7] arm/arm64: vgic-new: Introduce VENG0 and VENG1 fields to vmcr struct

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K ICC_VMCR_EL2 supports virtual access to ICC_IGRPEN1_EL1.Enable and ICC_IGRPEN0_EL1.Enable fields. Add grpen0 and grpen1 member variables to struct vmcr to support read and write of these fields. Also refactor vgic_set_vmcr and vgic_get_vmcr() code.

[PATCH v6 3/7] arm/arm64: vgic-new: Introduce find_reg_by_id()

2016-09-20 Thread vijay . kilari
From: Vijaya Kumar K In order to implement vGICv3 CPU interface access, we will need to perform table lookup of system registers. We would need both index_to_params() and find_reg() exported for that purpose, but instead we export a single function which combines them