|
From: | Dou Liyang |
Subject: | Re: [Qemu-devel] [PATCH v5 1/3] hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM |
Date: | Tue, 5 Sep 2017 08:59:42 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
Hi Igor, At 09/04/2017 07:11 PM, Igor Mammedov wrote: [...]
+ if (mem_base <= HOLE_640K_START && + next_base > HOLE_640K_START) { + mem_len -= next_base - HOLE_640K_START; + if (mem_len > 0) { + numamem = acpi_data_push(table_data, sizeof *numamem); + build_srat_memory(numamem, mem_base, mem_len, i - 1, + MEM_AFFINITY_ENABLED); + } + + /* Check for the rare case: 640K < RAM < 1M */ + if (next_base <= HOLE_640K_END) { + next_base = HOLE_640K_END;Is this assignment really necessary?It is necessary, because we set mem_base to next_base before setting next_base; But, I can refine it: MEM_AFFINITY_ENABLED); } + mem_base = HOLE_640K_END; /* Check for the rare case: 640K < RAM < 1M */ if (next_base <= HOLE_640K_END) { - next_base = HOLE_640K_END; continue; } - mem_base = HOLE_640K_END; mem_len = next_base - HOLE_640K_END; } Is it?I was wrong, so just leave it as it is now.
OK, I see. Thanks, dou.
[Prev in Thread] | Current Thread | [Next in Thread] |