From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWvBa-000706-Du for qemu-devel@nongnu.org; Mon, 18 Jan 2010 12:14:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWvBV-0006w4-2l for qemu-devel@nongnu.org; Mon, 18 Jan 2010 12:14:41 -0500 Received: from [199.232.76.173] (port=40899 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWvBU-0006vu-U2 for qemu-devel@nongnu.org; Mon, 18 Jan 2010 12:14:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32176) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWvBU-0003nS-67 for qemu-devel@nongnu.org; Mon, 18 Jan 2010 12:14:36 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 4/5] PCI: do_pci_info(): PCI bridge support References: <1262976136-31852-1-git-send-email-lcapitulino@redhat.com> <1262976136-31852-5-git-send-email-lcapitulino@redhat.com> Date: Mon, 18 Jan 2010 18:14:32 +0100 In-Reply-To: <1262976136-31852-5-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Fri, 8 Jan 2010 16:42:15 -0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, mst@redhat.com Luiz Capitulino writes: > This commit adds the "pci_bridge" key to the PCI device QDict, > it also adds support for printing it in the user protocol. > > IMPORTANT: This code is being added separately because I could > NOT test it properly. According to Michael Tsirkin, it depends > on ultrasparc and it would take time to do the proper setup. > > Signed-off-by: Luiz Capitulino > --- > hw/pci.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- > 1 files changed, 73 insertions(+), 3 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index 8275ceb..d5e4866 100644 > --- a/hw/pci.c > +++ b/hw/pci.c > @@ -1102,6 +1102,7 @@ void pci_for_each_device(PCIBus *bus, int bus_num, > > static void pci_device_print(Monitor *mon, QDict *device) > { > + int class; > QDict *qdict; > QListEntry *entry; > uint64_t addr, size; > @@ -1113,10 +1114,11 @@ static void pci_device_print(Monitor *mon, QDict *device) > monitor_printf(mon, " "); > > qdict = qdict_get_qdict(device, "class_info"); > + class = qdict_get_int(qdict, "class"); > if (qdict_haskey(qdict, "desc")) { > monitor_printf(mon, "%s", qdict_get_str(qdict, "desc")); > } else { > - monitor_printf(mon, "Class %04" PRId64, qdict_get_int(qdict, "class")); > + monitor_printf(mon, "Class %d", class); > } > > qdict = qdict_get_qdict(device, "id"); This change seems unrelated. Is it intentional? [...]