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

2014-12-18 Thread Julien Grall
On 18/12/2014 16:02, Jan Beulich wrote: On 18.12.14 at 16:56, wrote: On 17/12/2014 17:17, Jan Beulich wrote: Aliasing device and pci_dev for x86 would yield similar clarity afaict. To be sure, by aliasing you mean creating a typedef? For x86: typedef struct pci_dev device_t; And for ARM: t

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

2014-12-18 Thread Jan Beulich
>>> On 18.12.14 at 16:56, wrote: > On 17/12/2014 17:17, Jan Beulich wrote: >> Aliasing device and pci_dev for x86 would yield similar clarity afaict. > > To be sure, by aliasing you mean creating a typedef? > > For x86: > typedef struct pci_dev device_t; > > And for ARM: > typedef struct device

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

2014-12-18 Thread Julien Grall
Hi Jan, On 17/12/2014 17:17, Jan Beulich wrote: Julien Grall 12/17/14 2:04 PM >>> On 17/12/14 10:46, Jan Beulich wrote: On 17.12.14 at 11:30, wrote: Having a generic way to describe device will really help ARM code (see IOMMU). If we don't have a such thing, we may need to duplicate quite

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

2014-12-18 Thread Julien Grall
Hello Zhang, Please respect the netiquette and avoid lines over 80 characters. On 18/12/2014 01:12, Zhang, Yang Z wrote: I'd suggest splitting the changes to common code to a separate patch and also CC the VT-d/AMD maintainers. This patch is already common code. Though, there was some chang

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

2014-12-17 Thread Zhang, Yang Z
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 #include #include > +#include #include > > /* @@ -75,8 +76,19 @@ struct

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

2014-12-17 Thread Jan Beulich
>>> Julien Grall 12/17/14 2:04 PM >>> >On 17/12/14 10:46, Jan Beulich wrote: > On 17.12.14 at 11:30, wrote: >>> Having a generic way to describe device will really help ARM code (see >>> IOMMU). >>> >>> If we don't have a such thing, we may need to duplicate quite a lots of >>> code. Which

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

2014-12-17 Thread Julien Grall
Hi Jan, On 17/12/14 10:46, Jan Beulich wrote: On 17.12.14 at 11:30, wrote: >> On 17/12/2014 10:16, Jan Beulich wrote: >> On 16.12.14 at 21:08, wrote: --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -2,6 +2,7 @@ obj-y += bitmap.o obj-y += core_parking.o

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

2014-12-17 Thread Jan Beulich
>>> On 17.12.14 at 11:30, wrote: > On 17/12/2014 10:16, Jan Beulich wrote: > On 16.12.14 at 21:08, wrote: >>> --- a/xen/common/Makefile >>> +++ b/xen/common/Makefile >>> @@ -2,6 +2,7 @@ obj-y += bitmap.o >>> obj-y += core_parking.o >>> obj-y += cpu.o >>> obj-y += cpupool.o >>> +obj-y +=

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

2014-12-17 Thread Julien Grall
Hi Jan, On 17/12/2014 10:16, Jan Beulich wrote: On 16.12.14 at 21:08, wrote: --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -2,6 +2,7 @@ obj-y += bitmap.o obj-y += core_parking.o obj-y += cpu.o obj-y += cpupool.o +obj-y += device.o Shouldn't this instead be two lines, one using

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

2014-12-17 Thread Jan Beulich
>>> On 16.12.14 at 21:08, wrote: > --- a/xen/common/Makefile > +++ b/xen/common/Makefile > @@ -2,6 +2,7 @@ obj-y += bitmap.o > obj-y += core_parking.o > obj-y += cpu.o > obj-y += cpupool.o > +obj-y += device.o Shouldn't this instead be two lines, one using HAS_PCI and the second HAS_DEVICE_TRE

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

2014-12-16 Thread Julien Grall
Currently, Xen is supporting PCI and Platform device (based on Device Tree). While we don't support both at the same time: platform device for ARM and PCI for x86, ARM will gain support on PCI soon. Some drivers, such as IOMMU drivers, may handle PCI and platform device in the same way. Only few