[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v2 01/17] memory-device: drop assert related to
From: |
Michael S. Tsirkin |
Subject: |
Re: [qemu-s390x] [PATCH v2 01/17] memory-device: drop assert related to align and start of address space |
Date: |
Mon, 14 May 2018 04:24:52 +0300 |
On Fri, May 11, 2018 at 03:19:37PM +0200, David Hildenbrand wrote:
> The start of the address space does not have to be aligned for the
> search. Handly this case explicitly when starting the search for a new
> address.
Handly -> Handle?
>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
> hw/mem/memory-device.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c
> index 3e04f3954e..361d38bfc5 100644
> --- a/hw/mem/memory-device.c
> +++ b/hw/mem/memory-device.c
> @@ -116,7 +116,6 @@ uint64_t memory_device_get_free_addr(MachineState *ms,
> const uint64_t *hint,
> address_space_start = ms->device_memory->base;
> address_space_end = address_space_start +
> memory_region_size(&ms->device_memory->mr);
> - g_assert(QEMU_ALIGN_UP(address_space_start, align) ==
> address_space_start);
> g_assert(address_space_end >= address_space_start);
>
> memory_device_check_addable(ms, size, errp);
> @@ -149,7 +148,7 @@ uint64_t memory_device_get_free_addr(MachineState *ms,
> const uint64_t *hint,
> return 0;
> }
> } else {
> - new_addr = address_space_start;
> + new_addr = QEMU_ALIGN_UP(address_space_start, align);
> }
>
> /* find address range that will fit new memory device */
> --
> 2.14.3
- [qemu-s390x] [PATCH v2 00/17] MemoryDevice: use multi stage hotplug handlers, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 02/17] qdev: let machine hotplug handler to override bus hotplug handler, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 01/17] memory-device: drop assert related to align and start of address space, David Hildenbrand, 2018/05/11
- Re: [qemu-s390x] [PATCH v2 01/17] memory-device: drop assert related to align and start of address space,
Michael S. Tsirkin <=
- [qemu-s390x] [PATCH v2 04/17] pc: route all memory devices through the machine hotplug handler, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 05/17] spapr: prepare for multi stage hotplug handlers, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 06/17] spapr: route all memory devices through the machine hotplug handler, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 03/17] pc: prepare for multi stage hotplug handlers, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 07/17] spapr: handle pc-dimm unplug via hotplug handler chain, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 08/17] spapr: handle cpu core unplug via hotplug handler chain, David Hildenbrand, 2018/05/11
- [qemu-s390x] [PATCH v2 09/17] memory-device: new functions to handle plug/unplug, David Hildenbrand, 2018/05/11