Re: [PATCH 1/1] x86/iommu: use bit structures for context_entry

2013-05-23 Thread ZhenHua
Use lo and hi for clear, may run faster than memset. But it is not a big problem. Never mind. Thanks ZhenHua On 05/24/2013 08:36 AM, Joe Perches wrote: On Fri, 2013-05-24 at 08:22 +0800, Li, Zhen-Hua wrote: There is a structure named context_entry used by intel iommu, and there are some bit

Re: [PATCH 1/1] x86/iommu: use bit structures for context_entry

2013-05-23 Thread Joe Perches
On Fri, 2013-05-24 at 08:22 +0800, Li, Zhen-Hua wrote: > There is a structure named context_entry used by intel iommu, and there > are some bit operations on it. Use bit structure may make these operations > easy. [] > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c [] > @@ -

[PATCH 1/1] x86/iommu: fix dma pte address size error

2013-05-23 Thread Li, Zhen-Hua
In Intel Vt-D specs, Chapter 9.3 Page-Table Entry, The size of ADDR(address) field is 12:51, but the function dma_pte_addr treats it as 12:63. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c |4 ++-- include/linux/dma_remapping.h |2 ++ 2 files changed, 4 insertions(+), 2

[PATCH 1/1] x86/iommu: use bit structures for context_entry

2013-05-23 Thread Li, Zhen-Hua
There is a structure named context_entry used by intel iommu, and there are some bit operations on it. Use bit structure may make these operations easy. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 88 +++ 1 file changed, 31 insertions(+

Re: [PATCH 1/3] pci: Add PCI walk function and PCIe bridge test

2013-05-23 Thread Bjorn Helgaas
On Fri, May 10, 2013 at 3:18 PM, Alex Williamson wrote: > These will replace pci_find_upstream_pcie_bridge, which is difficult > to use and rather specific to intel-iommu usage. A quirked > pci_is_pcie_bridge function is provided to work around non-compliant > PCIe-to-PCI bridges such as those fo

[PATCH 1/1] x86/iommu: fix dma pte address size error

2013-05-23 Thread Li, Zhen-Hua
In Intel Vt-D specs, Chapter 9.3 Page-Table Entry, The size of ADDR(address) field is 12:51, but the function dma_pte_addr treats it as 12:63. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c |2 +- include/linux/dma_remapping.h |2 ++ 2 files changed, 3 insertions(+), 1 de