[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] x86/dmar: zap DMAR signature for dom0 once in TBOOT case



On 2018/8/20 16:30, Jan Beulich wrote:
On 20.08.18 at 05:32, <zhenzhong.duan@xxxxxxxxxx> wrote:
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().

Is this just a cosmetic change, or is there any harm done by the extra
zapping?
Cosmetic change, I feel it isn't necessory to zap a copy of DMAR table which is freed later.

Thanks
Zhenzhong

As said above, acpi_parse_dmar() doesn't zaps APCI DMAR signature in
real TXT heap table, fix the stale comments.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>
---
  xen/arch/x86/tboot.c               |    3 +--
  xen/drivers/passthrough/vtd/dmar.c |    2 ++
  2 files changed, 3 insertions(+), 2 deletions(-)

You've again failed to Cc maintainers (included now).

Jan

--- 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;
--- 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;
  }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.