From patchwork Sat Dec 9 08:43:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 846543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3yv2zk6SR3z9sCZ for ; Sat, 9 Dec 2017 19:52:50 +1100 (AEDT) Received: from localhost ([::1]:40459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNasK-00085s-VE for incoming@patchwork.ozlabs.org; Sat, 09 Dec 2017 03:52:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNalZ-000299-KT for qemu-devel@nongnu.org; Sat, 09 Dec 2017 03:45:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNalY-0008IM-Nv for qemu-devel@nongnu.org; Sat, 09 Dec 2017 03:45:49 -0500 Received: from 15.mo6.mail-out.ovh.net ([188.165.39.161]:46536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eNalY-0008Hj-Ho for qemu-devel@nongnu.org; Sat, 09 Dec 2017 03:45:48 -0500 Received: from player735.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id 760181277DB for ; Sat, 9 Dec 2017 09:45:47 +0100 (CET) Received: from zorba.kaod.org.com (LFbn-1-2231-173.w90-76.abo.wanadoo.fr [90.76.52.173]) (Authenticated sender: clg@kaod.org) by player735.ha.ovh.net (Postfix) with ESMTPSA id 48381160087; Sat, 9 Dec 2017 09:45:41 +0100 (CET) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson , Benjamin Herrenschmidt , Greg Kurz Date: Sat, 9 Dec 2017 09:43:37 +0100 Message-Id: <20171209084338.29395-19-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171209084338.29395-1-clg@kaod.org> References: <20171209084338.29395-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 11725966056647592787 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtuddrvddugdduvdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 188.165.39.161 Subject: [Qemu-devel] [PATCH v2 18/19] spapr: add support to dump XIVE information 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: =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Modify the InterruptStatsProvider output to reflect the interrupt mode currently in use by the machine. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4d7a3d64e51e..867c9d759f3b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3873,10 +3873,18 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj, CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); - icp_pic_print_info(ICP(cpu->intc), mon); + if (spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { + spapr_xive_nvt_pic_print_info(SPAPR_XIVE_NVT(cpu->intc), mon); + } else { + icp_pic_print_info(ICP(cpu->intc), mon); + } } - ics_pic_print_info(spapr->ics, mon); + if (spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { + spapr_xive_pic_print_info(spapr->xive, mon); + } else { + ics_pic_print_info(spapr->ics, mon); + } } int spapr_vcpu_id(PowerPCCPU *cpu)