Message ID | 20231020214053.2144305-1-rananta@google.com (mailing list archive) |
---|---|
Headers | show |
Series | KVM: arm64: PMU: Allow userspace to limit the number of PMCs on vCPU | expand |
On Fri, 20 Oct 2023 22:40:40 +0100, Raghavendra Rao Ananta <rananta@google.com> wrote: > > Hello, > > The goal of this series is to allow userspace to limit the number > of PMU event counters on the vCPU. We need this to support migration > across systems that implement different numbers of counters. [...] I've gone through the initial patches, and stopped before the tests (which I usually can't be bothered to review anyway). The comments I have a relatively minor and could be applied as fixes on top if Oliver can be convinced to do so. Note that patch #4 has an attribution issue. > base-commit: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 maz@valley-girl:~/hot-poop/arm-platforms$ git describe 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 fatal: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 is neither a commit nor blob Can you please make an effort to base your postings on a known, stable commit? A tagged -rc would be best. but certainly not a random commit. This sort of information is just as useful as "No functional change intended"... M.
On Mon, Oct 23, 2023 at 6:09 AM Marc Zyngier <maz@kernel.org> wrote: > > On Fri, 20 Oct 2023 22:40:40 +0100, > Raghavendra Rao Ananta <rananta@google.com> wrote: > > > > Hello, > > > > The goal of this series is to allow userspace to limit the number > > of PMU event counters on the vCPU. We need this to support migration > > across systems that implement different numbers of counters. > > [...] > > I've gone through the initial patches, and stopped before the tests > (which I usually can't be bothered to review anyway). > > The comments I have a relatively minor and could be applied as fixes > on top if Oliver can be convinced to do so. Note that patch #4 has an > attribution issue. > > > base-commit: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 > > maz@valley-girl:~/hot-poop/arm-platforms$ git describe 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 > fatal: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 is neither a commit nor blob > > Can you please make an effort to base your postings on a known, stable > commit? A tagged -rc would be best. but certainly not a random commit. > I usually do base on a known -rc. But this series needed a couple of series from kvmarm/next (mentioned in the original patch), and hence I rebased on top of them. How do you suggest I handle this in the future? Rebase to a known -rc on mainline, apply the required series, and then my series on top? Thank you. Raghavendra
On Mon, 23 Oct 2023 18:58:19 +0100, Raghavendra Rao Ananta <rananta@google.com> wrote: > > On Mon, Oct 23, 2023 at 6:09 AM Marc Zyngier <maz@kernel.org> wrote: > > > > On Fri, 20 Oct 2023 22:40:40 +0100, > > Raghavendra Rao Ananta <rananta@google.com> wrote: > > > > > > Hello, > > > > > > The goal of this series is to allow userspace to limit the number > > > of PMU event counters on the vCPU. We need this to support migration > > > across systems that implement different numbers of counters. > > > > [...] > > > > I've gone through the initial patches, and stopped before the tests > > (which I usually can't be bothered to review anyway). > > > > The comments I have a relatively minor and could be applied as fixes > > on top if Oliver can be convinced to do so. Note that patch #4 has an > > attribution issue. > > > > > base-commit: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 > > > > maz@valley-girl:~/hot-poop/arm-platforms$ git describe 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 > > fatal: 0a3a1665cbc59ee8d6326aa6c0b4a8d1cd67dda3 is neither a commit nor blob > > > > Can you please make an effort to base your postings on a known, stable > > commit? A tagged -rc would be best. but certainly not a random commit. > > > I usually do base on a known -rc. But this series needed a couple of > series from kvmarm/next (mentioned in the original patch), and hence I > rebased on top of them. Well, that commit has since disappeared, as git cannot find it (as demonstrated above). Which is why I insist on a public tag as a base, as everything else is completely volatile. > How do you suggest I handle this in the future? Rebase to a known > -rc on mainline, apply the required series, and then my series on > top? No. You base your own series on an -rc (ideally, -rc3). If there is a conflict with another series, it is our job (Oliver and I) to fix it (bonus points if you indicate a resolution for the conflict in the cover letter). If there is a hard dependency (something that would actively prevent your series from working at all), you cherry-pick the minimal set of patches that makes your own series functional as a *prefix*, and post the whole thing, including the patches you depend on. Oliver and I will make sure the common prefix is dealt with without duplication. And for what it is worth, this series directly applies on v6.6-rc3 without a conflict. M.
On Fri, 20 Oct 2023 22:40:40 +0100, Raghavendra Rao Ananta <rananta@google.com> wrote: > > Hello, > > The goal of this series is to allow userspace to limit the number > of PMU event counters on the vCPU. We need this to support migration > across systems that implement different numbers of counters. FWIW, I've pushed out a branch[1] with a set of fixes that address some of the comments I had on this series. Feel free to squash them in your series as you see fit. M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/pmu_pmcr_n
On Mon, Oct 23, 2023 at 07:35:44PM +0100, Marc Zyngier wrote: > On Fri, 20 Oct 2023 22:40:40 +0100, > Raghavendra Rao Ananta <rananta@google.com> wrote: > > > > Hello, > > > > The goal of this series is to allow userspace to limit the number > > of PMU event counters on the vCPU. We need this to support migration > > across systems that implement different numbers of counters. > > FWIW, I've pushed out a branch[1] with a set of fixes that address > some of the comments I had on this series. Feel free to squash them in > your series as you see fit. I did a second round of fixes on top of what Marc has and pushed that to a branch [*]. If everything looks good I'll take it for 6.7. [*] https://git.kernel.org/pub/scm/linux/kernel/git/oupton/linux.git/log/?h=kvm-arm64/pmu_pmcr_n
On Fri, 20 Oct 2023 21:40:40 +0000, Raghavendra Rao Ananta wrote: > The goal of this series is to allow userspace to limit the number > of PMU event counters on the vCPU. We need this to support migration > across systems that implement different numbers of counters. > > The number of PMU event counters is indicated in PMCR_EL0.N. > For a vCPU with PMUv3 configured, its value will be the same as > the current PE by default. Userspace can set PMCR_EL0.N for the > vCPU to any value even with the current KVM using KVM_SET_ONE_REG. > However, it is practically unsupported, as KVM resets PMCR_EL0.N > to the host value on vCPU reset and some KVM code uses the host > value to identify (un)implemented event counters on the vCPU. > > [...] I've applied this with Marc + I's fixes. I'm happy to toss any fixes on top of this series if folks spot issues. [01/13] KVM: arm64: PMU: Introduce helpers to set the guest's PMU https://git.kernel.org/kvmarm/kvmarm/c/1616ca6f3c10 [02/13] KVM: arm64: PMU: Set the default PMU for the guest before vCPU reset https://git.kernel.org/kvmarm/kvmarm/c/427733579744 [03/13] KVM: arm64: PMU: Add a helper to read a vCPU's PMCR_EL0 https://git.kernel.org/kvmarm/kvmarm/c/57fc267f1b5c [04/13] KVM: arm64: PMU: Set PMCR_EL0.N for vCPU based on the associated PMU https://git.kernel.org/kvmarm/kvmarm/c/4d20debf9ca1 [05/13] KVM: arm64: Add {get,set}_user for PM{C,I}NTEN{SET,CLR}, PMOVS{SET,CLR} https://git.kernel.org/kvmarm/kvmarm/c/a45f41d754e0 [06/13] KVM: arm64: Sanitize PM{C,I}NTEN{SET,CLR}, PMOVS{SET,CLR} before first run https://git.kernel.org/kvmarm/kvmarm/c/27131b199f9f [07/13] KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest https://git.kernel.org/kvmarm/kvmarm/c/ea9ca904d24f [08/13] tools: Import arm_pmuv3.h https://git.kernel.org/kvmarm/kvmarm/c/9f4b3273dfbe [09/13] KVM: selftests: aarch64: Introduce vpmu_counter_access test https://git.kernel.org/kvmarm/kvmarm/c/8d0aebe1ca2b [10/13] KVM: selftests: aarch64: vPMU register test for implemented counters https://git.kernel.org/kvmarm/kvmarm/c/ada1ae68262d [11/13] KVM: selftests: aarch64: vPMU register test for unimplemented counters https://git.kernel.org/kvmarm/kvmarm/c/e1cc87206348 [12/13] KVM: selftests: aarch64: vPMU test for validating user accesses https://git.kernel.org/kvmarm/kvmarm/c/62708be351fe -- Best, Oliver