Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-02 Thread Christoffer Dall
On Wed, Dec 02, 2015 at 10:22:04AM +, Marc Zyngier wrote: > On 02/12/15 09:49, Shannon Zhao wrote: > > > > > > On 2015/12/2 16:45, Marc Zyngier wrote: > >> On 02/12/15 02:40, Shannon Zhao wrote: > > > On 2015/12/2 0:57, Marc Zyngier wrote: > >> On 01/12/15 16:26, Shannon

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-02 Thread Marc Zyngier
On 02/12/15 02:40, Shannon Zhao wrote: > > > On 2015/12/2 0:57, Marc Zyngier wrote: >> On 01/12/15 16:26, Shannon Zhao wrote: >>> >>> >>> On 2015/12/1 23:41, Marc Zyngier wrote: > The reason is that when guest clear the overflow register, it will trap >> to kvm and call

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-02 Thread Shannon Zhao
On 2015/12/2 16:45, Marc Zyngier wrote: > On 02/12/15 02:40, Shannon Zhao wrote: >> > >> > >> > On 2015/12/2 0:57, Marc Zyngier wrote: >>> >> On 01/12/15 16:26, Shannon Zhao wrote: >>> >>> >>> On 2015/12/1 23:41, Marc Zyngier wrote: >> > The reason is that when guest

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-02 Thread Marc Zyngier
On 02/12/15 09:49, Shannon Zhao wrote: > > > On 2015/12/2 16:45, Marc Zyngier wrote: >> On 02/12/15 02:40, Shannon Zhao wrote: On 2015/12/2 0:57, Marc Zyngier wrote: >> On 01/12/15 16:26, Shannon Zhao wrote: On 2015/12/1 23:41, Marc Zyngier wrote:

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Shannon Zhao
On 2015/12/2 0:57, Marc Zyngier wrote: > On 01/12/15 16:26, Shannon Zhao wrote: >> >> >> On 2015/12/1 23:41, Marc Zyngier wrote: The reason is that when guest clear the overflow register, it will trap > to kvm and call kvm_pmu_sync_hwstate() as you see above. At this moment, > the

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Marc Zyngier
On 01/12/15 16:26, Shannon Zhao wrote: > > > On 2015/12/1 23:41, Marc Zyngier wrote: >>> The reason is that when guest clear the overflow register, it will trap to kvm and call kvm_pmu_sync_hwstate() as you see above. At this moment, the overflow register is still overflowed(that is

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Shannon Zhao
On 2015/12/1 22:50, Marc Zyngier wrote: On 01/12/15 14:35, Shannon Zhao wrote: On 2015/12/1 2:22, Marc Zyngier wrote: On Fri, 30 Oct 2015 14:22:00 +0800 Shannon Zhao wrote: From: Shannon Zhao When calling

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Marc Zyngier
On 01/12/15 15:13, Shannon Zhao wrote: > > > On 2015/12/1 22:50, Marc Zyngier wrote: >> On 01/12/15 14:35, Shannon Zhao wrote: >>> >>> >>> On 2015/12/1 2:22, Marc Zyngier wrote: On Fri, 30 Oct 2015 14:22:00 +0800 Shannon Zhao wrote: > From: Shannon

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Shannon Zhao
On 2015/12/1 2:22, Marc Zyngier wrote: > On Fri, 30 Oct 2015 14:22:00 +0800 > Shannon Zhao wrote: > >> From: Shannon Zhao >> >> When calling perf_event_create_kernel_counter to create perf_event, >> assign a overflow handler. Then when perf

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Marc Zyngier
On 01/12/15 14:35, Shannon Zhao wrote: > > > On 2015/12/1 2:22, Marc Zyngier wrote: >> On Fri, 30 Oct 2015 14:22:00 +0800 >> Shannon Zhao wrote: >> >>> From: Shannon Zhao >>> >>> When calling perf_event_create_kernel_counter to create

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-12-01 Thread Shannon Zhao
On 2015/12/1 23:41, Marc Zyngier wrote: The reason is that when guest clear the overflow register, it will trap >to kvm and call kvm_pmu_sync_hwstate() as you see above. At this moment, >the overflow register is still overflowed(that is some bit is still 1). >So We need to use some flag to

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-11-30 Thread Marc Zyngier
On Fri, 30 Oct 2015 14:22:00 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > When calling perf_event_create_kernel_counter to create perf_event, > assign a overflow handler. Then when perf event overflows, set > irq_pending and call

[PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-10-30 Thread Shannon Zhao
From: Shannon Zhao When calling perf_event_create_kernel_counter to create perf_event, assign a overflow handler. Then when perf event overflows, set irq_pending and call kvm_vcpu_kick() to sync the interrupt. Signed-off-by: Shannon Zhao ---

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-10-30 Thread kbuild test robot
Hi Shannon, [auto build test ERROR on kvm/linux-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Shannon-Zhao/KVM-ARM64-Add-guest-PMU-support/20151030-143148 config: arm-axm55xx_defconfig (attached

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-10-30 Thread Shannon Zhao
Hi, Thanks for your test:) It fails because there is no arch/arm/include/asm/pmu.h while arch/arm64/include/asm/pmu.h exists. Will fix this at next version. On 2015/10/30 20:08, kbuild test robot wrote: > Hi Shannon, > > [auto build test ERROR on kvm/linux-next -- if it's inappropriate base, >