Re: Any side effect if turn off amd_iommu

2015-05-13 Thread Joerg Roedel
Hi AceLan Kao, On Wed, May 13, 2015 at 03:37:57PM +0800, AceLan Kao wrote: > The method I described is not making any guess, we need a table to > write down the correct ioapic value for those machines, we can add the > BIOS version check(DMI_BIOS_VERSION) if you think the behavior may > change wit

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-05-13 Thread Baoquan He
On 05/13/15 at 05:13pm, Li, ZhenHua wrote: > Hi Baoquan, > I am using a list here to store all the mapped addresses, and unmap > them out of iounmap. > > About the reason, please check the old mails. I cannot remember the > detailed reasons. Yeah, I understand that the list is used to collect al

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-05-13 Thread Li, ZhenHua
Hi Baoquan, I am using a list here to store all the mapped addresses, and unmap them out of iounmap. About the reason, please check the old mails. I cannot remember the detailed reasons. Thanks Zhenhua On 05/13/2015 05:00 PM, Baoquan He wrote: On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: A

Re: [PATCH v11 06/10] iommu/vt-d: datatypes and functions used for kdump

2015-05-13 Thread Baoquan He
On 05/13/15 at 04:58pm, Li, ZhenHua wrote: > Hi Dave, > > iommu->root_entry_old_virt is used to store the mapped old rta. > iommu->root_entry_old_phys is used to store the physical address > stored in registers. > So we must not free/unmap iommu->root_entry_old_phys . Oh, yes. I was mistaken on t

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-05-13 Thread Baoquan He
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Add some functions to copy the data from old kernel. > These functions are used to copy context tables and page tables. > > To avoid calling iounmap between spin_lock_irqsave and spin_unlock_irqrestore, > use a link here, store the pointers , and then

Re: [PATCH v11 06/10] iommu/vt-d: datatypes and functions used for kdump

2015-05-13 Thread Li, ZhenHua
Hi Dave, iommu->root_entry_old_virt is used to store the mapped old rta. iommu->root_entry_old_phys is used to store the physical address stored in registers. So we must not free/unmap iommu->root_entry_old_phys . Zhenhua On 05/13/2015 04:56 PM, Baoquan He wrote: + + iommu->root_entry_o

Re: [PATCH v11 06/10] iommu/vt-d: datatypes and functions used for kdump

2015-05-13 Thread Baoquan He
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Populate it with support functions to copy iommu translation tables from > from the panicked kernel into the kdump kernel in the event of a crash. > > Functions: > Use old root entry table, and load the old data to root_entry as cache. > Malloc

Re: [PATCH v11 05/10] iommu/vt-d: Add functions to load and save old re

2015-05-13 Thread Dave Young
On 05/13/15 at 09:47am, Li, ZhenHua wrote: > On 05/12/2015 04:37 PM, Dave Young wrote: > >Seems the subject was truncated? Maybe "re" means root entry? Then please > >fix it > > > >On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > >>Add functions to load root entry table from old kernel, and to save u

Re: [PATCH v11 02/10] iommu/vt-d: Items required for kdump

2015-05-13 Thread Dave Young
On 05/13/15 at 09:45am, Li, ZhenHua wrote: > On 05/12/2015 04:17 PM, Dave Young wrote: > >On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > >>Add context entry functions needed for kdump. > >>+/* > >>+ * Fix Crashdump failure caused by leftover DMA through a hardware IOMMU > >>+ * > >>+ * Fixes the cra

Re: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices

2015-05-13 Thread leizhen
On 2015/5/13 0:55, Will Deacon wrote: > Hi Leizhen, > > Thanks for the review! > > On Tue, May 12, 2015 at 08:40:06AM +0100, leizhen wrote: >> >>> + >>> +static int queue_poll_cons(struct arm_smmu_queue *q, u32 until, bool wfe) >>> +{ >>> + ktime_t timeout = ktime_add_us(ktime_get(), ARM_SMMU

Re: Any side effect if turn off amd_iommu

2015-05-13 Thread AceLan Kao
Hi Joerg, The method I described is not making any guess, we need a table to write down the correct ioapic value for those machines, we can add the BIOS version check(DMI_BIOS_VERSION) if you think the behavior may change with different version of BIOSes. If you still feel uncomfortable, I'm okay