Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 02:53:13PM -0600, Bjorn Helgaas wrote: >On Wed, Feb 04, 2015 at 11:34:09AM +0800, Wei Yang wrote: >> On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >> >On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: >> >> The actual IOV BAR range is determined by t

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Bjorn Helgaas
On Wed, Feb 04, 2015 at 11:34:09AM +0800, Wei Yang wrote: > On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: > >On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: > >> The actual IOV BAR range is determined by the start address and the actual > >> size for vf_num VFs BAR. After

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Wei Yang
On Wed, Feb 04, 2015 at 08:19:14AM -0600, Bjorn Helgaas wrote: >On Tue, Feb 3, 2015 at 9:34 PM, Wei Yang wrote: >> On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >>>On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: > +vf_num = pdn->vf_pes; >>> >>>I can't actually b

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-04 Thread Bjorn Helgaas
On Tue, Feb 3, 2015 at 9:34 PM, Wei Yang wrote: > On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >>On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: >>> +vf_num = pdn->vf_pes; >> >>I can't actually build this, but I don't think pdn->vf_pes is defined yet. >> > > The pd

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-03 Thread Wei Yang
On Tue, Feb 03, 2015 at 06:19:26PM -0600, Bjorn Helgaas wrote: >On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: >> The actual IOV BAR range is determined by the start address and the actual >> size for vf_num VFs BAR. After shifting the IOV BAR, there would be a >> chance the actual end a

Re: [PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-03 Thread Bjorn Helgaas
On Tue, Feb 03, 2015 at 03:01:43PM +0800, Wei Yang wrote: > The actual IOV BAR range is determined by the start address and the actual > size for vf_num VFs BAR. After shifting the IOV BAR, there would be a > chance the actual end address exceed the limit and overlap with other > devices. > > This

[PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-02 Thread Wei Yang
The actual IOV BAR range is determined by the start address and the actual size for vf_num VFs BAR. After shifting the IOV BAR, there would be a chance the actual end address exceed the limit and overlap with other devices. This patch adds a check to make sure after shifting, the range will not ov