On Mo, 2013-10-14 at 15:24 +0200, Igor Mammedov wrote:
On Mon, 14 Oct 2013 14:22:15 +0200 Gerd Hoffmann email@example.com wrote:
if (0x100000000LL + RamSizeOver4G < entry.address + entry.length)
RamSizeOver4G = entry.address + entry.length - 0x100000000LL;
it's all based on assumption that there is only one highmem entry, why don't take just entry.length then?
Would work today as entry.address will be 0x100000000LL at this point no matter what. But if that ever changes -- say due to qemu gaining support for non-contigous memory -- things will break. So we better should do the math to be on the safe side for the future.
providing we won't use RamSizeOver4G for 64-bit PCI window placement, the only dependency on it left is SMBIOS which will silently break if non-contigous memory are to be used regardless of how we count RamSizeOver4G.
Long-term RamSizeOver4G will probably go away. For now we will continue to need it for qemu versions not supporting etc/pcimem64-start.
smbios dependency can be removed by either making smbios look at the e820 table instead or by qemu providing smbios tables too. One of these two has to happen for non-contignous memory support.