|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC][PATCH 12/13] hvmloader/pci: skip reserved ranges
On 2015/5/15 16:31, Jan Beulich wrote: On 15.05.15 at 10:16, <tiejun.chen@xxxxxxxxx> wrote:On 2015/5/15 15:44, Jan Beulich wrote:On 15.05.15 at 09:34, <tiejun.chen@xxxxxxxxx> wrote: rdm start or size? Or anything else I'm missing?
Sure.
I think I can record that max bar_sz to improve this like,
@@ -60,7 +60,7 @@ void pci_setup(void)
uint64_t bar_sz;
} *bars = (struct bars *)scratch_start;
unsigned int i, j, nr_bars = 0;
- uint64_t mmio_hole_size = 0, reserved_end;
+ uint64_t mmio_hole_size = 0, reserved_end, max_bar_sz = 0;
const char *s;
/*
@@ -226,6 +226,8 @@ void pci_setup(void)
bars[i].devfn = devfn;
bars[i].bar_reg = bar_reg;
bars[i].bar_sz = bar_sz;
+ if ( bar_sz > max_bar_sz )
+ max_bar_sz = bar_sz;
if ( ((bar_data & PCI_BASE_ADDRESS_SPACE) ==
PCI_BASE_ADDRESS_SPACE_MEMORY) ||
@@ -311,6 +313,8 @@ void pci_setup(void)
memory_map.map[j].addr,
memory_map.map[j].size) )
pci_mem_start -= memory_map.map[j].size >> PAGE_SHIFT;
+ pci_mem_start = (pci_mem_start + max_bar_sz - 1) &
+ ~(uint64_t)(max_bar_sz - 1);
}
}
Note you also can take close look at this change in next revision if
this is not that bad with your glance :)
Thanks Tiejun _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |