Re: [PATCH kvm-unit-tests v6 00/14] VT-d unit test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux