From patchwork Thu Jun 30 18:12:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 9208827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1693F6075F for ; Thu, 30 Jun 2016 18:12:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 043702854C for ; Thu, 30 Jun 2016 18:12:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECFB128680; Thu, 30 Jun 2016 18:12:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94FFD2854C for ; Thu, 30 Jun 2016 18:12:44 +0000 (UTC) Received: from localhost ([::1]:51970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIgSB-0000VQ-6K for patchwork-qemu-devel@patchwork.kernel.org; Thu, 30 Jun 2016 14:12:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIgRv-0000V9-CZ for qemu-devel@nongnu.org; Thu, 30 Jun 2016 14:12:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIgRr-0004Ni-6I for qemu-devel@nongnu.org; Thu, 30 Jun 2016 14:12:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIgRr-0004Na-0s for qemu-devel@nongnu.org; Thu, 30 Jun 2016 14:12:23 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AAC9E7F6A8; Thu, 30 Jun 2016 18:12:21 +0000 (UTC) Received: from localhost (vpn1-4-93.gru2.redhat.com [10.97.4.93]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5UICKX0021820; Thu, 30 Jun 2016 14:12:21 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 30 Jun 2016 15:12:17 -0300 Message-Id: <1467310337-3201-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 30 Jun 2016 18:12:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] target-i386: Show host and VM TSC frequencies on mismatch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Marcelo Tosatti , "Dr. David Alan Gilbert" , haozhong.zhang@intel.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Improve the TSC frequency mismatch warning to show the host and VM TSC frequencies. Signed-off-by: Eduardo Habkost Reviewed-by: Dr. David Alan Gilbert --- target-i386/kvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f3698f1..9679415 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -566,7 +566,9 @@ static int kvm_arch_set_tsc_khz(CPUState *cs) -ENOTSUP; if (cur_freq <= 0 || cur_freq != env->tsc_khz) { error_report("warning: TSC frequency mismatch between " - "VM and host, and TSC scaling unavailable"); + "VM (%" PRId64 " kHz) and host (%d kHz), " + "and TSC scaling unavailable", + env->tsc_khz, cur_freq); return r; } }