[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/18] memory-device: break the loop if tmp exceed the hinted rang
From: |
Eduardo Habkost |
Subject: |
[PULL 13/18] memory-device: break the loop if tmp exceed the hinted range |
Date: |
Tue, 15 Oct 2019 18:37:40 -0300 |
From: Wei Yang <address@hidden>
The memory-device list built by memory_device_build_list is ordered by
its address, this means if the tmp range exceed the hinted range, all
the following range will not overlap with it.
And this won't change default pc-dimm mapping and address assignment stay
the same as before this change.
Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/mem/memory-device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c
index 5029890e06..aef148c1d7 100644
--- a/hw/mem/memory-device.c
+++ b/hw/mem/memory-device.c
@@ -179,6 +179,8 @@ static uint64_t memory_device_get_free_addr(MachineState
*ms,
range_make_empty(&new);
break;
}
+ } else if (range_lob(&tmp) > range_upb(&new)) {
+ break;
}
}
--
2.21.0
- [PULL 03/18] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node, (continued)
- [PULL 03/18] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node, Eduardo Habkost, 2019/10/15
- [PULL 04/18] hw/acpi/piix4: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 05/18] hw/isa/piix4: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 06/18] hw/ide/piix: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 07/18] hw/ide/sii3112: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 08/18] hw/ide/via82c: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 09/18] hw/isa/vt82c686: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 10/18] hw/input/lm832x: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 11/18] hw/misc/vmcoreinfo: Add comment about reset handler, Eduardo Habkost, 2019/10/15
- [PULL 12/18] memory-device: not necessary to use goto for the last check, Eduardo Habkost, 2019/10/15
- [PULL 13/18] memory-device: break the loop if tmp exceed the hinted range,
Eduardo Habkost <=
- [PULL 14/18] target/i386: clean up comments over 80 chars per line, Eduardo Habkost, 2019/10/15
- [PULL 15/18] target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro, Eduardo Habkost, 2019/10/15
- [PULL 16/18] i386: Fix legacy guest with xsave panic on host kvm without update cpuid., Eduardo Habkost, 2019/10/15
- [PULL 17/18] i386: Omit all-zeroes entries from KVM CPUID table, Eduardo Habkost, 2019/10/15
- [PULL 18/18] target/i386: Add Snowridge-v2 (no MPX) CPU model, Eduardo Habkost, 2019/10/15
- Re: [PULL 00/18] x86 and machine queue, 2019-10-15, Peter Maydell, 2019/10/18