[PATCH v11 8/8] arm/arm64: Documentation: Update arm-vgic-v3.txt

2017-01-26 Thread vijay . kilari
From: Vijaya Kumar K Update error code returned for Invalid CPU interface register value and access in AArch32 mode. Signed-off-by: Vijaya Kumar K --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation

[PATCH v11 7/8] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2017-01-26 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/arm/include/uapi/asm/kvm.h | 6 + arch/arm64/include/uapi/asm/kvm.h | 6 + virt/kvm/arm/

[PATCH v11 6/8] arm/arm64: vgic: Implement VGICv3 CPU interface access

2017-01-26 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. It is used to identify the cpu for registers access. The VM that supports SEIs expect it on des

[PATCH v11 0/8] arm/arm64: vgic: Implement API for vGICv3 live migration

2017-01-26 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 Documentation/virtual/kvm/devices/arm-vgic-v3.txt The patch 3 & 4 are picked from the Pavel's pr

[PATCH v11 4/8] irqchip/gic-v3: Add missing system register definitions

2017-01-26 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 Reviewed-by: Eric Auger --- include/linux/irqchip/arm-gic-v3.h | 43 -- 1 file changed, 41 i

[PATCH v11 3/8] arm/arm64: vgic: Introduce find_reg_by_id()

2017-01-26 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 both. Signed-off-by: Pavel

[PATCH v11 2/8] arm/arm64: vgic: Add distributor and redistributor access

2017-01-26 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_REDIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. These registers are accessed as 32-bit and cpu mpidr value passed along with register

[PATCH v11 5/8] arm/arm64: vgic: Introduce VENG0 and VENG1 fields to vmcr struct

2017-01-26 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. Drop ICH_VMCR_CTLR_SHIFT a

[PATCH v11 1/8] arm/arm64: vgic: Implement support for userspace access

2017-01-26 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 registers handling. Add infrastr

Re: [PATCH v10 8/8] arm/arm64: Documentation: Update arm-vgic-v3.txt

2017-01-23 Thread Vijay Kilari
On Mon, Jan 23, 2017 at 4:50 PM, Christoffer Dall wrote: > On Mon, Jan 23, 2017 at 04:22:39PM +0530, Vijay Kilari wrote: >> Hi Christoffer, >> >> In the document, >> >> The mpidr field is used to specify which >> redistributor is accessed. T

Re: [PATCH v9 04/11] irqchip/gic-v3: Add missing system register definitions

2017-01-23 Thread Vijay Kilari
Hi Eric, On Tue, Dec 6, 2016 at 7:23 PM, Auger Eric wrote: > Hi, > On 23/11/2016 14:01, 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 Kum

Re: [PATCH v10 8/8] arm/arm64: Documentation: Update arm-vgic-v3.txt

2017-01-23 Thread Vijay Kilari
Hi Christoffer, In the document, The mpidr field is used to specify which redistributor is accessed. The mpidr is ignored for the distributor. We still rely on MPIDR for KVM_DEV_ARM_VGIC_GRP_DIST_REGS to fetch vcpu info. So don't we need to remove this restriction?. Or force to use vcpu

Re: [PATCH v10 0/8] arm/arm64: vgic: Implement API for vGICv3 live migration

2017-01-23 Thread Vijay Kilari
On Sat, Jan 21, 2017 at 1:29 AM, Christoffer Dall wrote: > Hi Vijaya, > > On Thu, Dec 01, 2016 at 12:39:39PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> This patchset adds API for saving and restoring >> of VGICv3 registers to support live migration with new vgic feature. >

Re: [PATCH v10 6/8] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-12-19 Thread Vijay Kilari
On Fri, Dec 16, 2016 at 5:55 PM, Auger Eric wrote: > Hi Vijaya, > > On 01/12/2016 08:09, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> VGICv3 CPU interface registers are accessed using >> KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed >> as 64-bit. The cpu MPIDR va

Re: [PATCH v9 01/11] arm/arm64: vgic: Implement support for userspace access

