[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
- To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
- From: "Chen, Tiejun" <tiejun.chen@xxxxxxxxx>
- Date: Fri, 17 Jul 2015 05:15:59 +0800
- Cc: Wei Liu <wei.liu2@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Keir Fraser <keir@xxxxxxx>
- Delivery-date: Thu, 16 Jul 2015 21:16:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
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
|