On 3/6/2026 5:06 AM, Gregory Price wrote:
On Thu, Feb 26, 2026 at 06:50:23PM +0800, fanhuang wrote:
+
+ if (addr < x86ms->below_4g_mem_size) {
+ if (addr + node_size <= x86ms->below_4g_mem_size) {
+ guest_addr = addr;
+ } else {
+ error_report("NUMA node %d with memmap-type spans across "
+ "4GB boundary, not supported", i);
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ guest_addr = 0x100000000ULL +
+ (addr - x86ms->below_4g_mem_size);
+ }
+
I missed this on my first go around
Should this be:
guest_addr = x86ms->above_4g_mem_start +
(addr - x86ms->below_4g_mem_size);
Or is there a reason for the hard-code?
~Gregory
Hi Gregory,
Good catch, thanks for spotting this!
You're right, there's no reason to hardcode 4 GiB here — on AMD
hosts with IOMMU, above_4g_mem_start gets relocated to above 1 TB,
so the hardcode would produce a wrong address.
You're right, it should be:
guest_addr = x86ms->above_4g_mem_start +
(addr - x86ms->below_4g_mem_size);
I'll send a v7 shortly with this fix.
Thanks,
Jerry Huang