Skip to content

Commit 0544841

Browse files
committed
Merge branch kvm-arm64/misc into kvmarm/next
* kvm-arm64/misc: : Miscellaneous updates : : - Put an upper bound on the number of I-cache invalidations by : cacheline to avoid soft lockups : : - Use folios to determine if guest memory can be backed with a block : (THP) : : - Do a local TLB invalidation on permission fault race : : - Fixes for page_fault_test KVM selftest : : - Add a tracepoint for detecting MMIO instructions unsupported by KVM KVM: arm64: Add tracepoint for MMIO accesses where ISV==0 Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2 parents dfad6c4 + 9ec605a commit 0544841

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

arch/arm64/kvm/mmio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
135135
* volunteered to do so, and bail out otherwise.
136136
*/
137137
if (!kvm_vcpu_dabt_isvalid(vcpu)) {
138+
trace_kvm_mmio_nisv(*vcpu_pc(vcpu), kvm_vcpu_get_esr(vcpu),
139+
kvm_vcpu_get_hfar(vcpu), fault_ipa);
140+
138141
if (test_bit(KVM_ARCH_FLAG_RETURN_NISV_IO_ABORT_TO_USER,
139142
&vcpu->kvm->arch.flags)) {
140143
run->exit_reason = KVM_EXIT_ARM_NISV;
@@ -143,7 +146,6 @@ int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
143146
return 0;
144147
}
145148

146-
kvm_pr_unimpl("Data abort outside memslots with no valid syndrome info\n");
147149
return -ENOSYS;
148150
}
149151

arch/arm64/kvm/trace_arm.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,31 @@ TRACE_EVENT(kvm_mmio_emulate,
136136
__entry->vcpu_pc, __entry->instr, __entry->cpsr)
137137
);
138138

139+
TRACE_EVENT(kvm_mmio_nisv,
140+
TP_PROTO(unsigned long vcpu_pc, unsigned long esr,
141+
unsigned long far, unsigned long ipa),
142+
TP_ARGS(vcpu_pc, esr, far, ipa),
143+
144+
TP_STRUCT__entry(
145+
__field( unsigned long, vcpu_pc )
146+
__field( unsigned long, esr )
147+
__field( unsigned long, far )
148+
__field( unsigned long, ipa )
149+
),
150+
151+
TP_fast_assign(
152+
__entry->vcpu_pc = vcpu_pc;
153+
__entry->esr = esr;
154+
__entry->far = far;
155+
__entry->ipa = ipa;
156+
),
157+
158+
TP_printk("ipa %#016lx, esr %#016lx, far %#016lx, pc %#016lx",
159+
__entry->ipa, __entry->esr,
160+
__entry->far, __entry->vcpu_pc)
161+
);
162+
163+
139164
TRACE_EVENT(kvm_set_way_flush,
140165
TP_PROTO(unsigned long vcpu_pc, bool cache),
141166
TP_ARGS(vcpu_pc, cache),

0 commit comments

Comments
 (0)