Hi,
Patch is great and works on my HP-z420.
There are several small concerns, please see inline comments.
On 08/21/13 at 04:15pm, Takao Indoh wrote:
This patch quiesces devices before disabling IOMMU on boot to stop
ongoing DMA. In intel_iommu_init(), check context entries and if there
is
I have reviewed and tested this patchset. Without it the DMAR error
always occured as below. With this patchset, no error is reported and
kdump can work successfully.
This patchset is awesome, it get to the root of the problem when enable
intel-iommu in kdump and fix it. And from code no harm
On 12/19/13 at 07:49pm, Bill Sumner wrote:
+static int copy_page_addr(u64 page_addr, u32 shift, u32 bus, u32 devfn,
+ u64 pte, struct dmar_domain *domain,
+ void *parms)
+{
+ struct copy_page_addr_parms *ppap = parms;
+
+ u64
On 12/20/13 at 02:04pm, Baoquan He wrote:
On 12/19/13 at 07:49pm, Bill Sumner wrote:
+static int copy_page_addr(u64 page_addr, u32 shift, u32 bus, u32 devfn,
+ u64 pte, struct dmar_domain *domain,
+ void *parms)
+{
+ struct
added to Copy-Translations patch to initialize the iovad
struct as recommended by Baoquan He [b...@redhat.com]
init_iova_domain(domain-iovad, DMA_32BIT_PFN);
v1-v2:
The following series implements a fix for:
A kdump problem about DMA that has been discussed for a long time
, 2014-04-09 at 15:49 -0700, Davidlohr Bueso wrote:
On Wed, 2014-04-09 at 10:39 +0800, Baoquan He wrote:
Hi,
The kernel is 3.14.0+ which is pulled just now.
Cc'ing more people.
While the hpsa driver appears to be involved in some way, I'm sure if
this is a related issue
This patch works for me.
Tested-by: Baoquan He b...@redhat.com
Thanks
Baoquan
On 04/10/14 at 05:17pm, scame...@beardog.cce.hp.com wrote:
Without this, you'll see a null pointer dereference in
hpsa_enter_performant_mode().
Signed-off-by: Stephen M. Cameron scame...@beardog.cce.hp.com
-04-09 at 10:39 +0800, Baoquan He wrote:
Hi,
The kernel is 3.14.0+ which is pulled just now.
Cc'ing more people.
While the hpsa driver appears to be involved in some way, I'm sure if
this is a related issue, but as of today's pull I'm getting another
problem that causes my DL980
Hi Bill,
Could you rebase on latest linus's kernel tree, since there are several
changes in intel-iommu.c. This patch can't be applied because of below
commits. I think patch need be reabsed on latest linus's tree before
post, people will apply your patch without conflict.
commit
On 10/22/14 at 10:22am, Li, Zhen-Hua wrote:
Hi Baoquan,
I tested it on 3.17, it does not have these faults. There are little
differences between this version and Bill's last version.
I will test it on 3.18.0-rc1+ on my system and let you know the result.
And could you send me the
On 10/27/14 at 03:29pm, Li, ZhenHua wrote:
Hi Baoquan,
I failed in testing this patchset for 3.18.0-rc1, this upstream
3.18.0-rc1 kernel cannot boot on my system, have not found out the
reason.
Could you please test this patchset on 3.17.0 to see whether it has
these faults?
Thanks
On 11/13/14 at 05:06pm, Li, ZhenHua wrote:
Minfei,
Thanks for your testing.
On my system, I got error messages:
[8.019096] usb usb2: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[8.019617] dmar: DRHD: handling fault status reg 102
[8.019621] dmar: DMAR:[DMA Read]
Hi Joerg, ZhenHua,
This issue happens on AMD iommu too, do you have any plans or
thoughts on that?
Thanks
Baoquan
On 11/17/14 at 02:38pm, Joerg Roedel wrote:
On Fri, Nov 14, 2014 at 02:27:44PM +0800, Li, ZhenHua wrote:
I am working following your directions:
1. If the VT-d driver
On 12/12/14 at 05:11pm, Joerg Roedel wrote:
On Fri, Dec 12, 2014 at 10:25:31AM +0800, Li, ZhenHua wrote:
Sorry I have no plan yet.
Could you send me your logs on your AMD system?
On 12/10/2014 04:46 PM, Baoquan He wrote:
This issue happens on AMD iommu too, do you have any plans
On 12/12/14 at 10:25am, Li, ZhenHua wrote:
Sorry I have no plan yet.
Could you send me your logs on your AMD system?
Sure, please check the attachment. AMD iommu seems a little different on
action. On the machine I reserved for testing, it always hang the system
bootup. As Joerg said, we can
, yes. So please ignore this comment.
See my comments.
On 01/15/2015 11:28 AM, Baoquan He wrote:
On 01/12/15 at 03:06pm, Li, Zhen-Hua wrote:
+/*
+ * Interface to the copy translation tables set of functions
+ * from mainline code.
+ */
+static int intel_iommu_load_translation_tables(struct
Hi Zhenhua,
I just tested your patchset based on 3.19.0-rc2+, and found several dmar
fault and intr-remap fault, it seems not the same as Takao's, please
check the attachment.
Thanks
Baoquan
[root@dhcp-16-105 ~]# kdumpctl restart
kexec: failed to unloaded kdump kernel
Stopping kdump: [FAILED]
.
2. Updated the comments about changes in each version.
3. Fixed: one-line added to Copy-Translations patch to initialize the
iovad
struct as recommended by Baoquan He [b...@redhat.com]
init_iova_domain(domain-iovad, DMA_32BIT_PFN);
Changelog[v2
On 01/07/15 at 12:11pm, Li, ZhenHua wrote:
Many thanks to Takao Indoh and Baoquan He, for your testing on more
different systems.
The calling of flush functions are added to this version.
The usage of __iommu_flush_cache function :
1. Fixes a dump on Takao's system.
2. Reduces the count
!
Thanks
Baoquan
Regards
Zhenhua
On 01/07/2015 01:02 PM, Baoquan He wrote:
On 01/07/15 at 12:11pm, Li, ZhenHua wrote:
Many thanks to Takao Indoh and Baoquan He, for your testing on more
different systems.
The calling of flush functions are added to this version.
The usage
On 01/12/15 at 10:29am, Vivek Goyal wrote:
On Mon, Jan 12, 2015 at 04:22:08PM +0100, Joerg Roedel wrote:
It looks like you are still copying the io-page-tables from the old
kernel into the kdump kernel, is that right? With the approach that was
proposed you only need to copy over the
On 04/15/15 at 02:48pm, Dave Young wrote:
On 04/15/15 at 01:47pm, Li, ZhenHua wrote:
On 04/15/2015 08:57 AM, Dave Young wrote:
Again, I think it is bad to use old page table, below issues need consider:
1) make sure old page table are reliable across crash
2) do not allow writing oldmem
On 04/24/15 at 04:25pm, Dave Young wrote:
Hi, Baoquan
I support this patchset.
We should not fear oldmem since reserved crashkernel region is similar.
No one can guarantee that any crazy code won't step into crashkernel
region just because 1st kernel says it's reversed for kdump
Bad news, I rebuilt a kernel with your patchset on 4.0.0+ (this commit
f614c81). Now dmar fault is seen again.
The lspci log and kdump log are attached, please check:
[ ~]$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.0.0+ root=/dev/mapper/fedora_dhcp--128--28-root ro
On 04/24/15 at 04:49pm, Dave Young wrote:
On 04/24/15 at 04:35pm, Baoquan He wrote:
On 04/24/15 at 04:25pm, Dave Young wrote:
Hi, Baoquan
I support this patchset.
We should not fear oldmem since reserved crashkernel region is similar.
No one can guarantee that any crazy
On 04/29/15 at 07:20pm, Baoquan He wrote:
Bad news, I rebuilt a kernel with your patchset on 4.0.0+ (this commit
f614c81). Now dmar fault is seen again.
The lspci log and kdump log are attached, please check:
I found the lspci log previously attached is emtyp, resend it again.
00:00.0
On 05/04/15 at 11:06am, Li, ZhenHua wrote:
Hi baoquan,
Could you paste the kernel log of the first kernel ?
Please check the attachment.
[0.00] microcode: CPU0 microcode updated early to revision 0x710, date
= 2013-06-17
[0.00] Initializing cgroup subsys cpuset
[0.00]
On 04/10/15 at 04:42pm, 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 use
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote:
This patchset is an update of Bill Sumner's patchset, implements a fix for:
If a kernel boots with intel_iommu=on on a system that supports intel vt-d,
when a panic happens, the kdump kernel will boot with these faults:
Test passed on my local
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 all
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 new
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 use
on this. Thanks for telling.
Zhenhua
On 05/13/2015 04:56 PM, Baoquan He wrote:
+
+ iommu-root_entry_old_phys = q VTD_PAGE_MASK;
+ if (!iommu-root_entry_old_phys) {
+ pr_err(Could not read old root entry address.);
+ return -1;
+ }
+
I didn't find where you call iounmap
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote:
Modify the operation of the following functions when called during crash dump:
iommu_context_addr
free_context_table
get_domain_for_dev
init_dmars
intel_iommu_init
Bill Sumner:
Original version.
Zhenhua:
The name
On 05/13/15 at 10:28am, Li, ZhenHua wrote:
+static u8 g_translation_pre_enabled;
Hi Zhenhua,
I haven't checked patch one by one, am going through the code flow.
About g_translation_pre_enabled, I don't think it's necessary to define
it as a global variable. Both its assignment and
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote:
When a device driver issues the first dma_map command for a device, we
assign a new and empty page-table, thus removing all mappings from the
old kernel for the device.
Hi Zhenhua,
From your patch I got it will remove all mappings, assign a new
, and this is what this patch does.
OK, just a new page table allocated in init_domain(), right? I thought a
specific empty page-table is allocated for these new domains in kdump
kernel.
Thanks
Zhenhua
On 05/21/2015 07:52 AM, Baoquan He wrote:
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote:
When
.
Thanks
Zhenhua
On 05/21/2015 02:54 PM, Baoquan He wrote:
On 05/21/15 at 09:27am, Li, ZhenHua wrote:
Hi Baoquan,
In the early version of this patchset, old page tables are used by new
kernel. But as discussed, we need to make kernel use new pages when
there is a new dma request , so we
Adjust the return value of parse_ioapics_under_ir as negative value representing
failure and "0" representing succcess. Just make it consistent with other
function implementation, and we can judge if calling is successfull by
if (!parse_ioapics_under_ir()) style.
Signed-off-by: Bao
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 39 +++
drivers/iommu/amd_iommu_types.h | 1 +
2 files changed, 40 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 1
Add functions to check whether translation is already enabled in IOMMU.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 26 ++
drivers/iommu/amd_iommu_proto.h | 4
2 files changed, 30 insertions(+)
diff --git a/drivers
The kdump kernel boog log is attached here.
On 11/06/15 at 08:10pm, Baoquan He wrote:
> This is v2 draft patch set. It mainly functions as the following steps:
>
> 1. Checking if it's in kdump kernel and previously enabled
> 2. If yes do below operatons:
> a. Do not disable a
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 36
drivers/iommu/amd_iommu_types.h | 2 ++
2 files changed, 38 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index e
ttached kdump kernel boot log with this
patchset applied.
Baoquan He (9):
iommu/amd: Use standard bitmap operation to set bitmap
iommu/amd: Detect pre enabled translation
iommu/amd: make several functions global
iommu/amd: add copy_irq_table function
iommu/amd: Add function copy_dev_t
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 19 +--
drivers/iommu/amd_iommu_init.c | 71 --
2 files changed, 49 insertions(+), 41 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_i
It will be more readable then the old setting.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
drivers/iommu/amd_iommu_init.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_i
Here old irq tables are ioremapped and not iounmapped for now. Maybe it
can be adjusted later to use a better way.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 30 ++
drivers/iommu/amd_iommu_types.h | 1 +
2 files chang
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 90c6205..0ac6799 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_i
They will be called later when copy old dev/irq tables. It's better to use them
then call iommu_flush_all_caches() since iommu_flush_all_caches() will
iterate many empty table entries.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 4 ++--
drivers
Now any change of domain can be updated to dev tables and io page table
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index d978f80..7
On 09/29/15 at 06:08pm, Joerg Roedel wrote:
> On Thu, Sep 24, 2015 at 02:37:33PM +0800, Baoquan He wrote:
> > +if ( !translation_pre_enabled() ) {
> > + iommu_disable(iommu);
> > + i
Hi Joerg,
On 09/29/15 at 06:04pm, Joerg Roedel wrote:
> On Thu, Sep 24, 2015 at 02:37:32PM +0800, Baoquan He wrote:
> > Copy command buffer and event buffer from the old to kdump kernel.
> >
> > Still there are 2 problems:
> > 1) Not very sure if this is necess
On 09/29/15 at 06:09pm, Joerg Roedel wrote:
> On Thu, Sep 24, 2015 at 02:37:35PM +0800, Baoquan He wrote:
> > @@ -2469,6 +2469,8 @@ static dma_addr_t __map_single(struct device *dev,
> > unsigned long align_mask = 0;
> > int i;
> >
> >
On 09/29/15 at 06:11pm, Joerg Roedel wrote:
> On Thu, Sep 24, 2015 at 02:37:36PM +0800, Baoquan He wrote:
> Is it necessary to copy the old ir tables? On AMD these tables are
> per-device, so it is probably the best to handle them like the io
> page-tables and just update
On 09/15/15 at 08:06pm, Baoquan He wrote:
> Hi Joerg,
>
> Recently I am free and can try to work out the amd-iommu support for
> kdump kernel. Now I have some plans and draft them into codes and debugging.
> And also there are prlblems. I brief them here, could you please have a
0x80
[ 12.541238] [] kernel_init+0xe/0xe0
[ 12.546361] [] ret_from_fork+0x3f/0x70
[ 12.551745] [] ? rest_init+0x80/0x80
[ 12.556957] Rebooting in 10 seconds..
>From 09943d6354ee1626426f6ff060d92173bb164279 Mon Sep 17 00:00:00 2001
From: Baoquan He <b...@redhat.com>
Date: Thu, 25 Jun
Adjust the return value of parse_ioapics_under_ir as "-1" representing
failure and "0" representing succcess. Just make it consistent with other
function implementation, and we can judge if calling is successfull by
if (!parse_ioapics_under_ir()) style.
Signed-off-by: Baoquan
On 09/29/15 at 03:50pm, Joerg Roedel wrote:
> On Tue, Sep 29, 2015 at 03:26:08PM +0800, Baoquan He wrote:
> > No need to continue the loop after it has been found.
> >
> > Signed-off-by: Baoquan He <b...@redhat.com>
> > ---
> > drivers/iommu/intel_irq_rema
Add functions to check whether translation is already enabled in IOMMU.
Maybe it need be checked per IOMMU. Currently for debugging I didn't do
like that.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 26 ++
drivers
The old functon find_last_devid_on_pci not only gets the last devid, but calls
update_last_devid(). Now adjust the function definition to make it be consistent
with its name. Meanwhile add a new function find_first_devid_on_pci for later
use.
Signed-off-by: Baoquan He <b...@redhat.
update_domain() is the only place where domain->pt_root will be got and
set into dev entry. So before the device driver initialization we do
nothing if it's in previously enabled translation status.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
1 fil
In the first
Now any change of domain can be updated to dev tables and io page table
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index aee1ae4..1
Before old dev tables coping do not touch dev tables if translation is
previously
enabled. And copy the dev tables/command buffer/event buffer from the old kernel
to newly allocated data structure.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 1e86f4c..f4f3e63 100644
--- a/drivers/iommu/amd_iommu.c
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 26 ++
drivers/iommu/amd_iommu_types.h | 2 ++
2 files changed, 28 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 1fc369e..913a718
iommu->first_device/last_device are needed by function init_iommu_from_acpi()
and init_iommu_devices(). So putting the assignment of them in iommu_init_pci()
could be late. In this patch put them earlier.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_in
and
tail register store an offset from the base address, which point to the next
command
to be read/written separately.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 37 +
drivers/iommu/amd_iommu_types.h | 1 +
2 f
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
drivers/iommu/amd_iommu_init.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f82060e7..0d59f79 100644
--- a/drivers
On 09/21/15 at 03:54pm, Joerg Roedel wrote:
> Hi Baoquan,
>
> On Tue, Sep 15, 2015 at 08:06:06PM +0800, Baoquan He wrote:
> > Recently I am free and can try to work out the amd-iommu support for
> > kdump kernel. Now I have some plans and draft them into codes and de
On 09/21/15 at 03:54pm, Joerg Roedel wrote:
> Hi Baoquan,
>
> On Tue, Sep 15, 2015 at 08:06:06PM +0800, Baoquan He wrote:
> > Recently I am free and can try to work out the amd-iommu support for
> > kdump kernel. Now I have some plans and draft them into codes and de
Hi Joerg,
On 11/27/15 at 12:35pm, Joerg Roedel wrote:
> > +++ b/drivers/iommu/amd_iommu.c
> > @@ -1992,14 +1992,15 @@ static void do_attach(struct iommu_dev_data
> > *dev_data,
> > /* Update data structures */
> > dev_data->domain = domain;
> > list_add(_data->list, >dev_list);
> > -
On 11/27/15 at 12:03pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:44PM +0800, Baoquan He wrote:
> > Add functions to check whether translation is already enabled in IOMMU.
> >
> > Signed-off-by: Baoquan He <b...@redhat.com>
> > ---
> >
On 11/27/15 at 12:13pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:46PM +0800, Baoquan He wrote:
> > +static void copy_irq_table(u16 devid)
> > +{
> > + struct irq_remap_table *table = NULL;
> > + u16 alias;
> > + u64 dte;
> > +
On 11/27/15 at 12:21pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:47PM +0800, Baoquan He wrote:
> > +static void copy_dev_tables(void)
> > +{
> > +u64 entry;
> > +u32 lo, hi;
> > +phys_addr_t old_devtb_phys;
> > +
On 11/27/15 at 12:24pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:48PM +0800, Baoquan He wrote:
> >
> > +static void copy_command_buffer(void)
> > +
> > +static void copy_event_buffer(void)
> > +{
>
> There is no need to copy any of these buf
On 11/27/15 at 12:35pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:49PM +0800, Baoquan He wrote:
> > Signed-off-by: Baoquan He <b...@redhat.com>
>
> Missing patch description.
>
> > ---
> > drivers/iommu/amd_iommu.c | 19 +--
>
Hi Joerg,
Thanks a lot for reviewing this patchset.
On 11/27/15 at 12:38pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:42PM +0800, Baoquan He wrote:
> > This is v2 draft patch set. It mainly functions as the following steps:
> >
> > 1. Checking if it's in kdump
On 11/27/15 at 12:06pm, Joerg Roedel wrote:
> On Fri, Nov 06, 2015 at 08:10:45PM +0800, Baoquan He wrote:
> > They will be called later when copy old dev/irq tables. It's better to use
> > them
> > then call iommu_flush_all_caches() since iommu_flush_all_caches() will
> &g
Hi Joerg,
Could you please help have a look and give some suggestions on this
issue?
Or any one else who is familiar with AMD IOMMU have any idea about
this?
Thanks
Baoquan
On 11/06/15 at 08:10pm, Baoquan He wrote:
> This is v2 draft patch set. It mainly functions as the following steps:
>
ned the implementation of vt-d fix done by Joerg and did the AMD
IOMMU change similiarly.
Baoquan HE (4):
iommu/amd: add early_enable_iommu() helper function
iommu/amd: copy old trans table from old kernel
iommu/amd: Do not initialize dev tables again in kdump
iommu/amd: Check the validation of
Change it as it's designed for and keep it consistent with other
places.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 5efadad..9
Add functions to check whether translation is already enabled in IOMMU.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 25 +
drivers/iommu/amd_iommu_types.h | 4
2 files changed, 29 insertions(+)
diff --git a/drivers
It will be more readable then the old setting.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
drivers/iommu/amd_iommu_init.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_i
From: Baoquan HE <b...@dhcp-129-10.nay.redhat.com>
If not valid just skip reserving the old domain id.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 4
drivers/iommu/amd_iommu_init.c | 5 +++--
drivers/iommu/amd_iommu_types.h | 5 +
3 f
From: Baoquan HE <b...@dhcp-129-10.nay.redhat.com>
This can make later kdump change easier.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/d
From: Baoquan HE <b...@dhcp-129-10.nay.redhat.com>
Here several things need be done:
1) Initialize amd_iommu_dev_table because it was set several times
since kdump kernel reboot. We don't need the set because we will
copy the content from old kernel.
2) Re-enable event/cmd buffer
3) I
be reserved in order to avoid touch
the old translation tables.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 2 +-
drivers/iommu/amd_iommu_init.c | 38 ++
drivers/iommu/amd_iommu_types.h | 1 +
3 files changed, 40 insertions
From: Baoquan HE <b...@dhcp-129-10.nay.redhat.com>
The init should have been done in normal kernel, skip it in kdump
kernel. And clean up the function comments.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu_init.c | 9 ++---
1 file changed, 6 inse
In amd-vi spec several bits of IO PTE fields and DTE fields are similar
so that both of them can share the same MACRO definition. However
defining their respecitve bit fields can make code more read-able. So
do it in this patch.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers
Hi Joerg,
Attachments are console log of normal kernel and kdump kernel on a test
machine at my hand, and the related information of lspci -vt and lspci
-vvv. Before I tried to defer the calling of set_dte_entry() until the
device driver try to call __map_single() to really allocate coherent
On 05/28/16 at 08:49pm, Wan Zongshun wrote:
>
>
> Original Message
> >@@ -1101,6 +1121,11 @@ static int __init init_iommu_one(struct amd_iommu
> >*iommu, struct ivhd_header *h)
> >
> > iommu->int_enabled = false;
> >
> >+init_translation_status(iommu);
> >+
> >+if
On 05/30/16 at 11:24am, Baoquan He wrote:
> On 05/28/16 at 08:49pm, Wan Zongshun wrote:
> In fact I am still debugging and trying to figure out what need be done
> further to stop the IO_PAGE_FAULT happened on ethernet network card. I
> kept changing code and adjust the patches. Up to
On 05/28/16 at 09:08pm, Wan Zongshun wrote:
> >+static int copy_dev_tables(void)
> >+{
> >+u64 entry;
> >+u32 lo, hi, devid;
> >+phys_addr_t old_devtb_phys;
> >+struct dev_table_entry *old_devtb;
> >+u16 dom_id, dte_v;
> >+struct amd_iommu *iommu;
> >+static int copied;
On 05/28/16 at 09:30pm, Wan Zongshun wrote:
>
>
> Original Message
> >From: Baoquan HE <b...@dhcp-129-10.nay.redhat.com>
> >diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> >index f3bd7fd..40c4a05 100644
> >--- a/dri
On 01/13/16 at 09:42am, Mark Hounschell wrote:
> First, attached are the 2 lspci outputs you asked for.
>
> After the patch I was still unable to bring the system up but it was
> much better. 2 of the 8 Sata disks do not come up. If I remove those
> from my fstab the box comes up with the patch.
CC more people who is interested
On 01/26/16 at 06:29pm, Baoquan He wrote:
> This is v3 post. Now the situation is patchset test on amd-vi v2 machine
> is OK, however still some IO_PAGE_FAULT warning is printed out on v1
> machine. The log will be attached later.
>
> I didn't
In amd-vi spec bit[60:58] are only used to store the bit[14:12] of GCR3.
No any other useage is found in several versions of amd-vi spec. So remove
them in this patch.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 6 +++---
drivers/iommu/amd_iommu_types
Don't update the domain information to the related DTE entry before
iommu dev initialization. For this a new member 'domain_updated' is
added to iommu_dev_data.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 14 +-
1 file changed, 9 insertions
In amd-vi spec the name of bit0 in DTE is V. But in code it's defined
as IOMMU_PTE_P. Here change it to IOMMU_PTE_V to make it be consistent
with spec.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 10 +-
drivers/iommu/amd_iommu_types.h | 6 +++
These macro definitions are also needed by irq table copy function
later, so move them to amd_iommu_types.h.
Signed-off-by: Baoquan He <b...@redhat.com>
---
drivers/iommu/amd_iommu.c | 4
drivers/iommu/amd_iommu_types.h | 5 +
2 files changed, 5 insertions(+), 4 deletions(-)
1 - 100 of 292 matches
Mail list logo