<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/arch/arm64/kvm/perf.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2021-11-17T13:49:11+00:00</updated>
<entry>
<title>KVM: arm64: Drop perf.c and fold its tiny bits of code into arm.c</title>
<updated>2021-11-17T13:49:11+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2021-11-11T02:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=17ed14eba22b3a86e82fb6df28af00fb4cadfd77'/>
<id>urn:sha1:17ed14eba22b3a86e82fb6df28af00fb4cadfd77</id>
<content type='text'>
Call KVM's (un)register perf callbacks helpers directly from arm.c and
delete perf.c

No functional change intended.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20211111020738.2512932-17-seanjc@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Hide kvm_arm_pmu_available behind CONFIG_HW_PERF_EVENTS=y</title>
<updated>2021-11-17T13:49:11+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2021-11-11T02:07:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=be399d824b432a85f8df86b566d2e5994fdf58b0'/>
<id>urn:sha1:be399d824b432a85f8df86b566d2e5994fdf58b0</id>
<content type='text'>
Move the definition of kvm_arm_pmu_available to pmu-emul.c and, out of
"necessity", hide it behind CONFIG_HW_PERF_EVENTS.  Provide a stub for
the key's wrapper, kvm_arm_support_pmu_v3().  Moving the key's definition
out of perf.c will allow a future commit to delete perf.c entirely.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20211111020738.2512932-16-seanjc@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Convert to the generic perf callbacks</title>
<updated>2021-11-17T13:49:11+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2021-11-11T02:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7b517831a1c6aceb0821860edb9c7bc7d4f803a2'/>
<id>urn:sha1:7b517831a1c6aceb0821860edb9c7bc7d4f803a2</id>
<content type='text'>
Drop arm64's version of the callbacks in favor of the callbacks provided
by generic KVM, which are semantically identical.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20211111020738.2512932-15-seanjc@google.com
</content>
</entry>
<entry>
<title>perf/core: Rework guest callbacks to prepare for static_call support</title>
<updated>2021-11-17T13:49:07+00:00</updated>
<author>
<name>Like Xu</name>
<email>like.xu@linux.intel.com</email>
</author>
<published>2021-11-11T02:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b9f5621c9547dd787900f005a9e1c3d5712de512'/>
<id>urn:sha1:b9f5621c9547dd787900f005a9e1c3d5712de512</id>
<content type='text'>
To prepare for using static_calls to optimize perf's guest callbacks,
replace -&gt;is_in_guest and -&gt;is_user_mode with a new multiplexed hook
-&gt;state, tweak -&gt;handle_intel_pt_intr to play nice with being called when
there is no active guest, and drop "guest" from -&gt;get_guest_ip.

Return '0' from -&gt;state and -&gt;handle_intel_pt_intr to indicate "not in
guest" so that DEFINE_STATIC_CALL_RET0 can be used to define the static
calls, i.e. no callback == !guest.

[sean: extracted from static_call patch, fixed get_ip() bug, wrote changelog]
Suggested-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Originally-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Like Xu &lt;like.xu@linux.intel.com&gt;
Signed-off-by: Zhu Lingshan &lt;lingshan.zhu@intel.com&gt;
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Link: https://lore.kernel.org/r/20211111020738.2512932-7-seanjc@google.com
</content>
</entry>
<entry>
<title>perf: Stop pretending that perf can handle multiple guest callbacks</title>
<updated>2021-11-17T13:49:07+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2021-11-11T02:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2934e3d09350c1a7ca2433fbeabfcd831e48a575'/>
<id>urn:sha1:2934e3d09350c1a7ca2433fbeabfcd831e48a575</id>
<content type='text'>
Drop the 'int' return value from the perf (un)register callbacks helpers
and stop pretending perf can support multiple callbacks.  The 'int'
returns are not future proofing anything as none of the callers take
action on an error.  It's also not obvious that there will ever be
co-tenant hypervisors, and if there are, that allowing multiple callbacks
to be registered is desirable or even correct.

