From nobody Tue Oct 28 01:50:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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 1514532782993363.51235102101055; Thu, 28 Dec 2017 23:33:02 -0800 (PST) Received: from localhost ([::1]:58877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp9z-0006Ku-3y for importer@patchew.org; Fri, 29 Dec 2017 02:32:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp8O-0005QI-Ju for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUp8N-0007RT-CH for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56256) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eUp8N-0007Qi-6D for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:15 -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 612F1C0587F3 for ; Fri, 29 Dec 2017 07:31:14 +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 D22C05D9C7; Fri, 29 Dec 2017 07:31:11 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:31:00 +0800 Message-Id: <20171229073104.3810-2-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.32]); Fri, 29 Dec 2017 07:31:14 +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 1/5] doc: another fix to "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_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Something that commit 254316fa1f ("intc: make HMP 'info irq' and 'info pic' commands available on all targets", 2016-10-04) forgot to touch up. Signed-off-by: Peter Xu --- hmp-commands-info.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 54c3e5eac6..4ae2df2f86 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -198,7 +198,7 @@ ETEXI STEXI @item info pic @findex info pic -Show i8259 (PIC) state. +Show PIC state. ETEXI =20 { --=20 2.14.3 From nobody Tue Oct 28 01:50:38 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 From nobody Tue Oct 28 01:50:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514532965226808.0072430020759; Thu, 28 Dec 2017 23:36:05 -0800 (PST) Received: from localhost ([::1]:58957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUpD2-0000ed-5A for importer@patchew.org; Fri, 29 Dec 2017 02:36:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp8W-0005WY-V9 for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUp8U-0007Z7-CH for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45446) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eUp8U-0007Ye-6G for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:22 -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 60CC87F7AB for ; Fri, 29 Dec 2017 07:31:21 +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 F40715D9C7; Fri, 29 Dec 2017 07:31:17 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:31:02 +0800 Message-Id: <20171229073104.3810-4-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.28]); Fri, 29 Dec 2017 07:31:21 +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 3/5] ioapic: some proper indents when dump info 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_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" So that now it looks better when with other irqchips. Signed-off-by: Peter Xu --- hw/intc/ioapic_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index c62ba27018..a02c135b24 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -59,7 +59,7 @@ void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState = *s) uint32_t remote_irr =3D 0; int i; =20 - monitor_printf(mon, "ioapic ver=3D0x%x id=3D0x%02x sel=3D0x%02x", + monitor_printf(mon, "ioapic0: ver=3D0x%x id=3D0x%02x sel=3D0x%02x", s->version, s->id, s->ioregsel); if (s->ioregsel) { monitor_printf(mon, " (redir[%u])\n", @@ -71,7 +71,7 @@ void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState = *s) uint64_t entry =3D s->ioredtbl[i]; uint32_t delm =3D (uint32_t)((entry & IOAPIC_LVT_DELIV_MODE) >> IOAPIC_LVT_DELIV_MODE_SHIFT); - monitor_printf(mon, "pin %-2u 0x%016"PRIx64" dest=3D%"PRIx64 + monitor_printf(mon, " pin %-2u 0x%016"PRIx64" dest=3D%"PRIx64 " vec=3D%-3"PRIu64" %s %-5s %-6s %-6s %s\n", i, entry, (entry >> IOAPIC_LVT_DEST_SHIFT) & @@ -86,8 +86,8 @@ void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState = *s) remote_irr |=3D entry & IOAPIC_LVT_TRIGGER_MODE ? (entry & IOAPIC_LVT_REMOTE_IRR ? (1 << i) : 0) : 0; } - ioapic_irr_dump(mon, "IRR", s->irr); - ioapic_irr_dump(mon, "Remote IRR", remote_irr); + ioapic_irr_dump(mon, " IRR", s->irr); + ioapic_irr_dump(mon, " Remote IRR", remote_irr); } =20 void ioapic_reset_common(DeviceState *dev) --=20 2.14.3 From nobody Tue Oct 28 01:50:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514533037411585.4754724863632; Thu, 28 Dec 2017 23:37:17 -0800 (PST) Received: from localhost ([::1]:59018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUpEC-0001Wp-2N for importer@patchew.org; Fri, 29 Dec 2017 02:37:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp8X-0005XF-SZ for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUp8W-0007a9-To for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56282) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eUp8W-0007Zm-LV for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:24 -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 D11FFC057FAD for ; Fri, 29 Dec 2017 07:31:23 +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 ECF955D9C7; Fri, 29 Dec 2017 07:31:21 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:31:03 +0800 Message-Id: <20171229073104.3810-5-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.32]); Fri, 29 Dec 2017 07:31:23 +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 4/5] ioapic: support "info irq" 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_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This include both userspace and in-kernel ioapic. Note that the numbers can be inaccurate for kvm-ioapic. One reason is the same with kvm-i8259, that when irqfd is used, irqs can be delivered all inside kernel without our notice. Meanwhile, kvm-ioapic is specially treated when irq numbers --- hw/i386/kvm/ioapic.c | 2 ++ hw/intc/ioapic.c | 1 + hw/intc/ioapic_common.c | 23 +++++++++++++++++++++++ include/hw/i386/ioapic_internal.h | 3 +++ 4 files changed, 29 insertions(+) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 98ca480792..0db9a89bd1 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -132,8 +132,10 @@ static void kvm_ioapic_reset(DeviceState *dev) static void kvm_ioapic_set_irq(void *opaque, int irq, int level) { KVMIOAPICState *s =3D opaque; + IOAPICCommonState *common =3D IOAPIC_COMMON(s); int delivered; =20 + ioapic_stat_update_irq(common, irq, level); delivered =3D kvm_set_irq(kvm_state, s->kvm_gsi_base + irq, level); apic_report_irq_delivered(delivered); } diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 36139a4db6..1f0c76571e 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -149,6 +149,7 @@ static void ioapic_set_irq(void *opaque, int vector, in= t level) * the cleanest way of doing it but it should work. */ =20 trace_ioapic_set_irq(vector, level); + ioapic_stat_update_irq(s, vector, level); if (vector =3D=3D 0) { vector =3D 2; } diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index a02c135b24..692dc37bb6 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -35,6 +35,28 @@ */ int ioapic_no; =20 +void ioapic_stat_update_irq(IOAPICCommonState *s, int irq, int level) +{ + if (level !=3D s->irq_level[irq]) { + s->irq_level[irq] =3D level; + if (level =3D=3D 1) { + s->irq_count[irq]++; + } + } +} + +static bool ioapic_get_statistics(InterruptStatsProvider *obj, + uint64_t **irq_counts, + unsigned int *nb_irqs) +{ + IOAPICCommonState *s =3D IOAPIC_COMMON(obj); + + *irq_counts =3D s->irq_count; + *nb_irqs =3D IOAPIC_NUM_PINS; + + return true; +} + static void ioapic_irr_dump(Monitor *mon, const char *name, uint32_t bitma= p) { int i; @@ -176,6 +198,7 @@ static void ioapic_common_class_init(ObjectClass *klass= , void *data) dc->realize =3D ioapic_common_realize; dc->vmsd =3D &vmstate_ioapic_common; ic->print_info =3D ioapic_print_info; + ic->get_statistics =3D ioapic_get_statistics; } =20 static const TypeInfo ioapic_common_type =3D { diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_int= ernal.h index a11d86de46..9848f391bb 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/include/hw/i386/ioapic_internal.h @@ -109,10 +109,13 @@ struct IOAPICCommonState { uint64_t ioredtbl[IOAPIC_NUM_PINS]; Notifier machine_done; uint8_t version; + uint64_t irq_count[IOAPIC_NUM_PINS]; + int irq_level[IOAPIC_NUM_PINS]; }; =20 void ioapic_reset_common(DeviceState *dev); =20 void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s); +void ioapic_stat_update_irq(IOAPICCommonState *s, int irq, int level); =20 #endif /* QEMU_IOAPIC_INTERNAL_H */ --=20 2.14.3 From nobody Tue Oct 28 01:50:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514532924612375.1833747489667; Thu, 28 Dec 2017 23:35:24 -0800 (PST) Received: from localhost ([::1]:58932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUpCN-0008NN-E1 for importer@patchew.org; Fri, 29 Dec 2017 02:35:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUp8f-0005dj-Um for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUp8d-0007c0-7j for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58726) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eUp8d-0007bl-14 for qemu-devel@nongnu.org; Fri, 29 Dec 2017 02:31:31 -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 30A29C04AC5E for ; Fri, 29 Dec 2017 07:31:30 +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 64BDC5D9C7; Fri, 29 Dec 2017 07:31:24 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:31:04 +0800 Message-Id: <20171229073104.3810-6-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.31]); Fri, 29 Dec 2017 07:31:30 +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 5/5] hmp: obsolete "info ioapic" 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_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Let's start to use "info pic" just like other platforms. For now we keep the command for a while so that old users can know what is the new command to use. Signed-off-by: Peter Xu --- hw/i386/kvm/ioapic.c | 9 --------- hw/intc/ioapic.c | 11 ----------- include/hw/i386/pc.h | 3 --- target/i386/monitor.c | 8 ++------ 4 files changed, 2 insertions(+), 29 deletions(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 0db9a89bd1..e6cb468910 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -112,15 +112,6 @@ static void kvm_ioapic_put(IOAPICCommonState *s) } } =20 -void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict) -{ - IOAPICCommonState *s =3D IOAPIC_COMMON(object_resolve_path("ioapic", N= ULL)); - - assert(s); - kvm_ioapic_get(s); - ioapic_print_redtbl(mon, s); -} - static void kvm_ioapic_reset(DeviceState *dev) { IOAPICCommonState *s =3D IOAPIC_COMMON(dev); diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 1f0c76571e..aa7f030971 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -235,17 +235,6 @@ void ioapic_eoi_broadcast(int vector) } } =20 -void ioapic_dump_state(Monitor *mon, const QDict *qdict) -{ - int i; - - for (i =3D 0; i < MAX_IOAPICS; i++) { - if (ioapics[i] !=3D 0) { - ioapic_print_redtbl(mon, ioapics[i]); - } - } -} - static uint64_t ioapic_mem_read(void *opaque, hwaddr addr, unsigned int size) { diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 6f77eb0665..b9f8a79967 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -169,9 +169,6 @@ int pic_get_output(DeviceState *d); =20 /* ioapic.c */ =20 -void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict); -void ioapic_dump_state(Monitor *mon, const QDict *qdict); - /* Global System Interrupts */ =20 #define GSI_NUM_PINS IOAPIC_NUM_PINS diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 75e155ffb1..4ff81ae676 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -652,10 +652,6 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qd= ict) =20 void hmp_info_io_apic(Monitor *mon, const QDict *qdict) { - if (kvm_irqchip_in_kernel() && - !kvm_irqchip_is_split()) { - kvm_ioapic_dump_state(mon, qdict); - } else { - ioapic_dump_state(mon, qdict); - } + monitor_printf(mon, "This command is obsolete and will be " + "removed soon. Please use 'info pic' instead.\n"); } --=20 2.14.3