diff options
author | Peter Xu <peterx@redhat.com> | 2019-09-06 04:17:21 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-09-10 19:13:20 +0200 |
commit | c5c5d6fae001c653a4e831325e062816a60c5e38 (patch) | |
tree | c74165a1d0516ab3f4ac57fbb820b174a874b8eb /arch/x86/kvm/trace.h | |
parent | KVM: X86: Remove tailing newline for tracepoints (diff) | |
download | linux-c5c5d6fae001c653a4e831325e062816a60c5e38.tar.xz linux-c5c5d6fae001c653a4e831325e062816a60c5e38.zip |
KVM: VMX: Change ple_window type to unsigned int
The VMX ple_window is 32 bits wide, so logically it can overflow with
an int. The module parameter is declared as unsigned int which is
good, however the dynamic variable is not. Switching all the
ple_window references to use unsigned int.
The tracepoint changes will also affect SVM, but SVM is using an even
smaller width (16 bits) so it's always fine.
Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r-- | arch/x86/kvm/trace.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 4d694c6ce559..a9e4e7f53b3f 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -891,14 +891,15 @@ TRACE_EVENT(kvm_pml_full, ); TRACE_EVENT(kvm_ple_window, - TP_PROTO(bool grow, unsigned int vcpu_id, int new, int old), + TP_PROTO(bool grow, unsigned int vcpu_id, unsigned int new, + unsigned int old), TP_ARGS(grow, vcpu_id, new, old), TP_STRUCT__entry( __field( bool, grow ) __field( unsigned int, vcpu_id ) - __field( int, new ) - __field( int, old ) + __field( unsigned int, new ) + __field( unsigned int, old ) ), TP_fast_assign( @@ -908,7 +909,7 @@ TRACE_EVENT(kvm_ple_window, __entry->old = old; ), - TP_printk("vcpu %u: ple_window %d (%s %d)", + TP_printk("vcpu %u: ple_window %u (%s %u)", __entry->vcpu_id, __entry->new, __entry->grow ? "grow" : "shrink", |