[PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code

Thomas Huth posted 3 patches 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220810125720.3849835-1-thuth@redhat.com
Maintainers: David Hildenbrand <david@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
include/qemu/mmap-alloc.h |  2 --
backends/hostmem.c        | 14 ++------------
softmmu/physmem.c         | 17 -----------------
util/mmap-alloc.c         | 31 -------------------------------
4 files changed, 2 insertions(+), 62 deletions(-)
[PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code
Posted by Thomas Huth 1 year, 8 months ago
The first patch fixes the problem that hugepages cannot be used via
the "memory-backend-memfd" object on s390x. The second and third patch
are some clean-ups that can be done after generalizing the code in the
first patch.

v2:
 - Use qemu_ram_pagesize(memdev->mr.ram_block) instead of adding
   additional code for the memfd object
 - Added the two clean-up patches on top to simplify the code

Thomas Huth (3):
  backends/hostmem: Fix support of memory-backend-memfd in
    qemu_maxrampagesize()
  softmmu/physmem: Remove the ifdef __linux__  around the pagesize
    functions
  util/mmap-alloc: Remove qemu_mempath_getpagesize()

 include/qemu/mmap-alloc.h |  2 --
 backends/hostmem.c        | 14 ++------------
 softmmu/physmem.c         | 17 -----------------
 util/mmap-alloc.c         | 31 -------------------------------
 4 files changed, 2 insertions(+), 62 deletions(-)

-- 
2.31.1
Re: [PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code
Posted by Thomas Huth 1 year, 7 months ago
On 10/08/2022 14.57, Thomas Huth wrote:
> The first patch fixes the problem that hugepages cannot be used via
> the "memory-backend-memfd" object on s390x. The second and third patch
> are some clean-ups that can be done after generalizing the code in the
> first patch.
> 
> v2:
>   - Use qemu_ram_pagesize(memdev->mr.ram_block) instead of adding
>     additional code for the memfd object
>   - Added the two clean-up patches on top to simplify the code
> 
> Thomas Huth (3):
>    backends/hostmem: Fix support of memory-backend-memfd in
>      qemu_maxrampagesize()
>    softmmu/physmem: Remove the ifdef __linux__  around the pagesize
>      functions
>    util/mmap-alloc: Remove qemu_mempath_getpagesize()
> 
>   include/qemu/mmap-alloc.h |  2 --
>   backends/hostmem.c        | 14 ++------------
>   softmmu/physmem.c         | 17 -----------------
>   util/mmap-alloc.c         | 31 -------------------------------
>   4 files changed, 2 insertions(+), 62 deletions(-)
> 

Thanks to David and Claudio for the reviews! FWIW, I'll take this through my 
s390x-next branch since it fixes a s390x-related problem:

  https://gitlab.com/thuth/qemu/-/commits/s390x-next/

  Thomas
Re: [PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code
Posted by Claudio Imbrenda 1 year, 8 months ago
On Wed, 10 Aug 2022 14:57:17 +0200
Thomas Huth <thuth@redhat.com> wrote:

> The first patch fixes the problem that hugepages cannot be used via
> the "memory-backend-memfd" object on s390x. The second and third patch
> are some clean-ups that can be done after generalizing the code in the
> first patch.

thanks for fixing this

> 
> v2:
>  - Use qemu_ram_pagesize(memdev->mr.ram_block) instead of adding
>    additional code for the memfd object
>  - Added the two clean-up patches on top to simplify the code
> 
> Thomas Huth (3):
>   backends/hostmem: Fix support of memory-backend-memfd in
>     qemu_maxrampagesize()
>   softmmu/physmem: Remove the ifdef __linux__  around the pagesize
>     functions
>   util/mmap-alloc: Remove qemu_mempath_getpagesize()
> 
>  include/qemu/mmap-alloc.h |  2 --
>  backends/hostmem.c        | 14 ++------------
>  softmmu/physmem.c         | 17 -----------------
>  util/mmap-alloc.c         | 31 -------------------------------
>  4 files changed, 2 insertions(+), 62 deletions(-)
>