mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
AMD/IOMMU: Fix crash in 'V' debugkey
c/s bb038f3116 "AMD/IOMMU: replace INTREMAP_ENTRIES" introduces a call to
intremap_table_entries() in dump_intremap_table() before tbl.ptr is checked
for NULL.
intremap_table_entries() internally uses virt_to_page() which falls over
ASSERT(va >= XEN_VIRT_START);
in __virt_to_page().
Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
c67c43ce4a
commit
85e1424de2
1 file changed
+3
-1
@@ -847,11 +847,13 @@ static void dump_intremap_table(const struct amd_iommu *iommu,
|
||||
union irte_cptr tbl,
|
||||
const struct ivrs_mappings *ivrs_mapping)
|
||||
{
|
||||
unsigned int count, nr = intremap_table_entries(tbl.ptr, iommu);
|
||||
unsigned int count, nr;
|
||||
|
||||
if ( !tbl.ptr )
|
||||
return;
|
||||
|
||||
nr = intremap_table_entries(tbl.ptr, iommu);
|
||||
|
||||
for ( count = 0; count < nr; count++ )
|
||||
{
|
||||
if ( iommu->ctrl.ga_en
|
||||
|
||||