From patchwork Mon Feb 4 10:40:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 217853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8EA922C029D for ; Mon, 4 Feb 2013 21:50:32 +1100 (EST) Received: from localhost ([::1]:48395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Jd8-0005sP-M7 for incoming@patchwork.ozlabs.org; Mon, 04 Feb 2013 05:50:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Jcq-0005q5-Qs for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:50:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2Jcp-0003RF-NX for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:50:12 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:54852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Jcp-0003Qv-GE; Mon, 04 Feb 2013 05:50:11 -0500 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id B6A6FA03E6; Mon, 4 Feb 2013 14:50:10 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id BBBD852D; Mon, 4 Feb 2013 14:41:27 +0400 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2013 14:40:36 +0400 Message-Id: <1359974470-17044-27-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Stefan Hajnoczi , Don Slutz , Fred Oliveira , qemu-stable@nongnu.org, Michael Tokarev Subject: [Qemu-devel] [PATCH 26/60] target-i386: Allow tsc-frequency to be larger then 2.147G X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Don Slutz The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira Signed-off-by: Don Slutz Signed-off-by: Stefan Hajnoczi (cherry picked from commit 2e84849aa2cc7f220d3b3668f5f7e3c57bb1b590) Signed-off-by: Michael Tokarev --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 388bc5c..c8be016 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -878,7 +878,7 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque, { X86CPU *cpu = X86_CPU(obj); const int64_t min = 0; - const int64_t max = INT_MAX; + const int64_t max = INT64_MAX; int64_t value; visit_type_int(v, &value, name, errp);