Re: [kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Wei Huang
On 11/16/2016 04:02 PM, Christopher Covington wrote: > On 11/16/2016 12:46 PM, Marc Zyngier wrote: >> On 16/11/16 14:38, Andrew Jones wrote: >>> ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This >>> function allows unit tests to make the distinction. >> >> Hi Drew, >> >> Overall,

Re: [kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Christopher Covington
On 11/16/2016 12:46 PM, Marc Zyngier wrote: > On 16/11/16 14:38, Andrew Jones wrote: >> ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This >> function allows unit tests to make the distinction. > > Hi Drew, > > Overall, having to find out about the architecture is a bad idea most of >

Re: [PATCH v2] arm/arm64: KVM: VGIC: limit ITARGETSR bits to number of VCPUs

2016-11-16 Thread Christoffer Dall
On Wed, Nov 16, 2016 at 05:57:16PM +, Andre Przywara wrote: > The GICv2 spec says in section 4.3.12 that a "CPU targets field bit that > corresponds to an unimplemented CPU interface is RAZ/WI." > Currently we allow the guest to write any value in there and it can > read that back. > Mask the

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

2016-11-16 Thread Christoffer Dall
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 for these registers. > > Refer to

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

2016-11-16 Thread Christoffer Dall
On Fri, Nov 04, 2016 at 04:43:28PM +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 and KVM_DEV_ARM_VGIC_GRP_DIST_REGS DIST_REGS and REDIST_REGS ? > with

Re: [PATCH v3 0/2] arm64: Support systems without FP/ASIMD

2016-11-16 Thread Catalin Marinas
On Tue, Nov 08, 2016 at 01:56:19PM +, Suzuki K. Poulose wrote: > This series adds supports to the kernel and KVM hyp to handle > systems without FP/ASIMD properly. At the moment the kernel > doesn't check if the FP unit is available before accessing > the registers (e.g during context switch).

[PATCH v2] arm/arm64: KVM: VGIC: limit ITARGETSR bits to number of VCPUs

2016-11-16 Thread Andre Przywara
The GICv2 spec says in section 4.3.12 that a "CPU targets field bit that corresponds to an unimplemented CPU interface is RAZ/WI." Currently we allow the guest to write any value in there and it can read that back. Mask the written value with the proper CPU mask to be spec compliant.

Re: [kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Marc Zyngier
On 16/11/16 14:38, Andrew Jones wrote: > ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This > function allows unit tests to make the distinction. Hi Drew, Overall, having to find out about the architecture is a bad idea most of the time. We have feature registers for most things, and it

Re: [kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Andre Przywara
Hi Drew, On 16/11/16 14:38, Andrew Jones wrote: > ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This > function allows unit tests to make the distinction. So the big question here is why you would like to know this? If it is for a certain feature, you should check for that instead. >

[PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured

2016-11-16 Thread Wei Huang
KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured. But this function can't deals with PMCCFILTR correctly because the evtCount bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event type of other PMXEVTYPER registers. To fix it, when eventsel == 0, this

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-16 Thread Christopher Covington
On 11/16/2016 11:25 AM, Andrew Jones wrote: > On Wed, Nov 16, 2016 at 11:08:42AM -0500, Christopher Covington wrote: >> On 11/16/2016 08:01 AM, Andrew Jones wrote: >>> On Tue, Nov 15, 2016 at 04:50:53PM -0600, Wei Huang wrote: On 11/14/2016 09:12 AM, Christopher Covington wrote:

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-16 Thread Andrew Jones
On Wed, Nov 16, 2016 at 11:08:42AM -0500, Christopher Covington wrote: > On 11/16/2016 08:01 AM, Andrew Jones wrote: > > On Tue, Nov 15, 2016 at 04:50:53PM -0600, Wei Huang wrote: > >> > >> > >> On 11/14/2016 09:12 AM, Christopher Covington wrote: > >>> Hi Drew, Wei, > >>> > >>> On 11/14/2016

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-16 Thread Christopher Covington
On 11/16/2016 08:01 AM, Andrew Jones wrote: > On Tue, Nov 15, 2016 at 04:50:53PM -0600, Wei Huang wrote: >> >> >> On 11/14/2016 09:12 AM, Christopher Covington wrote: >>> Hi Drew, Wei, >>> >>> On 11/14/2016 05:05 AM, Andrew Jones wrote: On Fri, Nov 11, 2016 at 01:55:49PM -0600, Wei Huang

Re: [PATCH] arm: Add simple arch timer test

2016-11-16 Thread Alexander Graf
On 16/11/2016 16:54, Andrew Jones wrote: On Mon, Sep 19, 2016 at 04:52:01PM +0200, Andrew Jones wrote: On Mon, Sep 19, 2016 at 01:44:40PM +0200, Alexander Graf wrote: All virtualization capable ARM cores support the ARM architected virtual timer. This patch adds minimalistic checks whether

Re: [PATCH] arm: Add simple arch timer test

2016-11-16 Thread Andrew Jones
On Mon, Sep 19, 2016 at 04:52:01PM +0200, Andrew Jones wrote: > On Mon, Sep 19, 2016 at 01:44:40PM +0200, Alexander Graf wrote: > > All virtualization capable ARM cores support the ARM architected virtual > > timer. > > > > This patch adds minimalistic checks whether we can fire a virtual timer

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-16 Thread Andrew Jones
Just crossed my mind that we're missing isb's. On Tue, Nov 08, 2016 at 12:17:14PM -0600, Wei Huang wrote: > From: Christopher Covington > > Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, > even for the smallest delta of two subsequent reads. > >

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

2016-11-16 Thread Christoffer Dall
On Wed, Nov 16, 2016 at 08:24:16PM +0530, Vijay Kilari wrote: > 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

[kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Andrew Jones
ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This function allows unit tests to make the distinction. Signed-off-by: Andrew Jones --- I'm actually unsure if there's a feature bit or not that I could probe instead. It'd be nice if somebody can confirm. Thanks, drew

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-16 Thread Andrew Jones
On Tue, Nov 15, 2016 at 04:50:53PM -0600, Wei Huang wrote: > > > On 11/14/2016 09:12 AM, Christopher Covington wrote: > > Hi Drew, Wei, > > > > On 11/14/2016 05:05 AM, Andrew Jones wrote: > >> On Fri, Nov 11, 2016 at 01:55:49PM -0600, Wei Huang wrote: > >>> > >>> > >>> On 11/11/2016 01:43 AM,

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

2016-11-16 Thread Christoffer Dall
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 definition is as per version of VGICv3