]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
hvmloader: PA range 0xfc000000-0xffffffff should be UC
authorJan Beulich <jbeulich@suse.com>
Wed, 21 May 2014 16:14:04 +0000 (18:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 May 2014 16:14:04 +0000 (18:14 +0200)
Rather than leaving the range from PCI_MEM_END (0xfc000000) to 4G
uncovered, we should include this in the UC range created for the (low)
PCI range. Besides being more correct, this also has the advantage that
with the way pci_setup() currently works the range will always be
mappable with a single variable range MTRR (rather than from 2 to 5
depending on how much the lower boundary gets shifted down to
accommodate all devices).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/firmware/hvmloader/cacheattr.c

index e7c219f65d8d2cc8755ea64fbcaa7a1d58bca758..de8d39cda99c0cc43f3dd5f915998d16f4212223 100644 (file)
@@ -99,12 +99,12 @@ void cacheattr_init(void)
     {
         uint64_t base = pci_mem_start, size;
 
-        for ( i = 0; (base != pci_mem_end) && (i < nr_var_ranges); i++ )
+        for ( i = 0; !(base >> 32) && (i < nr_var_ranges); i++ )
         {
             size = PAGE_SIZE;
             while ( !(base & size) )
                 size <<= 1;
-            while ( ((base + size) < base) || ((base + size) > pci_mem_end) )
+            while ( ((base + size) < base) || ((base + size - 1) >> 32) )
                 size >>= 1;
 
             wrmsr(MSR_MTRRphysBase(i), base);