From nobody Tue Oct 28 12:14:10 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514532789040790.952954606634; Thu, 28 Dec 2017 23:33:09 -0800 (PST) Received: from localhost ([::1]:58879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUpA4-0006O2-Jv for importer@patchew.org; Fri, 29 Dec 2017 02:33:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp8R-0005RL-Gg for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUp8Q-0007XE-Iq for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35222) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eUp8Q-0007Vg-CB for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:18 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 819C7491 for ; Fri, 29 Dec 2017 07:31:17 +0000 (UTC) Received: from xz-mi.redhat.com (ovpn-12-183.pek2.redhat.com [10.72.12.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id D447F5D9C7; Fri, 29 Dec 2017 07:31:14 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:31:01 +0800 Message-Id: <20171229073104.3810-3-peterx@redhat.com> In-Reply-To: <20171229073104.3810-1-peterx@redhat.com> References: <20171229073104.3810-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 29 Dec 2017 07:31:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/5] ioapic: support "info pic" 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 , peterx@redhat.com, "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" People start to use "info pic" for all kinds of irqchip dumps. Let x86 ioapic join the family. It dumps the same thing as "info ioapic". Signed-off-by: Peter Xu --- hw/intc/ioapic_common.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index 3b3d0a7680..c62ba27018 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -24,6 +24,7 @@ #include "monitor/monitor.h" #include "hw/i386/ioapic.h" #include "hw/i386/ioapic_internal.h" +#include "hw/intc/intc.h" #include "hw/sysbus.h" =20 /* ioapic_no count start from 0 to MAX_IOAPICS, @@ -142,6 +143,15 @@ static void ioapic_common_realize(DeviceState *dev, Er= ror **errp) ioapic_no++; } =20 +static void ioapic_print_info(InterruptStatsProvider *obj, + Monitor *mon) +{ + IOAPICCommonState *s =3D IOAPIC_COMMON(obj); + + ioapic_dispatch_pre_save(s); + ioapic_print_redtbl(mon, s); +} + static const VMStateDescription vmstate_ioapic_common =3D { .name =3D "ioapic", .version_id =3D 3, @@ -161,9 +171,11 @@ static const VMStateDescription vmstate_ioapic_common = =3D { static void ioapic_common_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + InterruptStatsProviderClass *ic =3D INTERRUPT_STATS_PROVIDER_CLASS(kla= ss); =20 dc->realize =3D ioapic_common_realize; dc->vmsd =3D &vmstate_ioapic_common; + ic->print_info =3D ioapic_print_info; } =20 static const TypeInfo ioapic_common_type =3D { @@ -173,6 +185,10 @@ static const TypeInfo ioapic_common_type =3D { .class_size =3D sizeof(IOAPICCommonClass), .class_init =3D ioapic_common_class_init, .abstract =3D true, + .interfaces =3D (InterfaceInfo[]) { + { TYPE_INTERRUPT_STATS_PROVIDER }, + { } + }, }; =20 static void ioapic_common_register_types(void) --=20 2.14.3