From nobody Tue Nov 4 15:26:24 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530219338768280.1774534545225; Thu, 28 Jun 2018 13:55:38 -0700 (PDT) Received: from localhost ([::1]:38559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdx0-0007Sj-QQ for importer@patchew.org; Thu, 28 Jun 2018 16:55:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdB5-0007mZ-QP for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYdB3-00015g-Gj for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:06:03 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:55466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYdB3-00014a-AN for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:06:01 -0400 Received: by mail-wm0-x22e.google.com with SMTP id v16-v6so11056475wmv.5 for ; Thu, 28 Jun 2018 13:06:01 -0700 (PDT) Received: from 640k.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 127-v6sm6211110wmd.18.2018.06.28.13.05.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=lBT7UZ4knHYqw8V7rEZaCIgsJmCMBiKDeZzIrT6JN+I=; b=baNFO1p3fEHN9X4+a8ICSKiXIec/T+ZfnZVQ10OukiswxwVz9Lccl1dg6dQ2yLXGo+ CjArncJaAo6yL4k3uR6O/3pmkzDueHHJqXbSJfgKZMBqkYNFPF1W61HXbcSpOAnn1Btu GIaT3hk1eNLmQBPhFQdInwiEuYZq1p3IFM1rX0fzhD0IXyP8XNoykZ4zJv+6zY5wtwBg VqNVxlVWJxzZtZlp9pYvPDUzWd6WOJpwOPlobo8Hzk2o0JzfJiG7VR20BGjHDuyWN7dy O4P8fe9ft/E3OsJncsObaUPzU2t5mmf+AMBK7N05Qwl5XrnXtBU0p/mTydpYk23PNcNa sJeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=lBT7UZ4knHYqw8V7rEZaCIgsJmCMBiKDeZzIrT6JN+I=; b=WLJ/UX5HXOrAZqL22DRilorkbS9oHCagoXKhjYGmOiHq+G5MhuHJjJ+5YQjFKlngSs h/iROooFS0cMb8H2E2GyW3mW/lJyhDGRBA+vRayRIgoTSayLYNNm2/9Yn9WWWz4LcGET gdP2BRc2IvSxcgVIMgbGKWc7tbO+XM3unNx523L/Ugiss//huZ5BVuOuw7rLGAUVbkAr /FL9nQLeSo26EBdoYOa61Xv6cZBY/vsX/Dr0rV5s3rdBGW6Ag0Xiy3gnqfgP1csaKEpS vO4ZlDxgKP+ddzke+FUGmYUFC4+Q/slBtbZaPH/MaSjZ9senqYypf069uR1JP8HQpsPu 6r2w== X-Gm-Message-State: APt69E0yp+91WloRWMXb8DPaN51Ko63LbSQVp54K3TYzLJUXO9FWmz7e StTgKEq2/7/EJUHsLzFOxgwYX4uN X-Google-Smtp-Source: AAOMgpeKiDVwgc1LCu4Uk6/vZVWFKV/Wf9K5EJSCa2ZHPKiGDfCPABvvVDoBg+QDrKVr2DhkdD8kcA== X-Received: by 2002:a1c:d391:: with SMTP id k139-v6mr8871002wmg.45.1530216359973; Thu, 28 Jun 2018 13:05:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 22:04:57 +0200 Message-Id: <1530216310-52873-48-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> References: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e Subject: [Qemu-devel] [PULL 47/60] 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: Peter Xu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Peter Xu 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 Message-Id: <20171229073104.3810-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini --- 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 3b3d0a7..c62ba27 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 1.8.3.1