[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/msi: dynamically map pages for MSI-X tables



On 02/05/2023, 11:23, Roger Pau Monné wrote:
> On Tue, May 02, 2023 at 12:18:06PM +0200, Jan Beulich wrote:
> > On 02.05.2023 12:10, Roger Pau Monné wrote:
> > > On Wed, Apr 26, 2023 at 02:55:20PM +0000, Ruben Hakobyan wrote:
> > >> Xen reserves a constant number of pages that can be used for mapping
> > >> MSI-X tables. This limit is defined by FIX_MSIX_MAX_PAGES in fixmap.h.
> > >>
> > >> Reserving a fixed number of pages could result in an -ENOMEM if a
> > >> device requests a new page when the fixmap limit is exhausted and will
> > >> necessitate manually adjusting the limit before compilation.
> > >>
> > >> To avoid the issues with the current fixmap implementation, we modify
> > >> the MSI-X page mapping logic to instead dynamically map new pages when
> > >> they are needed by making use of ioremap().
> > >
> > > I wonder if Arm plans to reuse this code, and whether then arm32 would
> > > better keep the fixmap implementation to avoid exhausting virtual
> > > address space in that case.
> >
> > I think this would then need to be something that 32-bit architectures
> > do specially. Right now aiui PCI (and hence MSI-X) work on Arm targets
> > only Arm64.
> >
> > > This also have the side effect of ioremap() now possibly allocating a
> > > page in order to fill the page table for the newly allocated VA.
> >
> > Indeed, but I think the (vague) plan to switch to ioremap() has been
> > around for a pretty long time (perhaps forever since 32-bit support
> > was purged).
>
>
> Yup, I'm not saying the above should block the patch, but might be
> worth mentioning in the commit message.
>
>
> Roger.

Sure, I will add a note in the commit message regarding the possible use
of this patch for 32-bit architectures.

Regarding other comments you made on the patch, I have noted them all
and agree with your suggestions. I will send out a new version.

Thanks for reviewing the patch!

Ruben.


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.