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

Re: [Xen-devel] [xen-4.2-testing test] 16260: regressions - FAIL



>>> On 25.02.13 at 11:23, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>>>> On 24.02.13 at 10:46, xen.org <ian.jackson@xxxxxxxxxxxxx> wrote:
>> flight 16260 xen-4.2-testing real [real]
>> http://www.chiark.greenend.org.uk/~xensrcts/logs/16260/ 
>> 
>> Regressions :-(
>> 
>> Tests which did not succeed and are blocking,
>> including tests which could not be run:
>>  test-i386-i386-xl             5 xen-boot                  fail REGR. vs. 
>> 16228
>>  test-i386-i386-xl-qemuu-winxpsp3  5 xen-boot              fail REGR. vs. 
>> 16228
>>  test-i386-i386-win            5 xen-boot                  fail REGR. vs. 
>> 16228
>>  test-i386-i386-xl-winxpsp3    5 xen-boot                  fail REGR. vs. 
>> 16228
> 
> This is because I didn't pay attention to the fact that
> 2ea6abb8e60cf557b20b8a9904deb73433103d9b can do
> what it does validly only on x86-64. Working on a fix...

And this is the fix I'm going to commit:

x86_32: fix acpi_dmar_init()

map_pages_to_xen() can't be used here on x86_32, need to use up to 2
newly introduced fixmap entries for this instead.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -776,6 +776,7 @@ out:
 }
 
 #ifdef CONFIG_X86
+#include <asm/fixmap.h>
 #include <asm/tboot.h>
 /* ACPI tables may not be DMA protected by tboot, so use DMAR copy */
 /* SINIT saved in SinitMleData in TXT heap (which is DMA protected) */
@@ -792,12 +793,26 @@ int __init acpi_dmar_init(void)
     if ( ACPI_SUCCESS(acpi_get_table_phys(ACPI_SIG_DMAR, 0,
                                           &dmar_addr, &dmar_len)) )
     {
+#ifdef CONFIG_X86_32
+        if ( dmar_addr + dmar_len > (DIRECTMAP_MBYTES << 20) )
+        {
+            unsigned long offset = dmar_addr & (PAGE_SIZE - 1);
+            unsigned long mapped_size = PAGE_SIZE - offset;
+
+            set_fixmap(FIX_DMAR_ZAP_LO, dmar_addr);
+            if ( mapped_size < sizeof(*dmar_table) )
+                set_fixmap(FIX_DMAR_ZAP_HI, dmar_addr + PAGE_SIZE);
+            dmar_table = (void *)fix_to_virt(FIX_DMAR_ZAP_LO) + offset;
+            goto exit;
+        }
+#endif
         map_pages_to_xen((unsigned long)__va(dmar_addr), PFN_DOWN(dmar_addr),
                          PFN_UP(dmar_addr + dmar_len) - PFN_DOWN(dmar_addr),
                          PAGE_HYPERVISOR);
         dmar_table = __va(dmar_addr);
     }
 
+ exit: __attribute__((__unused__))
     return parse_dmar_table(acpi_parse_dmar);
 }
 
--- a/xen/include/asm-x86/fixmap.h
+++ b/xen/include/asm-x86/fixmap.h
@@ -37,6 +37,8 @@ enum fixed_addresses {
     FIX_PAE_HIGHMEM_END = FIX_PAE_HIGHMEM_0 + NR_CPUS-1,
 #define FIX_VGC_END FIX_PAE_HIGHMEM_0
 #define FIX_VGC_BEGIN FIX_PAE_HIGHMEM_END
+    FIX_DMAR_ZAP_HI,
+    FIX_DMAR_ZAP_LO,
 #else
     FIX_VGC_END,
     FIX_VGC_BEGIN = FIX_VGC_END



Attachment: 26443-i386-fix.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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