[PATCH v3 0/1] target/s390x: Allow 2G hugepages guest backing

Claudio Imbrenda posted 1 patch 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260805103728.97602-1-imbrenda@linux.ibm.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>
target/s390x/diag.c          |  2 +-
target/s390x/kvm/kvm.c       | 36 +++++++++++++++++-------------------
target/s390x/kvm/kvm_s390x.h |  2 +-
target/s390x/kvm/stubs.c     |  2 +-
4 files changed, 20 insertions(+), 22 deletions(-)
[PATCH v3 0/1] target/s390x: Allow 2G hugepages guest backing
Posted by Claudio Imbrenda 3 weeks ago
Allow mapping guest with 2G hugepages on hosts that support it.
    
Add new helper functions to check whether hpages are in effect, and
which size.

v2->v3:
* Remove dead code introduced in the previous version.
* Factor out the capability enablement and error reporting to avoid
  duplicating code and error messages.
* Optimize the control flow and bring it back in line with the previous
  behaviour regarding page sizes, i.e. assuming that if the page size
  is neither 4K nor 1M, then it must be 2G.

v1->v2:
* Rename the global variable to cap_hpage
* Use different values of cap_hpage to distinguish between hpage sizes
* Add wrappers to test for specific hpage sizes

Claudio Imbrenda (1):
  target/s390x: Allow 2G hugepages guest backing

 target/s390x/diag.c          |  2 +-
 target/s390x/kvm/kvm.c       | 36 +++++++++++++++++-------------------
 target/s390x/kvm/kvm_s390x.h |  2 +-
 target/s390x/kvm/stubs.c     |  2 +-
 4 files changed, 20 insertions(+), 22 deletions(-)

-- 
2.55.0
Re: [PATCH v3 0/1] target/s390x: Allow 2G hugepages guest backing
Posted by Eric Farman 2 weeks, 2 days ago

On 8/5/26 6:37 AM, Claudio Imbrenda wrote:
> Allow mapping guest with 2G hugepages on hosts that support it.
>      
> Add new helper functions to check whether hpages are in effect, and
> which size.
> 
> v2->v3:
> * Remove dead code introduced in the previous version.
> * Factor out the capability enablement and error reporting to avoid
>    duplicating code and error messages.
> * Optimize the control flow and bring it back in line with the previous
>    behaviour regarding page sizes, i.e. assuming that if the page size
>    is neither 4K nor 1M, then it must be 2G.
> 
> v1->v2:
> * Rename the global variable to cap_hpage
> * Use different values of cap_hpage to distinguish between hpage sizes
> * Add wrappers to test for specific hpage sizes
> 
> Claudio Imbrenda (1):
>    target/s390x: Allow 2G hugepages guest backing

Thanks! Applied for 11.2

> 
>   target/s390x/diag.c          |  2 +-
>   target/s390x/kvm/kvm.c       | 36 +++++++++++++++++-------------------
>   target/s390x/kvm/kvm_s390x.h |  2 +-
>   target/s390x/kvm/stubs.c     |  2 +-
>   4 files changed, 20 insertions(+), 22 deletions(-)
>