From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46391 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbcCLHEr (ORCPT ); Sat, 12 Mar 2016 02:04:47 -0500 Subject: Patch "kvm: cap halt polling at exactly halt_poll_ns" has been added to the 4.4-stable tree To: dmatlack@google.com, gregkh@linuxfoundation.org, pbonzini@redhat.com Cc: , From: Date: Fri, 11 Mar 2016 23:04:31 -0800 Message-ID: <14577662714258@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled kvm: cap halt polling at exactly halt_poll_ns to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-cap-halt-polling-at-exactly-halt_poll_ns.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 313f636d5c490c9741d3f750dc8da33029edbc6b Mon Sep 17 00:00:00 2001 From: David Matlack Date: Tue, 8 Mar 2016 16:19:44 -0800 Subject: kvm: cap halt polling at exactly halt_poll_ns From: David Matlack commit 313f636d5c490c9741d3f750dc8da33029edbc6b upstream. When growing halt-polling, there is no check that the poll time exceeds the limit. It's possible for vcpu->halt_poll_ns grow once past halt_poll_ns, and stay there until a halt which takes longer than vcpu->halt_poll_ns. For example, booting a Linux guest with halt_poll_ns=11000: ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 0 (shrink 10000) ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 10000 (grow 0) ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (grow 10000) Signed-off-by: David Matlack Fixes: aca6ff29c4063a8d467cdee241e6b3bf7dc4a171 Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- virt/kvm/kvm_main.c | 3 +++ 1 file changed, 3 insertions(+) --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1961,6 +1961,9 @@ static void grow_halt_poll_ns(struct kvm else val *= halt_poll_ns_grow; + if (val > halt_poll_ns) + val = halt_poll_ns; + vcpu->halt_poll_ns = val; trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old); } Patches currently in stable-queue which might be from dmatlack@google.com are queue-4.4/kvm-cap-halt-polling-at-exactly-halt_poll_ns.patch