qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>, qemu-devel@nongnu.org
Cc: peterx@redhat.com
Subject: Re: [PATCH 0/2] vfio: Align mmaps
Date: Wed, 23 Oct 2024 17:08:56 +0200	[thread overview]
Message-ID: <1e378ace-ab4c-47eb-82fb-70a2c2abbe20@redhat.com> (raw)
In-Reply-To: <20241022200830.4129598-1-alex.williamson@redhat.com>

On 10/22/24 22:08, Alex Williamson wrote:
> As described in patch /2, newer kernels may support pfnmap with PMD or
> PUD sized mappings.  Mappings must be aligned in order to see the full
> benefit of this support.  We're largely able to get PMD alignment for
> free from mmap, but PUD alignment requires some effort.  Further, we
> don't actually have an easy way to determine PMD or PUD alignment,
> therefore we align all mmaps to the nearest power-of-two relative to the
> region size, up to the maximum PUD size known the be currently available.
> 
> Enabling debug prints in the kernel shows that this exclusively enables
> 1GiB mappings for a GPU with a multi-gigabyte BAR whereas previously the
> BAR is mapped with a combination of 2MiB and 1GiB mappings, only using
> 1GiB when opportunistically crossing an alignment boundary.
> 
> If there are ways to determine discrete alignment intervals or better
> ways to generate a properly aligned address value for mmap, please share.
> Thanks,
> 
> Alex
> 
> Alex Williamson (2):
>    vfio/helpers: Refactor vfio_region_mmap() error handling
>    vfio/helpers: Align mmaps
> 
>   hw/vfio/helpers.c | 66 +++++++++++++++++++++++++++++++++--------------
>   1 file changed, 47 insertions(+), 19 deletions(-)
> 


Applied to vfio-next.

Thanks,

C.





      parent reply	other threads:[~2024-10-23 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 20:08 [PATCH 0/2] vfio: Align mmaps Alex Williamson
2024-10-22 20:08 ` [PATCH 1/2] vfio/helpers: Refactor vfio_region_mmap() error handling Alex Williamson
2024-10-22 21:44   ` Peter Xu
2024-10-23  9:13   ` Cédric Le Goater
2024-10-22 20:08 ` [PATCH 2/2] vfio/helpers: Align mmaps Alex Williamson
2024-10-22 21:50   ` Peter Xu
2024-10-23 12:44   ` Cédric Le Goater
2024-10-23 13:55     ` Alex Williamson
2024-10-23 15:08 ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e378ace-ab4c-47eb-82fb-70a2c2abbe20@redhat.com \
    --to=clg@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).