]> git.baikalelectronics.ru Git - kernel.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)
commit883bddeaa013b4e27d5674730e908c5fde5731ae
treec74165a1d0516ab3f4ac57fbb820b174a874b8eb
parent2cbb28f6062b02c90dc8ce6566d9f50abfdd1aa1
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