From: Alexander Gordeev Subject: Re: [PATCH kvm-unit-tests v6 00/14] VT-d unit test Date: Mon, 28 Nov 2016 10:53:39 +0100 Message-ID: <20161128095339.GA9325@dhcp-27-118.brq.redhat.com> References: <1479898654-7707-1-git-send-email-peterx@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, drjones@redhat.com, jan.kiszka@web.de, rkrcmar@redhat.com, pbonzini@redhat.com To: Peter Xu Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51092 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932127AbcK1Jyh (ORCPT ); Mon, 28 Nov 2016 04:54:37 -0500 Content-Disposition: inline In-Reply-To: <1479898654-7707-1-git-send-email-peterx@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 23, 2016 at 06:57:20PM +0800, Peter Xu wrote: > Please review. Thanks, Had to make the changes below to make it compile for aarch64/arm (Did not check the validity though) diff --git a/lib/pci-host-generic.c b/lib/pci-host-generic.c index 8bad8b12a466..958ef70a5922 100644 --- a/lib/pci-host-generic.c +++ b/lib/pci-host-generic.c @@ -165,7 +165,7 @@ static struct pci_host_bridge *pci_dt_probe(void) return host; } -static bool pci_alloc_resource(pcidevaddr_t dev, int bar_num, u64 *addr) +static bool pci_alloc_resource(struct pci_dev *dev, int bar_num, u64 *addr) { struct pci_host_bridge *host = pci_host_bridge; struct pci_addr_space *as = &host->addr_space[0]; @@ -192,7 +192,7 @@ static bool pci_alloc_resource(pcidevaddr_t dev, int bar_num, u64 *addr) if (i >= host->nr_addr_spaces) { printf("%s: warning: can't satisfy request for ", __func__); - pci_dev_print_id(dev); + pci_dev_print_id(dev->bdf); printf(" "); pci_bar_print(dev, bar_num); printf("\n"); @@ -238,7 +238,7 @@ bool pci_probe(void) for (i = 0; i < 6; i++) { u64 addr; - if (pci_alloc_resource(dev, i, &addr)) { + if (pci_alloc_resource(&pci_dev, i, &addr)) { pci_bar_set_addr(&pci_dev, i, addr); if (pci_bar_is_memory(&pci_dev, i))