Re: possible dmar_init_reserved_ranges() error

2017-01-04 Thread Joerg Roedel
On Tue, Dec 27, 2016 at 07:21:39PM -0800, Raj, Ashok wrote: > This sounds reasonable, if we can reserve from the host bridge apertures > it should take care of hot-plug cases as well, and should simply how the > reservation is made. Agreed, I have this on my todo list already since I converted th

Re: possible dmar_init_reserved_ranges() error

2016-12-27 Thread Raj, Ashok
Hi Bjorn, On Tue, Dec 27, 2016 at 05:44:17PM -0600, Bjorn Helgaas wrote: > > dmar_init_reserved_ranges() > { > ... > for_each_pci_dev(pdev) { > for (i = 0; i < PCI_NUM_RESOURCES; i++) { > r = &pdev->resource[i]; > reserve_iova(r) > > But I assume it's possible t

Re: possible dmar_init_reserved_ranges() error

2016-12-27 Thread Bjorn Helgaas
On Mon, Dec 19, 2016 at 03:20:44PM -0600, Bjorn Helgaas wrote: > Hi guys, > > I have some questions about dmar_init_reserved_ranges(). On systems > where CPU physical address space is not identity-mapped to PCI bus > address space, e.g., where the PCI host bridge windows have _TRA > offsets, I'm

Re: possible dmar_init_reserved_ranges() error

2016-12-23 Thread Joerg Roedel
On Thu, Dec 22, 2016 at 06:48:01PM -0600, Bjorn Helgaas wrote: > If we didn't want to use pcibios_resource_to_bus() here for some > reason, we should at least add a comment about why we think it's OK to > use a CPU physical address as an IOVA. Even if there are no such x86 systems out there, I thi

Re: possible dmar_init_reserved_ranges() error

2016-12-22 Thread Bjorn Helgaas
Hi Ashok, On Thu, Dec 22, 2016 at 03:45:08PM -0800, Raj, Ashok wrote: > Hi Bjorn > > None in the platform group say they know about this. So i'm fairly sure > we don't do that on Intel hardware (x86). I'm pretty sure there was once an x86 prototype for which PCI bus addresses were not identical

Re: possible dmar_init_reserved_ranges() error

2016-12-22 Thread Raj, Ashok
Hi Bjorn None in the platform group say they know about this. So i'm fairly sure we don't do that on Intel hardware (x86). I'm not sure about the usage, it appears maybe it was a hack pre-virtualization for some direct access? (just wild guessing) On Thu, Dec 22, 2016 at 03:32:38PM -0800, Raj

Re: possible dmar_init_reserved_ranges() error

2016-12-22 Thread Raj, Ashok
Hi Bjorn On Thu, Dec 22, 2016 at 02:28:03PM -0600, Bjorn Helgaas wrote: > On Thu, Dec 22, 2016 at 05:27:14PM +0100, Joerg Roedel wrote: > > Hi Bjorn, > > > > On Mon, Dec 19, 2016 at 03:20:44PM -0600, Bjorn Helgaas wrote: > > > I have some questions about dmar_init_reserved_ranges(). On systems >

Re: possible dmar_init_reserved_ranges() error

2016-12-22 Thread Bjorn Helgaas
On Thu, Dec 22, 2016 at 05:27:14PM +0100, Joerg Roedel wrote: > Hi Bjorn, > > On Mon, Dec 19, 2016 at 03:20:44PM -0600, Bjorn Helgaas wrote: > > I have some questions about dmar_init_reserved_ranges(). On systems > > where CPU physical address space is not identity-mapped to PCI bus > > address s

Re: possible dmar_init_reserved_ranges() error

2016-12-22 Thread Joerg Roedel
Hi Bjorn, On Mon, Dec 19, 2016 at 03:20:44PM -0600, Bjorn Helgaas wrote: > I have some questions about dmar_init_reserved_ranges(). On systems > where CPU physical address space is not identity-mapped to PCI bus > address space, e.g., where the PCI host bridge windows have _TRA > offsets, I'm not

possible dmar_init_reserved_ranges() error

2016-12-19 Thread Bjorn Helgaas
Hi guys, I have some questions about dmar_init_reserved_ranges(). On systems where CPU physical address space is not identity-mapped to PCI bus address space, e.g., where the PCI host bridge windows have _TRA offsets, I'm not sure we're doing the right thing. Assume we have a PCI host bridge wit