Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3009576ybi; Mon, 17 Jun 2019 14:36:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqNxQt6St1jWtpbv8Z60/PkPYz+GYgTXl4JDSZRztltdwurCgl9mOUOSgbdZE331DugW65 X-Received: by 2002:a62:1c91:: with SMTP id c139mr109197133pfc.25.1560807363553; Mon, 17 Jun 2019 14:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560807363; cv=none; d=google.com; s=arc-20160816; b=PBy+5F6tBqQy+dWWItbJW+vQyTvfTlgJM4qIh0MfAQEae0Ht+v3NCqE+ruhTtVbnPq uCyJuMduLMZhzdJ5Zz3KV6pUmQpgpt0yleoowtCZr7X4r+cgSd2Xcvk7oDEqvzoS37ya TMIMaHP7s/OlmpR0g3SoeVUolsupRh9jx4ArEixR3sY4OFn/3/YJRV5vufFq0tXMda3k XLeqQlp905jAXGuJiGfMp+lzLUn8fMy3lzsAuMU1GT845uwGYLaIhfepQ7/rpKfVIhQ8 QWD69N4QLDhV+WplyRwpvQ/vbHfg+2WpzqNSTYlqBU/R4yxlFCj/UX2ZuKiLm/A4p/6h i0Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1xXdvdzBqS5bjS7ikv8MXbDHbznUBROiHJ8UlZBCFJE=; b=kTBoSCl8mAFc1T+e6KBr6PjYoOP72EmRNjARhJQiiAAxojsZtWSNHX+0BmEjBCDrOp EqqkDNvmX6THCL59WOL+jUf+FNSCJwcoXzljDIaPGvk5y6e8Fe06YBMCoC3I+riKwrnw GaZbl5o5mKeZbEVwB433l9g3e8eV97oGi1hW27QiFfSFaxzneW+0uayftkgUd8Kqp793 rZnmZfrhjJVeG3tJOF5P+kLs4jdzNPZhDaDc81H78KiaipkqvBbpABum1GS5Rz0SMcsU c7Rti729O52CPKf2BN/fvdGIxOBw6JjX/dC42Qp7IRo2ejFB7lWb+LYXevJdnd/YpKj5 0uYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OXx4CEur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r20si10703769pls.389.2019.06.17.14.35.48; Mon, 17 Jun 2019 14:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OXx4CEur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729560AbfFQVWc (ORCPT + 99 others); Mon, 17 Jun 2019 17:22:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:47078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729537AbfFQVW0 (ORCPT ); Mon, 17 Jun 2019 17:22:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01B7A2063F; Mon, 17 Jun 2019 21:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560806545; bh=BznVoR+FiBUgaFlz9uhoR8AQG6axRGqhTctpnfjZEQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OXx4CEurr+Y/eFZhB5kL4QtbuRwUgNX5WqPNgHt9Wcu/7bfhVplsotAgstRDvpJ4u o7+XZltJREfOEfVQYwaAcW6Ex0vTYb/lXOXL7BM0qXtfbhzZnaxdvTI9FG43CNtuG+ JNu+50AQnBdxgMWjz1AafyTFEGCZKWpvJvV93XEg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Sean Christopherson , Liran Alon , Wanpeng Li , Sasha Levin Subject: [PATCH 5.1 087/115] KVM: LAPIC: Fix lapic_timer_advance_ns parameter overflow Date: Mon, 17 Jun 2019 23:09:47 +0200 Message-Id: <20190617210804.414958400@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190617210759.929316339@linuxfoundation.org> References: <20190617210759.929316339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 0e6edceb8f18a4e31526d83e6099fef1f29c3af5 ] After commit c3941d9e0 (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: c3941d9e0 (KVM: lapic: Allow user to disable adaptive tuning of timer advancement) Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index efc8adf7ca0e..b07868eb1656 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -143,7 +143,7 @@ module_param(tsc_tolerance_ppm, uint, S_IRUGO | S_IWUSR); * tuning, i.e. allows priveleged userspace to set an exact advancement time. */ static int __read_mostly lapic_timer_advance_ns = -1; -module_param(lapic_timer_advance_ns, uint, S_IRUGO | S_IWUSR); +module_param(lapic_timer_advance_ns, int, S_IRUGO | S_IWUSR); static bool __read_mostly vector_hashing = true; module_param(vector_hashing, bool, S_IRUGO); -- 2.20.1