From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXKQH-0007oq-7I for qemu-devel@nongnu.org; Tue, 19 Jan 2010 15:11:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXKQC-0007jC-I9 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 15:11:32 -0500 Received: from [199.232.76.173] (port=44223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXKQC-0007j4-Ep for qemu-devel@nongnu.org; Tue, 19 Jan 2010 15:11:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52272) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXKQC-0005ph-0E for qemu-devel@nongnu.org; Tue, 19 Jan 2010 15:11:28 -0500 Date: Tue, 19 Jan 2010 18:11:15 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 4/5] PCI: do_pci_info(): PCI bridge support Message-ID: <20100119181115.0c55d329@doriath> In-Reply-To: References: <1262976136-31852-1-git-send-email-lcapitulino@redhat.com> <1262976136-31852-5-git-send-email-lcapitulino@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, mst@redhat.com On Mon, 18 Jan 2010 18:14:32 +0100 Markus Armbruster wrote: > 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? I guess it's not, I'll revert and re-submit.