2016-12-14 Thread Vijay Kilari
On Tue, Dec 6, 2016 at 5:12 PM, Auger Eric wrote: > Hi, > > On 28/11/2016 14:05, Christoffer Dall wrote: >> On Wed, Nov 23, 2016 at 06:31:48PM +0530, vijay.kil...@gmail.com wrote: >>> From: Vijaya Kumar K >>> >>> Read and write of some registers like ISPENDR and ICPENDR >>> from userspace require

[PATCH v10 8/8] arm/arm64: Documentation: Update arm-vgic-v3.txt

2016-11-30 Thread vijay . kilari
From: Vijaya Kumar K Update error code returned for Invalid CPU interface register value and access in AArch32 mode. Signed-off-by: Vijaya Kumar K --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/vir

[PATCH v10 6/8] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-30 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The VM that supports SEIs expect it on destin

[PATCH v10 2/8] arm/arm64: vgic: Add distributor and redistributor access

2016-11-30 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_REDIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. These registers are accessed as 32-bit and cpu mpidr value passed along with register

[PATCH v10 3/8] arm/arm64: vgic: Introduce find_reg_by_id()

2016-11-30 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 both. Signed-off-by: Pavel

[PATCH v10 5/8] arm/arm64: vgic: Introduce VENG0 and VENG1 fields to vmcr struct

2016-11-30 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. Drop ICH_VMCR_CTLR_SHIFT a

[PATCH v10 7/8] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-11-30 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/arm/include/uapi/asm/kvm.h | 7 ++ arch/arm64/include/uapi/asm/kvm.h | 6 + virt/kvm/arm

[PATCH v10 0/8] arm/arm64: vgic: Implement API for vGICv3 live migration

2016-11-30 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 Documentation/virtual/kvm/devices/arm-vgic-v3.txt The patch 3 & 4 are picked from the Pavel's pr

[PATCH v10 1/8] arm/arm64: vgic: Implement support for userspace access

2016-11-30 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 registers handling. Add infrastr

[PATCH v10 4/8] irqchip/gic-v3: Add missing system register definitions

2016-11-30 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 -- 1 file changed, 41 insertions(+), 2 deletions

Re: [PATCH v9 07/11] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-11-29 Thread Vijay Kilari
On Tue, Nov 29, 2016 at 1:20 AM, Christoffer Dall wrote: > On Wed, Nov 23, 2016 at 06:31:54PM +0530, vijay.kil...@gmail.com wrote: >> 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. >>

Re: [PATCH v9 06/11] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-29 Thread Vijay Kilari
On Tue, Nov 29, 2016 at 2:07 PM, Christoffer Dall wrote: > On Tue, Nov 29, 2016 at 01:08:26PM +0530, Vijay Kilari wrote: >> On Tue, Nov 29, 2016 at 1:09 AM, Christoffer Dall >> wrote: >> > On Wed, Nov 23, 2016 at 06:31:53PM +0530, vijay.kil...@gmail.com wrote: &g

Re: [PATCH v9 06/11] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-28 Thread Vijay Kilari
On Tue, Nov 29, 2016 at 1:09 AM, Christoffer Dall wrote: > On Wed, Nov 23, 2016 at 06:31:53PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> VGICv3 CPU interface registers are accessed using >> KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed >> as 64-bit. The

[PATCH v9 02/11] arm/arm64: vgic: Add distributor and redistributor access

2016-11-23 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_REDIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. These registers are accessed as 32-bit and cpu mpidr value passed along with register

[PATCH v9 08/11] arm/arm64: Documentation: Update arm-vgic-v3.txt

2016-11-23 Thread vijay . kilari
From: Vijaya Kumar K Update error code returned for Invalid CPU interface register value. Signed-off-by: Vijaya Kumar K --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt b

[PATCH v9 07/11] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-11-23 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/arm/include/uapi/asm/kvm.h | 7 ++ arch/arm64/include/uapi/asm/kvm.h | 6 + virt/kvm/arm

[PATCH v9 04/11] irqchip/gic-v3: Add missing system register definitions

2016-11-23 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 -- 1 file changed, 41 insertions(+), 2 deletions

[PATCH v9 09/11] arm: coproc: Drop const from coproc reg access function

