diff options
author | James Hogan <[email protected]> | 2015-02-24 11:46:20 +0000 |
---|---|---|
committer | Marcelo Tosatti <[email protected]> | 2015-03-02 19:17:52 -0300 |
commit | b3cffac04eca9af46e1e23560a8ee22b1bd36d43 (patch) | |
tree | e505d77449190e1c8141e8a2165d7caaf7044d17 /tools/perf/util/trace-event-scripting.c | |
parent | f563db4bdb8ef5ea73d0f5ea2b20384c10fbd617 (diff) |
KVM: MIPS: Fix trace event to save PC directly
Currently the guest exit trace event saves the VCPU pointer to the
structure, and the guest PC is retrieved by dereferencing it when the
event is printed rather than directly from the trace record. This isn't
safe as the printing may occur long afterwards, after the PC has changed
and potentially after the VCPU has been freed. Usually this results in
the same (wrong) PC being printed for multiple trace events. It also
isn't portable as userland has no way to access the VCPU data structure
when interpreting the trace record itself.
Lets save the actual PC in the structure so that the correct value is
accessible later.
Fixes: 669e846e6c4e ("KVM/MIPS32: MIPS arch specific APIs for KVM")
Signed-off-by: James Hogan <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: <[email protected]> # v3.10+
Acked-by: Steven Rostedt <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions