# HG changeset patch
# User Allen Kay <allen.m.kay@xxxxxxxxx>
# Date 1302077462 -3600
# Node ID c7916d6f4dfba9d6c7eeb0fc2796068d75e2fb4a
# Parent 42fa70e0761bbb0596618ca5323664f31a2faa76
[VTD] Fixes to ACPI DMAR flag checks.
* platform_supports_{intremap,x2apic} should not be marked __init as
they are used during S3 resume.
* DMAR flags should be taken from the table passed to
acpi_parse_dmar() -- this is the trusted copy of the DMAR, when
running in TXT mode.
Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---
diff -r 42fa70e0761b -r c7916d6f4dfb xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c Wed Apr 06 09:02:13 2011 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.c Wed Apr 06 09:11:02 2011 +0100
@@ -675,6 +675,7 @@
int ret = 0;
dmar = (struct acpi_table_dmar *)table;
+ dmar_flags = dmar->flags;
if ( !iommu_enabled )
{
@@ -762,12 +763,7 @@
int __init acpi_dmar_init(void)
{
- struct acpi_table_dmar *dmar;
-
acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table);
- dmar = (struct acpi_table_dmar *) dmar_table;
- dmar_flags = dmar->flags;
-
return parse_dmar_table(acpi_parse_dmar);
}
@@ -787,7 +783,7 @@
dmar_table->checksum -= 'X'-'D';
}
-int __init platform_supports_intremap(void)
+int platform_supports_intremap(void)
{
unsigned int flags = 0;
@@ -795,7 +791,7 @@
return ((dmar_flags & flags) == DMAR_INTR_REMAP);
}
-int __init platform_supports_x2apic(void)
+int platform_supports_x2apic(void)
{
unsigned int flags = 0;
diff -r 42fa70e0761b -r c7916d6f4dfb xen/drivers/passthrough/vtd/extern.h
--- a/xen/drivers/passthrough/vtd/extern.h Wed Apr 06 09:02:13 2011 +0100
+++ b/xen/drivers/passthrough/vtd/extern.h Wed Apr 06 09:11:02 2011 +0100
@@ -119,7 +119,7 @@
void vtd_ops_postamble_quirk(struct iommu* iommu);
void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map);
void pci_vtd_quirk(struct pci_dev *pdev);
-int __init platform_supports_intremap(void);
-int __init platform_supports_x2apic(void);
+int platform_supports_intremap(void);
+int platform_supports_x2apic(void);
#endif // _VTD_EXTERN_H_
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|