]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: VMX: Change ple_window type to unsigned int
authorPeter Xu <peterx@redhat.com>
Fri, 6 Sep 2019 02:17:21 +0000 (10:17 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Sep 2019 17:13:20 +0000 (19:13 +0200)
commitc5c5d6fae001c653a4e831325e062816a60c5e38
treec74165a1d0516ab3f4ac57fbb820b174a874b8eb
parent13a7e370cb89e2ec0859c99960b24b12a3c2c029
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>
arch/x86/kvm/trace.h
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h