2016-11-23 Thread vijay . kilari
From: Vijaya Kumar K In order to read or write to coproc regiter, the access function is should allow the coproc_param to be non constant. Signed-off-by: Vijaya Kumar K --- arch/arm/kvm/coproc.c | 20 ++-- arch/arm/kvm/coproc.h | 4 ++-- 2 files changed, 12 insertions(+), 12 d

[PATCH v9 03/11] arm/arm64: vgic: Introduce find_reg_by_id()

2016-11-23 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 both. Signed-off-by: Pavel

[PATCH v9 11/11] arm: vgic: Save and restore GICv3 CPU interface regs for AArch32

2016-11-23 Thread vijay . kilari
From: Vijaya Kumar K Use coproc_reg infrastructure to save and restore CPU interface register of GICv3 for AArch32 host. Signed-off-by: Vijaya Kumar K --- arch/arm/kvm/Makefile | 2 + virt/kvm/arm/vgic/vgic-coproc-reg-v3.c | 155 + 2 files cha

[PATCH v9 06/11] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-23 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The VM that supports SEIs expect it on destin

[PATCH v9 10/11] arm: coproc: Introduce find_coproc_reg_by_id()

2016-11-23 Thread vijay . kilari
From: Vijaya Kumar K To access CPU interface access in AArch32 mode, we need to perform coproc_reg table lookup. For this introduce find_coproc_reg_by_id() and export. Also use this function internally in coproc.c wherever required. Signed-off-by: Vijaya Kumar K --- arch/arm/kvm/coproc.c | 22

[PATCH v9 05/11] arm/arm64: vgic: Introduce VENG0 and VENG1 fields to vmcr struct

2016-11-23 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. Drop ICH_VMCR_CTLR_SHIFT a

[PATCH v9 01/11] arm/arm64: vgic: Implement support for userspace access

2016-11-23 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 registers handling. Add infrastr

[PATCH v9 0/11] arm/arm64: vgic: Implement API for vGICv3 live migration

2016-11-23 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 Documentation/virtual/kvm/devices/arm-vgic-v3.txt The patch 3 & 4 are picked from the Pavel's pr

