From patchwork Mon Feb 3 21:53:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 316364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 13F642C0089 for ; Tue, 4 Feb 2014 10:20:14 +1100 (EST) Received: from localhost ([::1]:50008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WASoF-0003Md-Pi for incoming@patchwork.ozlabs.org; Mon, 03 Feb 2014 18:20:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WARS4-0000zy-ON for qemu-devel@nongnu.org; Mon, 03 Feb 2014 16:53:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WARRy-000063-FZ for qemu-devel@nongnu.org; Mon, 03 Feb 2014 16:53:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51612 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WARRy-00005x-8n; Mon, 03 Feb 2014 16:53:06 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6DE36AC85; Mon, 3 Feb 2014 21:53:05 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Mon, 3 Feb 2014 22:53:02 +0100 Message-Id: <1391464382-60634-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.135.220.15 Cc: qemu-ppc@nongnu.org Subject: [Qemu-devel] [PATCH] PPC: KVM: Don't tell the user about missing SPR syncs 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 We sync a lot of SPRs automatically between KVM and QEMU now. Some of these only matter on newer hardware, some only matter on HV KVM. With the current code runnign on my reasonably recent PR KVM kernel I get a lot of SPR synchronization warnings though: $ ./ppc64-softmmu/qemu-system-ppc64 -nographic -enable-kvm Warning: Unable to set SPR 17 to KVM: Invalid argument Warning: Unable to set SPR 29 to KVM: Invalid argument Warning: Unable to set SPR 157 to KVM: Invalid argument Warning: Unable to set SPR 308 to KVM: Invalid argument Warning: Unable to set SPR 309 to KVM: Invalid argument Warning: Unable to set SPR 318 to KVM: Invalid argument Warning: Unable to set SPR 770 to KVM: Invalid argument Warning: Unable to set SPR 945 to KVM: Invalid argument Warning: Unable to set SPR 946 to KVM: Invalid argument Warning: Unable to set SPR 1013 to KVM: Invalid argument Warning: Unable to set SPR 17 to KVM: Invalid argument Warning: Unable to set SPR 29 to KVM: Invalid argument Warning: Unable to set SPR 157 to KVM: Invalid argument Warning: Unable to set SPR 308 to KVM: Invalid argument Warning: Unable to set SPR 309 to KVM: Invalid argument Warning: Unable to set SPR 318 to KVM: Invalid argument Warning: Unable to set SPR 770 to KVM: Invalid argument Warning: Unable to set SPR 945 to KVM: Invalid argument Warning: Unable to set SPR 946 to KVM: Invalid argument Warning: Unable to set SPR 1013 to KVM: Invalid argument Eventually we want to have something like a "verbose" flag that allows us to get these warnings when we see something goes wrong. But until then they do more harm than good exposed to casual users, so let's move them to debug prints. Signed-off-by: Alexander Graf --- target-ppc/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 8f3f0bf..dce2156 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -480,7 +480,7 @@ static void kvm_get_one_spr(CPUState *cs, uint64_t id, int spr) ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); if (ret != 0) { - fprintf(stderr, "Warning: Unable to retrieve SPR %d from KVM: %s\n", + DPRINTF("Warning: Unable to retrieve SPR %d from KVM: %s\n", spr, strerror(errno)); } else { switch (id & KVM_REG_SIZE_MASK) { @@ -529,7 +529,7 @@ static void kvm_put_one_spr(CPUState *cs, uint64_t id, int spr) ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); if (ret != 0) { - fprintf(stderr, "Warning: Unable to set SPR %d to KVM: %s\n", + DPRINTF("Warning: Unable to set SPR %d to KVM: %s\n", spr, strerror(errno)); } }