mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 10:02:02 +02:00
KVM: s390: Extract gmap tracing to a separate header
Move the kvm_s390_major_guest_pfault trace event from trace.h to a new trace_gmap.h header. This separates gmap-specific tracing from general KVM/s390 tracing, preparing for code sharing between multiple KVM implementations. The trace event definition is updated to use local defines for parameters so that they can be replaced later with ease for when another KVM implementation uses these traces. No functional change. Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
This commit is contained in:
parent
d873515be0
commit
6ece2811aa
|
|
@ -9,10 +9,11 @@
|
|||
#include <linux/kvm_host.h>
|
||||
|
||||
#include "gmap.h"
|
||||
#include "trace.h"
|
||||
#include "faultin.h"
|
||||
|
||||
bool kvm_arch_setup_async_pf(struct kvm_vcpu *vcpu);
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "trace_gmap.h"
|
||||
|
||||
/*
|
||||
* kvm_s390_faultin_gfn() - handle a dat fault.
|
||||
|
|
|
|||
|
|
@ -45,20 +45,6 @@ TRACE_EVENT(kvm_s390_skey_related_inst,
|
|||
VCPU_TP_PRINTK("%s", "storage key related instruction")
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_s390_major_guest_pfault,
|
||||
TP_PROTO(VCPU_PROTO_COMMON),
|
||||
TP_ARGS(VCPU_ARGS_COMMON),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
VCPU_FIELD_COMMON
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
VCPU_ASSIGN_COMMON
|
||||
),
|
||||
VCPU_TP_PRINTK("%s", "major fault, maybe applicable for pfault")
|
||||
);
|
||||
|
||||
TRACE_EVENT(kvm_s390_pfault_init,
|
||||
TP_PROTO(VCPU_PROTO_COMMON, long pfault_token),
|
||||
TP_ARGS(VCPU_ARGS_COMMON, pfault_token),
|
||||
|
|
|
|||
47
arch/s390/kvm/trace_gmap.h
Normal file
47
arch/s390/kvm/trace_gmap.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#if !defined(GMAP_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define GMAP_TRACE_KVM_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
#define TRACE_INCLUDE_FILE trace_gmap
|
||||
|
||||
#define __KVM_FIELDS \
|
||||
__field(unsigned long, pswmask) \
|
||||
__field(unsigned long, pswaddr)
|
||||
#define __KVM_ASSIGN ({\
|
||||
__entry->pswmask = vcpu->arch.sie_block->gpsw.mask; \
|
||||
__entry->pswaddr = vcpu->arch.sie_block->gpsw.addr; \
|
||||
})
|
||||
#define __KVM_PRINT \
|
||||
__entry->pswmask,\
|
||||
__entry->pswaddr
|
||||
|
||||
TRACE_EVENT(kvm_s390_major_guest_pfault,
|
||||
TP_PROTO(struct kvm_vcpu *vcpu),
|
||||
TP_ARGS(vcpu),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, id)
|
||||
__KVM_FIELDS
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->id = vcpu->vcpu_id;
|
||||
__KVM_ASSIGN
|
||||
),
|
||||
TP_printk("%02d[%016lx-%016lx]: major fault, maybe applicable for pfault",
|
||||
__entry->id,
|
||||
__KVM_PRINT
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* GMAP_TRACE_KVM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Loading…
Reference in New Issue
Block a user