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

Re: [Xen-devel] [PATCH for 4.6 07/13] xen: Introduce a generic way to describe device



Julien Grall wrote on 2014-12-17:
> diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index
> 5f295f3..6ace79d 100644
> --- a/xen/include/xen/pci.h
> +++ b/xen/include/xen/pci.h
> @@ -13,6 +13,7 @@
>  #include <xen/irq.h> #include <xen/pci_regs.h> #include <xen/pfn.h>
>  +#include <xen/device.h> #include <asm/pci.h>
>  
>  /* @@ -75,8 +76,19 @@ struct pci_dev { #define PT_FAULT_THRESHOLD 10
>      } fault;
>      u64 vf_rlen[6];
> +
> +    struct device dev;
>  };
> +#define pci_to_dev(pcidev)  (&(pcidev)->dev)
> +
> +static inline struct pci_dev *dev_to_pci(struct device *dev) {
> +    ASSERT(dev->type == DEV_PCI);
> +
> +    return container_of(dev, struct pci_dev, dev); }
> +
>  #define for_each_pdev(domain, pdev) \
>      list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)

I'd suggest splitting the changes to common code to a separate patch and also 
CC the VT-d/AMD maintainers. Because I didn't find those definitions when 
reviewing the 8th patch and I need to search the whole patch set to find them.

Best regards,
Yang



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.