[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] vt-d: Disable VT-d if parsing ACPI DMAR fails
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1216045235 -3600 # Node ID e3ead65e75b2e03638c032566033417ed742cd2a # Parent 750919688b61cf069b7085ce40817781739bdb89 vt-d: Disable VT-d if parsing ACPI DMAR fails Signed-off-by: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx> --- xen/drivers/passthrough/vtd/dmar.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+) diff -r 750919688b61 -r e3ead65e75b2 xen/drivers/passthrough/vtd/dmar.c --- a/xen/drivers/passthrough/vtd/dmar.c Mon Jul 14 13:26:45 2008 +0100 +++ b/xen/drivers/passthrough/vtd/dmar.c Mon Jul 14 15:20:35 2008 +0100 @@ -84,6 +84,29 @@ static int __init acpi_register_rmrr_uni return 0; } +static void __init disable_all_dmar_units(void) +{ + struct acpi_drhd_unit *drhd, *_drhd; + struct acpi_rmrr_unit *rmrr, *_rmrr; + struct acpi_atsr_unit *atsr, *_atsr; + + list_for_each_entry_safe ( drhd, _drhd, &acpi_drhd_units, list ) + { + list_del(&drhd->list); + xfree(drhd); + } + list_for_each_entry_safe ( rmrr, _rmrr, &acpi_rmrr_units, list ) + { + list_del(&rmrr->list); + xfree(rmrr); + } + list_for_each_entry_safe ( atsr, _atsr, &acpi_atsr_units, list ) + { + list_del(&atsr->list); + xfree(atsr); + } +} + static int acpi_ioapic_device_match( struct list_head *ioapic_list, unsigned int apic_id) { @@ -436,6 +459,12 @@ static int __init acpi_parse_dmar(struct /* Zap APCI DMAR signature to prevent dom0 using vt-d HW. */ dmar->header.signature[0] = '\0'; + if ( ret ) + { + printk(XENLOG_WARNING "Failed to parse ACPI DMAR. Disabling VT-d.\n"); + disable_all_dmar_units(); + } + return ret; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |