Re: intel-iommu: iova_to_phys: fill in bits from iova when large pte

2013-11-04 Thread Marcelo Tosatti
On Mon, Nov 04, 2013 at 10:07:54AM -0700, Greg Edwards wrote: > On Fri, Nov 01, 2013 at 06:45:12PM -0700, Marcelo Tosatti wrote: > > > > intel_iommu_iova_to_phys returns incorrect physical address > > when iova is translated by large pte. > > > > Fill in bits from iova when creating the physical ad

Re: [PATCH v2] KVM: IOMMU: hva align mapping page size

2013-11-04 Thread Marcelo Tosatti
On Mon, Nov 04, 2013 at 09:08:12AM -0700, Greg Edwards wrote: > When determining the page size we could use to map with the IOMMU, the > page size should also be aligned with the hva, not just the gfn. The > gfn may not reflect the real alignment within the hugetlbfs file. > > Signed-off-by: Greg

Re: intel-iommu: iova_to_phys: fill in bits from iova when large pte

2013-11-04 Thread Greg Edwards
On Fri, Nov 01, 2013 at 06:45:12PM -0700, Marcelo Tosatti wrote: > > intel_iommu_iova_to_phys returns incorrect physical address > when iova is translated by large pte. > > Fill in bits from iova when creating the physical address. Marcelo, for what it's worth, this patch alone didn't fix the BUG

[PATCH v2] KVM: IOMMU: hva align mapping page size

2013-11-04 Thread Greg Edwards
When determining the page size we could use to map with the IOMMU, the page size should also be aligned with the hva, not just the gfn. The gfn may not reflect the real alignment within the hugetlbfs file. Signed-off-by: Greg Edwards Cc: sta...@vger.kernel.org --- virt/kvm/iommu.c | 4 1 f