]> git.baikalelectronics.ru Git - kernel.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)
commited8935d4faa6a42bdd1daa5d1941960985ca93da
tree0f27ab2ab58f8ddb1b0786567a9e48c03d3690b7
parent111c23576e0312b4307e064f2bcfd28ea2a47e8d
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: 57fbbb5cb984 ("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