Re: [PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-21 Thread Vijay Kilari
On Sun, Nov 20, 2016 at 6:50 PM, Christoffer Dall wrote: > On Sat, Nov 19, 2016 at 12:18:53AM +0530, Vijay Kilari wrote: >> On Thu, Nov 17, 2016 at 9:39 PM, Christoffer Dall >> wrote: >> > On Thu, Nov 17, 2016 at 09:25:59PM +0530, Vijay Kilari wrote: >> >&

Re: [PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-21 Thread Vijay Kilari
On Mon, Nov 21, 2016 at 3:49 PM, Christoffer Dall wrote: > On Fri, Nov 18, 2016 at 10:28:34PM +0530, Vijay Kilari wrote: >> On Thu, Nov 17, 2016 at 9:39 PM, Christoffer Dall >> wrote: >> > On Thu, Nov 17, 2016 at 09:25:59PM +0530, Vijay Kilari wrote: >> >&

Re: [PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-18 Thread Vijay Kilari
On Thu, Nov 17, 2016 at 9:39 PM, Christoffer Dall wrote: > On Thu, Nov 17, 2016 at 09:25:59PM +0530, Vijay Kilari wrote: >> On Thu, Nov 17, 2016 at 12:22 AM, Christoffer Dall >> wrote: >> > On Fri, Nov 04, 2016 at 04:43:32PM +0530, vijay.kil...@gmail.com wrote: &g

Re: [PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-18 Thread Vijay Kilari
On Thu, Nov 17, 2016 at 9:39 PM, Christoffer Dall wrote: > On Thu, Nov 17, 2016 at 09:25:59PM +0530, Vijay Kilari wrote: >> On Thu, Nov 17, 2016 at 12:22 AM, Christoffer Dall >> wrote: >> > On Fri, Nov 04, 2016 at 04:43:32PM +0530, vijay.kil...@gmail.com wrote: &g

Re: [PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-17 Thread Vijay Kilari
On Thu, Nov 17, 2016 at 12:22 AM, Christoffer Dall wrote: > On Fri, Nov 04, 2016 at 04:43:32PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> VGICv3 CPU interface registers are accessed using >> KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed >> as 64-bit. The

Re: [PATCH v8 5/7] arm/arm64: vgic: Introduce VENG0 and VENG1 fields to vmcr struct

2016-11-17 Thread Vijay Kilari
On Thu, Nov 17, 2016 at 12:22 AM, Christoffer Dall wrote: > On Fri, Nov 04, 2016 at 04:43:31PM +0530, vijay.kil...@gmail.com wrote: >> 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 >> va

Re: [PATCH v8 1/7] arm/arm64: vgic: Implement support for userspace access

2016-11-17 Thread Vijay Kilari
On Thu, Nov 17, 2016 at 12:22 AM, Christoffer Dall wrote: > On Fri, Nov 04, 2016 at 04:43:27PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> Read and write of some registers like ISPENDR and ICPENDR >> from userspace requires special handling when compared to >> guest access

Re: [PATCH v8 0/7] arm/arm64: vgic: Implement API for vGICv3 live migration

2016-11-16 Thread Vijay Kilari
On Wed, Nov 16, 2016 at 5:17 PM, Christoffer Dall wrote: > On Fri, Nov 04, 2016 at 04:43:26PM +0530, vijay.kil...@gmail.com wrote: >> 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 defi

[PATCH v8 4/7] irqchip/gic-v3: Add missing system register definitions

2016-11-04 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 -- 1 file changed, 41 insertions(+), 2 deletions

[PATCH v8 2/7] arm/arm64: vgic: Add distributor and redistributor access

2016-11-04 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 passed along with register o

[PATCH v8 3/7] arm/arm64: vgic: Introduce find_reg_by_id()

2016-11-04 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 both. Signed-off-by: Pavel

[PATCH v8 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-11-04 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The version of VGIC v3 specification is defin

[PATCH v8 7/7] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-11-04 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 + virt/kvm/arm/vgic/vgic-kvm-device.c | 50

[PATCH v8 1/7] arm/arm64: vgic: Implement support for userspace access

2016-11-04 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 registers handling. Add infrastr

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

2016-11-04 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. Drop ICH_VMCR_CTLR_SHIFT a

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

2016-11-04 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 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/445611.html The patch 3 & 4 are

Re: [PATCH v7 0/7] arm/arm64: vgic: Implement API for vGICv3 live migration

2016-10-05 Thread Vijay Kilari
Hi Marc, Christoffer, Do you have any review comments on this patch set?. Regards Vijay On Fri, Sep 23, 2016 at 9:14 PM, wrote: > 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 defini

Re: [PATCH v7 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-09-28 Thread Vijay Kilari
On Fri, Sep 23, 2016 at 9:14 PM, wrote: > From: Vijaya Kumar K > > VGICv3 CPU interface registers are accessed using > KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed > as 64-bit. The cpu MPIDR value is passed along with register id. > is used to identify the cpu for registers a

[PATCH v7 4/7] irqchip/gic-v3: Add missing system register definitions

2016-09-23 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 -- 1 file changed, 41 insertions(+), 2 deletions

[PATCH v7 7/7] arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-09-23 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 + virt/kvm/arm/vgic/vgic-kvm-device.c | 50

[PATCH v7 6/7] arm/arm64: vgic: Implement VGICv3 CPU interface access

2016-09-23 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The version of VGIC v3 specification is defin

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

2016-09-23 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. Drop ICH_VMCR_CTLR_SHIFT a

[PATCH v7 3/7] arm/arm64: vgic: Introduce find_reg_by_id()

2016-09-23 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 both. Signed-off-by: Pavel

[PATCH v7 2/7] arm/arm64: vgic: Add distributor and redistributor access

2016-09-23 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 passed along with register o

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

2016-09-23 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 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/445611.html The patch 3 & 4 are

[PATCH v7 1/7] arm/arm64: vgic: Implement support for userspace access

2016-09-23 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 registers handling. Add infrastr

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

2016-09-22 Thread Vijay Kilari
On Thu, Sep 22, 2016 at 5:38 PM, Marc Zyngier wrote: > On 20/09/16 07:12, vijay.kil...@gmail.com wrote: >> 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. >> >> R

[PATCH v6 6/7] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-19 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The version of VGIC v3 specification is defin

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

2016-09-19 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 passed along with register o

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

2016-09-19 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 registers handling. Add infrastr

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

2016-09-19 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 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/445611.html Compatible live migr

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

2016-09-19 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 -- 1 file changed, 41 insertions(+), 2 deletions

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

2016-09-19 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 + virt/kvm/arm/vgic/vgic-kvm-device.c | 50

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

2016-09-19 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. Drop ICH_VMCR_CTLR_SHIFT a

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

2016-09-19 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 both. Signed-off-by: Pavel

Re: [PATCH 5/6] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-19 Thread Vijay Kilari
Hi Marc , Peter On Sat, Sep 17, 2016 at 5:07 PM, Marc Zyngier wrote: > On Sat, 17 Sep 2016 11:58:48 +0530 > Vijay Kilari wrote: > >> On Fri, Sep 16, 2016 at 10:37 PM, Marc Zyngier wrote: >> > On 16/09/16 17:57, Vijay Kilari wrote: >> >> On Fri, S

Re: [PATCH 5/6] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-17 Thread Vijay Kilari
Hi Marc, On Fri, Sep 16, 2016 at 10:37 PM, Marc Zyngier wrote: > On 16/09/16 17:57, Vijay Kilari wrote: >> On Fri, Sep 16, 2016 at 8:06 PM, Marc Zyngier wrote: >>> On 16/09/16 13:20, vijay.kil...@gmail.com wrote: >>>> From: Vijaya Kumar K >>>> >&g

Re: [PATCH 5/6] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-16 Thread Vijay Kilari
On Fri, Sep 16, 2016 at 10:37 PM, Marc Zyngier wrote: > On 16/09/16 17:57, Vijay Kilari wrote: >> On Fri, Sep 16, 2016 at 8:06 PM, Marc Zyngier wrote: >>> On 16/09/16 13:20, vijay.kil...@gmail.com wrote: >>>> From: Vijaya Kumar K >>>> >>>

Re: [PATCH 5/6] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-16 Thread Vijay Kilari
On Fri, Sep 16, 2016 at 8:06 PM, Marc Zyngier wrote: > On 16/09/16 13:20, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> VGICv3 CPU interface registers are accessed using >> KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed >> as 64-bit. The cpu MPIDR value is passed a

[PATCH 5/6] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-16 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The version of VGIC v3 specification is defin

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

2016-09-16 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 registers handling. Add infrastr

[PATCH v5 3/6] arm/arm64: vgic-new: Introduce find_reg_by_id()

2016-09-16 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 both. Signed-off-by: Pavel

[PATCH v5 6/6] arm/arm64: vgic-new: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-09-16 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 + virt/kvm/arm/vgic/vgic-kvm-device.c | 50

[PATCH v5 4/6] arm/arm64: vgic-new: Introduce VENG0 and VENG1 fields to vmcr struct

2016-09-16 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. ICH_VMCR_CTLR_MASK is changed to mask only ICC_CTLR_EL1 fields. Also refactor vg

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

2016-09-16 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 passed along with register o

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

2016-09-16 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 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/445611.html Compatible live migr

Re: [PATCH v4 0/5] arm/arm64: vgic-new: Implement API for vGICv3 live migration

2016-09-12 Thread Vijay Kilari
On Mon, Sep 12, 2016 at 6:45 PM, Marc Zyngier wrote: > On 10/09/16 13:22, vijay.kil...@gmail.com wrote: >> 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

Re: [PATCH v4 4/5] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-12 Thread Vijay Kilari
() On Sun, Sep 11, 2016 at 1:26 PM, Marc Zyngier wrote: > On Sat, 10 Sep 2016 17:52:17 +0530 > vijay.kil...@gmail.com wrote: > >> From: Vijaya Kumar K >> >> VGICv3 CPU interface registers are accessed using >> KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed >> as 64-bit. The cpu

Re: [PATCH v4 1/5] arm/arm64: vgic-new: Implement support for userspace access

2016-09-12 Thread Vijay Kilari
On Mon, Sep 12, 2016 at 1:55 PM, Marc Zyngier wrote: > On 10/09/16 13:22, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> + >> +void vgic_uaccess_write_pending(struct kvm_vcpu *vcpu, >> + gpa_t addr, unsigned int len, >> + unsign

[PATCH v4 3/5] arm/arm64: vgic-new: Introduce find_reg_by_id()

2016-09-10 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 both. Signed-off-by: Pavel

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

2016-09-10 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 + virt/kvm/arm/vgic/vgic-kvm-device.c | 48

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

2016-09-10 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 passed along with register o

[PATCH v4 4/5] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-10 Thread vijay . kilari
From: Vijaya Kumar K VGICv3 CPU interface registers are accessed using KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed as 64-bit. The cpu MPIDR value is passed along with register id. is used to identify the cpu for registers access. The version of VGIC v3 specification is defin

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

2016-09-10 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 registers handling. Add infrastr

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

2016-09-10 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 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-July/445611.html Compatible live migr

Re: [RFC PATCH v3 4/5] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-07 Thread Vijay Kilari
On Wed, Sep 7, 2016 at 12:49 AM, Christoffer Dall wrote: > On Tue, Sep 06, 2016 at 07:43:23PM +0530, Vijay Kilari wrote: >> Resending in plain text mode >> >> On Tue, Sep 6, 2016 at 7:18 PM, Vijay Kilari wrote: >> > >> > >> > On Tue, Aug 3

Re: [RFC PATCH v3 2/5] arm/arm64: vgic-new: Add distributor and redistributor access

2016-09-06 Thread Vijay Kilari
Resending in plain text mode On Tue, Sep 6, 2016 at 7:17 PM, Vijay Kilari wrote: > > > On Tue, Aug 30, 2016 at 6:01 PM, Christoffer Dall > wrote: >> >> On Wed, Aug 24, 2016 at 04:50:06PM +0530, vijay.kil...@gmail.com wrote: >> > From: Vijaya Kumar K

Re: [RFC PATCH v3 4/5] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-06 Thread Vijay Kilari
Resending in plain text mode On Tue, Sep 6, 2016 at 7:18 PM, Vijay Kilari wrote: > > > On Tue, Aug 30, 2016 at 7:15 PM, Christoffer Dall > wrote: >> >> On Wed, Aug 24, 2016 at 04:50:08PM +0530, vijay.kil...@gmail.com wrote: >> > From: Vijaya Kumar K > >

Re: [RFC PATCH v3 5/5] arm/arm64: vgic-new: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl

2016-09-06 Thread Vijay Kilari
On Tue, Aug 30, 2016 at 7:30 PM, Christoffer Dall wrote: > > On Wed, Aug 24, 2016 at 04:50:09PM +0530, vijay.kil...@gmail.com wrote: > > From: Vijaya Kumar K > > } > > diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c > > b/virt/kvm/arm/vgic/vgic-mmio-v3.c > > index 61abea0..fde1472 100644 > > ---

Re: [RFC PATCH v3 4/5] arm/arm64: vgic-new: Implement VGICv3 CPU interface access

2016-09-06 Thread Vijay Kilari
On Tue, Aug 30, 2016 at 7:15 PM, Christoffer Dall < christoffer.d...@linaro.org> wrote: > On Wed, Aug 24, 2016 at 04:50:08PM +0530, vijay.kil...@gmail.com wrote: > > From: Vijaya Kumar K > > > diff --git a/virt/kvm/arm/vgic/vgic-sys-reg-v3.c > b/virt/kvm/arm/vgic/vgic-sys-reg-v3.c > > new file

Re: [RFC PATCH v3 2/5] arm/arm64: vgic-new: Add distributor and redistributor access

2016-09-06 Thread Vijay Kilari
On Tue, Aug 30, 2016 at 6:01 PM, Christoffer Dall < christoffer.d...@linaro.org> wrote: > On Wed, Aug 24, 2016 at 04:50:06PM +0530, vijay.kil...@gmail.com wrote: > > From: Vijaya Kumar K > > > > VGICv3 Distributor and Redistributor registers are accessed using > > KVM_DEV_ARM_VGIC_GRP_DIST_REGS a

  1   2   >