ANDROID: gunyah: Add trace_hooks in gunyah_vcpu and vm_mgr driver
Provide vendor hooks for VM and VCPU ioctl release for vendor usage. Bug: 413283378 Change-Id: I6320313687a20b7f619d27d5f0723225da302672 Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
This commit is contained in:
committed by
Treehugger Robot
parent
fed767b09e
commit
855c35c72d
@@ -168,6 +168,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpufreq_transition);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_gic_v3_set_affinity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_gh_before_vcpu_run);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_gh_after_vcpu_run);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_gh_vm_release);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_gh_vcpu_release);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_select_special_worklist);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sync_txn_recvd);
|
||||
|
||||
@@ -368,6 +368,7 @@ static int gunyah_vcpu_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct gunyah_vcpu *vcpu = filp->private_data;
|
||||
|
||||
trace_android_rvh_gh_vcpu_release(vcpu->ghvm->vmid, vcpu);
|
||||
gunyah_vm_put(vcpu->ghvm);
|
||||
kref_put(&vcpu->kref, vcpu_release);
|
||||
return 0;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/xarray.h>
|
||||
|
||||
#include <uapi/linux/gunyah.h>
|
||||
#include <trace/hooks/gunyah.h>
|
||||
|
||||
#include "rsc_mgr.h"
|
||||
#include "vm_mgr.h"
|
||||
@@ -1190,6 +1191,7 @@ static int gunyah_vm_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct gunyah_vm *ghvm = filp->private_data;
|
||||
|
||||
trace_android_rvh_gh_vm_release(ghvm->vmid, ghvm);
|
||||
gunyah_vm_put(ghvm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#define _TRACE_HOOK_GUNYAH_H
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
struct gunyah_hypercall_vcpu_run_resp;
|
||||
struct gunyah_vcpu;
|
||||
struct gunyah_vm;
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_gh_before_vcpu_run,
|
||||
TP_PROTO(u16 vmid, u32 vcpu_id),
|
||||
@@ -14,6 +16,12 @@ DECLARE_RESTRICTED_HOOK(android_rvh_gh_after_vcpu_run,
|
||||
TP_PROTO(u16 vmid, u32 vcpu_id, int hcall_ret,
|
||||
const struct gunyah_hypercall_vcpu_run_resp *resp),
|
||||
TP_ARGS(vmid, vcpu_id, hcall_ret, resp), 1);
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_gh_vm_release,
|
||||
TP_PROTO(u16 vmid, struct gunyah_vm *ghvm),
|
||||
TP_ARGS(vmid, ghvm), 1);
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_gh_vcpu_release,
|
||||
TP_PROTO(u16 vmid, struct gunyah_vcpu *vcpu),
|
||||
TP_ARGS(vmid, vcpu), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_GUNYAH_H */
|
||||
/* This part must be outside protection */
|
||||
|
||||
Reference in New Issue
Block a user