File tree Expand file tree Collapse file tree 1 file changed +2
-32
lines changed Expand file tree Collapse file tree 1 file changed +2
-32
lines changed Original file line number Diff line number Diff line change 13
13
14
14
DEFINE_STATIC_KEY_FALSE (kvm_arm_pmu_available );
15
15
16
- static unsigned int kvm_guest_state (void )
17
- {
18
- struct kvm_vcpu * vcpu = kvm_get_running_vcpu ();
19
- unsigned int state ;
20
-
21
- if (!vcpu )
22
- return 0 ;
23
-
24
- state = PERF_GUEST_ACTIVE ;
25
- if (!vcpu_mode_priv (vcpu ))
26
- state |= PERF_GUEST_USER ;
27
-
28
- return state ;
29
- }
30
-
31
- static unsigned long kvm_get_guest_ip (void )
32
- {
33
- struct kvm_vcpu * vcpu = kvm_get_running_vcpu ();
34
-
35
- if (WARN_ON_ONCE (!vcpu ))
36
- return 0 ;
37
-
38
- return * vcpu_pc (vcpu );
39
- }
40
-
41
- static struct perf_guest_info_callbacks kvm_guest_cbs = {
42
- .state = kvm_guest_state ,
43
- .get_ip = kvm_get_guest_ip ,
44
- };
45
-
46
16
void kvm_perf_init (void )
47
17
{
48
- perf_register_guest_info_callbacks ( & kvm_guest_cbs );
18
+ kvm_register_perf_callbacks ( NULL );
49
19
}
50
20
51
21
void kvm_perf_teardown (void )
52
22
{
53
- perf_unregister_guest_info_callbacks ( & kvm_guest_cbs );
23
+ kvm_unregister_perf_callbacks ( );
54
24
}
You can’t perform that action at this time.
0 commit comments