Re: [PATCH v1 17/55] KVM: PPC: Book3S HV P9: Implement PMU save/restore in C

2021-08-14 Thread Athira Rajeev
> On 13-Aug-2021, at 9:54 AM, Nicholas Piggin wrote: > > Excerpts from Athira Rajeev's message of August 9, 2021 1:03 pm: >> >> >>> On 26-Jul-2021, at 9:19 AM, Nicholas Piggin wrote: > > >>> +static void freeze_pmu(unsigned long mmcr0, unsigned long mmcra) >>> +{ >>> + if (!(mmcr0 & MMC

Re: [PATCH v1 17/55] KVM: PPC: Book3S HV P9: Implement PMU save/restore in C

2021-08-12 Thread Nicholas Piggin
Excerpts from Athira Rajeev's message of August 9, 2021 1:03 pm: > > >> On 26-Jul-2021, at 9:19 AM, Nicholas Piggin wrote: >> +static void freeze_pmu(unsigned long mmcr0, unsigned long mmcra) >> +{ >> +if (!(mmcr0 & MMCR0_FC)) >> +goto do_freeze; >> +if (mmcra & MMCRA_SAMPL

Re: [PATCH v1 17/55] KVM: PPC: Book3S HV P9: Implement PMU save/restore in C

2021-08-08 Thread Athira Rajeev
> On 26-Jul-2021, at 9:19 AM, Nicholas Piggin wrote: > > Implement the P9 path PMU save/restore code in C, and remove the > POWER9/10 code from the P7/8 path assembly. > > -449 cycles (8533) POWER9 virt-mode NULL hcall > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/include/asm/asm-

[PATCH v1 17/55] KVM: PPC: Book3S HV P9: Implement PMU save/restore in C

2021-07-25 Thread Nicholas Piggin
Implement the P9 path PMU save/restore code in C, and remove the POWER9/10 code from the P7/8 path assembly. -449 cycles (8533) POWER9 virt-mode NULL hcall Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/asm-prototypes.h | 5 - arch/powerpc/kvm/book3s_hv.c | 205 +