From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [PATCH kvm-unit-tests v6 00/14] VT-d unit test Date: Mon, 28 Nov 2016 18:05:01 +0800 Message-ID: <20161128100501.GC17703@pxdev.xzpeter.org> References: <1479898654-7707-1-git-send-email-peterx@redhat.com> <20161128095339.GA9325@dhcp-27-118.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: kvm@vger.kernel.org, drjones@redhat.com, jan.kiszka@web.de, rkrcmar@redhat.com, pbonzini@redhat.com To: Alexander Gordeev Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49750 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932558AbcK1KFG (ORCPT ); Mon, 28 Nov 2016 05:05:06 -0500 Content-Disposition: inline In-Reply-To: <20161128095339.GA9325@dhcp-27-118.brq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Nov 28, 2016 at 10:53:39AM +0100, Alexander Gordeev wrote: > 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)) Hi, Alex, Thanks for helping verify this series against ARM. :-) (and sorry if I broke it :( ) However I may have missed the point here - could you please help paste the compile error message if without the above patch? I see that the patch changed interface for pci_alloc_resource(), but why the old one cannot work? -- peterx