* [PATCH v2 2/2] x86/dmar: zap DMAR signature for dom0 once in TBOOT case
@ 2018-08-20 10:43 Zhenzhong Duan
0 siblings, 0 replies; only message in thread
From: Zhenzhong Duan @ 2018-08-20 10:43 UTC (permalink / raw)
To: xen-devel
Cc: kevin.tian, andrew.cooper3, srinivas.eeda, JBeulich, shane.wang,
boris.ostrovsky, gang.wei
When TBOOT enabled, acpi_parse_dmar() zap a copy of DMAR table rather
than the real table, so make it controled by config option based on the
fact that we already have done the real zapping in tboot_parse_dmar_table().
As said above, acpi_parse_dmar() doesn't zaps APCI DMAR signature in
real TXT heap table, fix the stale comments.
This is osmetic change, it's unnecessory to zap a copy of DMAR table which
is freed later.
-v2: Add some description per Jan.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
xen/arch/x86/tboot.c | 3 +--
xen/drivers/passthrough/vtd/dmar.c | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index d5a5292..f22fa24 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -490,8 +490,7 @@ int __init tboot_parse_dmar_table(acpi_table_handler dmar_handler)
rc = dmar_handler(dmar_table);
xfree(dmar_table);
- /* acpi_parse_dmar() zaps APCI DMAR signature in TXT heap table */
- /* but dom0 will read real table, so must zap it there too */
+ /* Dom0 will read real DMAR table, so must zap it there */
acpi_dmar_zap();
return rc;
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8c5fa80..ed4c04e 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -866,8 +866,10 @@ static int __init acpi_parse_dmar(struct acpi_table_header *table)
}
out:
+#ifndef CONFIG_TBOOT
/* Zap ACPI DMAR signature to prevent dom0 using vt-d HW. */
acpi_dmar_zap();
+#endif
return ret;
}
--
1.7.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-20 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-20 10:43 [PATCH v2 2/2] x86/dmar: zap DMAR signature for dom0 once in TBOOT case Zhenzhong Duan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).