[Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment

David Hildenbrand posted 4 patches 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180801133444.11269-1-david@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
hw/i386/pc.c             | 16 ++++-------
hw/mem/pc-dimm.c         | 61 +++++++++++++++++++++-------------------
hw/ppc/spapr.c           | 14 ++++++---
include/hw/mem/pc-dimm.h |  5 ++--
util/oslib-win32.c       | 15 ++++++++--
5 files changed, 63 insertions(+), 48 deletions(-)
[Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment
Posted by David Hildenbrand 5 years, 9 months ago
This is basically a resend of v3 with commit message changes.

Paolo, if there are no further comments, can you please pick this up for
3.1? Thanks!

---

As requested by Igor, assign and verify "slot" and "addr" in the
pre_plug handler. Factor out the compatibility handling/configuration
for detecting the alignment to be used when searching for an address
in guest physical memory for a memory device.

This is another part of the original series
    [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers

This refactoring is the last step before factoring out pre_plug, plug and
unplug logic of memory devices completely into memory-device.c

v3 -> v4:
- Added rb/acks
- Fixed up patch description of last patch

v2 -> v3:
- "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
-- take allocation granularity into account
-- drop comment
- "pc-dimm: assign and verify the "addr" property during pre_plug"
-- compat_align -> legacy_align
-- shortened align detection as proposed by Igor
-- trace address asignment in pre_plug

v1 -> v2:
- dropped "machine: factor out enforce_aligned_dimm into memory_device_align"
- dropped "pc-dimm/memory-device: detect alignment internally"
- added "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
-- indicate the alignment and therefor simplify compat handling for
   Windows as we can ...
- added "pc: drop memory region alignment check for 0"
-- ... drop a check for memory_region_get_alignment(mr), allowing us to
   factor out compat handling for pc DIMM/NVDIMM alignment in a clean way.
- "pc-dimm: assign and verify the "addr" property during pre_plug"
-- Default to "memory_region_get_alignment(mr)" if no compat alignment
   has been specified.

David Hildenbrand (4):
  pc-dimm: assign and verify the "slot" property during pre_plug
  util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()
  pc: drop memory region alignment check for 0
  pc-dimm: assign and verify the "addr" property during pre_plug

 hw/i386/pc.c             | 16 ++++-------
 hw/mem/pc-dimm.c         | 61 +++++++++++++++++++++-------------------
 hw/ppc/spapr.c           | 14 ++++++---
 include/hw/mem/pc-dimm.h |  5 ++--
 util/oslib-win32.c       | 15 ++++++++--
 5 files changed, 63 insertions(+), 48 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment
Posted by Igor Mammedov 5 years, 9 months ago
On Wed,  1 Aug 2018 15:34:40 +0200
David Hildenbrand <david@redhat.com> wrote:

> This is basically a resend of v3 with commit message changes.
> 
> Paolo, if there are no further comments, can you please pick this up for
> 3.1? Thanks!
> 
> ---
> 
> As requested by Igor, assign and verify "slot" and "addr" in the
> pre_plug handler. Factor out the compatibility handling/configuration
> for detecting the alignment to be used when searching for an address
> in guest physical memory for a memory device.
> 
> This is another part of the original series
>     [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers
does it depend on
   [PATCH v1 00/11] memory-device: complete refactoring
that's still on my review queue?
or it's other way around?
 
> 
> This refactoring is the last step before factoring out pre_plug, plug and
> unplug logic of memory devices completely into memory-device.c
> 
> v3 -> v4:
> - Added rb/acks
> - Fixed up patch description of last patch
> 
> v2 -> v3:
> - "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
> -- take allocation granularity into account
> -- drop comment
> - "pc-dimm: assign and verify the "addr" property during pre_plug"
> -- compat_align -> legacy_align
> -- shortened align detection as proposed by Igor
> -- trace address asignment in pre_plug
> 
> v1 -> v2:
> - dropped "machine: factor out enforce_aligned_dimm into memory_device_align"
> - dropped "pc-dimm/memory-device: detect alignment internally"
> - added "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
> -- indicate the alignment and therefor simplify compat handling for
>    Windows as we can ...
> - added "pc: drop memory region alignment check for 0"
> -- ... drop a check for memory_region_get_alignment(mr), allowing us to
>    factor out compat handling for pc DIMM/NVDIMM alignment in a clean way.
> - "pc-dimm: assign and verify the "addr" property during pre_plug"
> -- Default to "memory_region_get_alignment(mr)" if no compat alignment
>    has been specified.
> 
> David Hildenbrand (4):
>   pc-dimm: assign and verify the "slot" property during pre_plug
>   util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()
>   pc: drop memory region alignment check for 0
>   pc-dimm: assign and verify the "addr" property during pre_plug
> 
>  hw/i386/pc.c             | 16 ++++-------
>  hw/mem/pc-dimm.c         | 61 +++++++++++++++++++++-------------------
>  hw/ppc/spapr.c           | 14 ++++++---
>  include/hw/mem/pc-dimm.h |  5 ++--
>  util/oslib-win32.c       | 15 ++++++++--
>  5 files changed, 63 insertions(+), 48 deletions(-)
> 


Re: [Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment
Posted by David Hildenbrand 5 years, 9 months ago
On 02.08.2018 12:17, Igor Mammedov wrote:
> On Wed,  1 Aug 2018 15:34:40 +0200
> David Hildenbrand <david@redhat.com> wrote:
> 
>> This is basically a resend of v3 with commit message changes.
>>
>> Paolo, if there are no further comments, can you please pick this up for
>> 3.1? Thanks!
>>
>> ---
>>
>> As requested by Igor, assign and verify "slot" and "addr" in the
>> pre_plug handler. Factor out the compatibility handling/configuration
>> for detecting the alignment to be used when searching for an address
>> in guest physical memory for a memory device.
>>
>> This is another part of the original series
>>     [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers
> does it depend on
>    [PATCH v1 00/11] memory-device: complete refactoring
> that's still on my review queue?
> or it's other way around?

The other way around, "[PATCH v1 00/11] memory-device: complete
refactoring" is based on this series.


-- 

Thanks,

David / dhildenb

Re: [Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment
Posted by David Hildenbrand 5 years, 8 months ago
On 01.08.2018 15:34, David Hildenbrand wrote:
> This is basically a resend of v3 with commit message changes.
> 
> Paolo, if there are no further comments, can you please pick this up for
> 3.1? Thanks!

Paolo,

can you please pick this up? Thanks!

> 
> ---
> 
> As requested by Igor, assign and verify "slot" and "addr" in the
> pre_plug handler. Factor out the compatibility handling/configuration
> for detecting the alignment to be used when searching for an address
> in guest physical memory for a memory device.
> 
> This is another part of the original series
>     [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers
> 
> This refactoring is the last step before factoring out pre_plug, plug and
> unplug logic of memory devices completely into memory-device.c
> 
> v3 -> v4:
> - Added rb/acks
> - Fixed up patch description of last patch
> 
> v2 -> v3:
> - "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
> -- take allocation granularity into account
> -- drop comment
> - "pc-dimm: assign and verify the "addr" property during pre_plug"
> -- compat_align -> legacy_align
> -- shortened align detection as proposed by Igor
> -- trace address asignment in pre_plug
> 
> v1 -> v2:
> - dropped "machine: factor out enforce_aligned_dimm into memory_device_align"
> - dropped "pc-dimm/memory-device: detect alignment internally"
> - added "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
> -- indicate the alignment and therefor simplify compat handling for
>    Windows as we can ...
> - added "pc: drop memory region alignment check for 0"
> -- ... drop a check for memory_region_get_alignment(mr), allowing us to
>    factor out compat handling for pc DIMM/NVDIMM alignment in a clean way.
> - "pc-dimm: assign and verify the "addr" property during pre_plug"
> -- Default to "memory_region_get_alignment(mr)" if no compat alignment
>    has been specified.
> 
> David Hildenbrand (4):
>   pc-dimm: assign and verify the "slot" property during pre_plug
>   util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()
>   pc: drop memory region alignment check for 0
>   pc-dimm: assign and verify the "addr" property during pre_plug
> 
>  hw/i386/pc.c             | 16 ++++-------
>  hw/mem/pc-dimm.c         | 61 +++++++++++++++++++++-------------------
>  hw/ppc/spapr.c           | 14 ++++++---
>  include/hw/mem/pc-dimm.h |  5 ++--
>  util/oslib-win32.c       | 15 ++++++++--
>  5 files changed, 63 insertions(+), 48 deletions(-)
> 


-- 

Thanks,

David / dhildenb

Re: [Qemu-devel] [PATCH v4 0/4] pc-dimm: pre_plug "slot" and "addr" assignment
Posted by Paolo Bonzini 5 years, 8 months ago
On 20/08/2018 18:15, David Hildenbrand wrote:
> On 01.08.2018 15:34, David Hildenbrand wrote:
>> This is basically a resend of v3 with commit message changes.
>>
>> Paolo, if there are no further comments, can you please pick this up for
>> 3.1? Thanks!
> 
> Paolo,
> 
> can you please pick this up? Thanks!

Yup, queued now.

Thanks,

Paolo

>>
>> ---
>>
>> As requested by Igor, assign and verify "slot" and "addr" in the
>> pre_plug handler. Factor out the compatibility handling/configuration
>> for detecting the alignment to be used when searching for an address
>> in guest physical memory for a memory device.
>>
>> This is another part of the original series
>>     [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers
>>
>> This refactoring is the last step before factoring out pre_plug, plug and
>> unplug logic of memory devices completely into memory-device.c
>>
>> v3 -> v4:
>> - Added rb/acks
>> - Fixed up patch description of last patch
>>
>> v2 -> v3:
>> - "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
>> -- take allocation granularity into account
>> -- drop comment
>> - "pc-dimm: assign and verify the "addr" property during pre_plug"
>> -- compat_align -> legacy_align
>> -- shortened align detection as proposed by Igor
>> -- trace address asignment in pre_plug
>>
>> v1 -> v2:
>> - dropped "machine: factor out enforce_aligned_dimm into memory_device_align"
>> - dropped "pc-dimm/memory-device: detect alignment internally"
>> - added "util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()"
>> -- indicate the alignment and therefor simplify compat handling for
>>    Windows as we can ...
>> - added "pc: drop memory region alignment check for 0"
>> -- ... drop a check for memory_region_get_alignment(mr), allowing us to
>>    factor out compat handling for pc DIMM/NVDIMM alignment in a clean way.
>> - "pc-dimm: assign and verify the "addr" property during pre_plug"
>> -- Default to "memory_region_get_alignment(mr)" if no compat alignment
>>    has been specified.
>>
>> David Hildenbrand (4):
>>   pc-dimm: assign and verify the "slot" property during pre_plug
>>   util/oslib-win32: indicate alignment for qemu_anon_ram_alloc()
>>   pc: drop memory region alignment check for 0
>>   pc-dimm: assign and verify the "addr" property during pre_plug
>>
>>  hw/i386/pc.c             | 16 ++++-------
>>  hw/mem/pc-dimm.c         | 61 +++++++++++++++++++++-------------------
>>  hw/ppc/spapr.c           | 14 ++++++---
>>  include/hw/mem/pc-dimm.h |  5 ++--
>>  util/oslib-win32.c       | 15 ++++++++--
>>  5 files changed, 63 insertions(+), 48 deletions(-)
>>
> 
>