]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: LAPIC: Fix lapic_timer_advance_ns parameter overflow
authorWanpeng Li <wanpengli@tencent.com>
Mon, 20 May 2019 08:18:06 +0000 (16:18 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:27:09 +0000 (21:27 +0200)
commitafb66876c8a797cfc4d644e5ec9f56cee25ddf7a
treef046ec5cf221afeecbdc45647d38550d198a1dc0
parent775142f26785d1a06befdef46761f00cbd32aad1
KVM: LAPIC: Fix lapic_timer_advance_ns parameter overflow

After commit f76e17a37 (KVM: lapic: Allow user to disable adaptive tuning of
timer advancement), '-1' enables adaptive tuning starting from default
advancment of 1000ns. However, we should expose an int instead of an overflow
uint module parameter.

Before patch:

/sys/module/kvm/parameters/lapic_timer_advance_ns:4294967295

After patch:

/sys/module/kvm/parameters/lapic_timer_advance_ns:-1

Fixes: f76e17a37 (KVM: lapic: Allow user to disable adaptive tuning of timer advancement)
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c