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

Re: [Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm




          base = (resource->base  + bar_sz - 1) & ~(uint64_t)(bar_sz - 1);
+
+        /* If we're using mem_resource, check for RMRR conflicts */
+        while ( resource == &mem_resource &&
+                next_rmrr > 0 &&
+                check_overlap(base, bar_sz,
+                              memory_map.map[next_rmrr].addr,
+                              memory_map.map[next_rmrr].size)) {
+            base = memory_map.map[next_rmrr].addr +
memory_map.map[next_rmrr].size;
+            base = (resource->base  + bar_sz - 1) & ~(uint64_t)(bar_sz - 1);
+            next_rmrr=find_next_rmrr(base);
+        }
+
          bar_data |= (uint32_t)base;
          bar_data_upper = (uint32_t)(base >> 32);
          base += bar_sz;


Actually this chunk of codes are really similar as what we did in my previous revisions from RFC ~ v3. It's just trying to skip and then allocate, right? As Jan pointed out, there are two key problems:

#1. All skipping action probably cause a result of no sufficient MMIO to allocate all devices as before.

#2. Another is that alignment issue. When the original "base" change to align to rdm_end, some spaces are wasted. Especially, these spaces could be allocated to other smaller bars.

This is one key reason why I had new revision started from v4 to address these two points :)

Thanks
Tiejun

_______________________________________________
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®.