ANDROID: KVM: arm64: iommu: Add idmap trace point
Add a trace point for identity mapping callback. Bug: 277989609 Bug: 278749606 Change-Id: I918a7a22123f5358b27a77dc4e25bbec371b1efb Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
@@ -125,4 +125,18 @@ HYP_EVENT(selftest,
|
||||
);
|
||||
#endif
|
||||
|
||||
HYP_EVENT(iommu_idmap,
|
||||
HE_PROTO(u64 from, u64 to, int prot),
|
||||
HE_STRUCT(
|
||||
he_field(u64, from)
|
||||
he_field(u64, to)
|
||||
he_field(int, prot)
|
||||
),
|
||||
HE_ASSIGN(
|
||||
__entry->from = from;
|
||||
__entry->to = to;
|
||||
__entry->prot = prot;
|
||||
),
|
||||
HE_PRINTK("from=0x%llx to=0x%llx prot=0x%x", __entry->from, __entry->to, __entry->prot)
|
||||
);
|
||||
#endif /* __ARM64_KVM_HYPEVENTS_H_ */
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2022 Linaro Ltd.
|
||||
*/
|
||||
#include <asm/kvm_hyp.h>
|
||||
#include <asm/kvm_hypevents.h>
|
||||
|
||||
#include <hyp/adjust_pc.h>
|
||||
|
||||
@@ -478,6 +479,8 @@ void kvm_iommu_host_stage2_idmap(phys_addr_t start, phys_addr_t end,
|
||||
if (!kvm_iommu_is_ready())
|
||||
return;
|
||||
|
||||
trace_iommu_idmap(start, end, prot);
|
||||
|
||||
domain = __handle_to_domain(KVM_IOMMU_DOMAIN_IDMAP_ID, false);
|
||||
|
||||
kvm_iommu_ops->host_stage2_idmap(domain, start, end, pkvm_to_iommu_prot(prot));
|
||||
|
||||
Reference in New Issue
Block a user