Opportunistically rename callbacks=&gt;cbs in the affected declarations to
match their definitions.

No functional change intended.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Link: https://lore.kernel.org/r/20211111020738.2512932-5-seanjc@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Fix PMU probe ordering</title>
<updated>2021-09-20T11:43:34+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-09-19T13:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e840f42a49925707fca90e6c7a4095118fdb8c4d'/>
<id>urn:sha1:e840f42a49925707fca90e6c7a4095118fdb8c4d</id>
<content type='text'>
Russell reported that since 5.13, KVM's probing of the PMU has
started to fail on his HW. As it turns out, there is an implicit
ordering dependency between the architectural PMU probing code and
and KVM's own probing. If, due to probe ordering reasons, KVM probes
before the PMU driver, it will fail to detect the PMU and prevent it
from being advertised to guests as well as the VMM.

Obviously, this is one probing too many, and we should be able to
deal with any ordering.

Add a callback from the PMU code into KVM to advertise the registration
of a host CPU PMU, allowing for any probing order.

Fixes: 5421db1be3b1 ("KVM: arm64: Divorce the perf code from oprofile helpers")
Reported-by: "Russell King (Oracle)" &lt;linux@armlinux.org.uk&gt;
Tested-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/YUYRKVflRtUytzy5@shell.armlinux.org.uk
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>KVM: arm64: perf: Replace '0xf' instances with ID_AA64DFR0_PMUVER_IMP_DEF</title>
<updated>2021-08-11T14:33:29+00:00</updated>
<author>
<name>Anshuman Khandual</name>
<email>anshuman.khandual@arm.com</email>
</author>
<published>2021-08-11T03:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6fadc1241c33fe0228c94bc6a1aa6c1da8872e8b'/>
<id>urn:sha1:6fadc1241c33fe0228c94bc6a1aa6c1da8872e8b</id>
<content type='text'>
ID_AA64DFR0_PMUVER_IMP_DEF which indicate implementation defined PMU, never
actually gets used although there are '0xf' instances scattered all around.
Just do the macro replacement to improve readability.

Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: linux-perf-users@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual &lt;anshuman.khandual@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kvm-arm64/kill_oprofile_dependency' into kvmarm-master/next</title>
<updated>2021-04-22T12:41:49+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-04-22T12:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9a8aae605b80fc0a830cdce747eed48e11acc067'/>
<id>urn:sha1:9a8aae605b80fc0a830cdce747eed48e11acc067</id>
<content type='text'>
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Divorce the perf code from oprofile helpers</title>
<updated>2021-04-22T12:32:39+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-04-14T13:44:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5421db1be3b11c5e469cce3760d5c8a013a90f2c'/>
<id>urn:sha1:5421db1be3b11c5e469cce3760d5c8a013a90f2c</id>
<content type='text'>
KVM/arm64 is the sole user of perf_num_counters(), and really
could do without it. Stop using the obsolete API by relying on
the existing probing code.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Acked-by: Will Deacon &lt;will@kernel.org&gt;
Link: https://lore.kernel.org/r/20210414134409.1266357-2-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: arm64: Disable PMU support in protected mode</title>
<updated>2021-03-19T12:02:19+00:00</updated>
<author>
<name>Quentin Perret</name>
<email>qperret@google.com</email>
</author>
<published>2021-03-19T10:01:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9589a38cdfeba0889590e6ef4627b439034d456c'/>
<id>urn:sha1:9589a38cdfeba0889590e6ef4627b439034d456c</id>
<content type='text'>
The host currently writes directly in EL2 per-CPU data sections from
the PMU code when running in nVHE. In preparation for unmapping the EL2
sections from the host stage 2, disable PMU support in protected mode as
we currently do not have a use-case for it.

Acked-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Quentin Perret &lt;qperret@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20210319100146.1149909-38-qperret@google.com
</content>
</entry>
</feed>
