]> git.dujemihanovic.xyz Git - linux.git/commit
KVM: x86/mmu: Handle "default" period when selectively waking kthread
authorSean Christopherson <seanjc@google.com>
Sat, 20 Nov 2021 01:57:06 +0000 (01:57 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Nov 2021 08:09:27 +0000 (03:09 -0500)
commitf47491d7f30b8ab084d0b1596697a7ea4561a894
tree0f27ab2ab58f8ddb1b0786567a9e48c03d3690b7
parent28f091bc2f8c23b7eac2402956b692621be7f9f4
KVM: x86/mmu: Handle "default" period when selectively waking kthread

Account for the '0' being a default, "let KVM choose" period, when
determining whether or not the recovery worker needs to be awakened in
response to userspace reducing the period.  Failure to do so results in
the worker not being awakened properly, e.g. when changing the period
from '0' to any small-ish value.

Fixes: 4dfe4f40d845 ("kvm: x86: mmu: Make NX huge page recovery period configurable")
Cc: stable@vger.kernel.org
Cc: Junaid Shahid <junaids@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211120015706.3830341-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c