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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 2 May 2023 12:22:23 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qUgTXWvqtxnPedM06EBb+hHJ66G71f5SwjS/Ezmc6+Q=; b=W6tkrahJ5zOLIBGGd/70YMKuOv1s4JyiQYUQHgtOpeatO0gibls+h40U5kaFCeTrie8ps4z6C2l99NiBs3vVD2gbRawP5ovbP/19g+fHr5/VzQG5IHqL9v7Wo6roLr/ZUy8Neffc3yPwUMJ4O1TldJ08PENecyUJswXnVZVO1vyQqykLuEAte3Ik9PKt3QiNwqVCKf6YdqU6kozicPYbHwT7kMwvq8kLXOTJ3H+/WBU3GIdxIU5AVEoBZgEHK6PQWblxdHrlnubMEsyzOVLe2Ydrvn6dyjIKy8MpFa/pSkKruTVE/XEUPvEDuDw0oPms5gfbO7Rz4PjvDQJNQJHnaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ThYnrfHIJ4NgPMGG2tGutv1oBmV8nHlsAOplqEVjFfSTWwifAIeWh5WKll3tMrJZ2sNctShM1HPf4GgBsa90t+W/Gm2AKfE8hw/+FTmpJc1HMWbO0uE/qhnRLvNxQT7/U/3aEp4CEOipZd2NeHk93AH7e5MqEX1E2H0b7BdbzJufMRcCb9XMzjL1DJX9Orc334Cqgdx7v0vTTB4Pb48qcoKRHJyfXPQ5yAEUDp6m5UALW9nvD1d5fd/vD6TOBqIvbJ1iqPoAgxl9V0L5dqBiKdG/Tlba00DGzj5rZKDcoGlRsAOaIdItwr4kWRauYcYtlkRUoAZhEsbHNG5h9gULhw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Ruben Hakobyan <hakor@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 02 May 2023 10:22:45 +0000
  • Ironport-data: A9a23:dQDlkqKZ8uCw3zWWFE+RE5QlxSXFcZb7ZxGr2PjKsXjdYENS1TUAy 2EdWzuOa/uJYmH8Ko12OY+29k4GvZTTzYAwSgtlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPSwP9TlK6q4mhA4wRkPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5MOW9E3 9IIJQsfYwmeoeGa7KuZaNtz05FLwMnDZOvzu1lG5BSBUbMKZM6GRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/VspTSJpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+tqyrz17GWwHyhMG4UPJCl0+5WjG+q+nACCz83akmn8MC2qVHrDrqzL GRRoELCt5Ma9kamU938VB2Qu2Ofs1gXXN84O+0z6waX4qPR6hSeAC4PSTspQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkA9L2AYbCsAZQIA6svkpsc4iRenZslnOL64iJvyAz6Y/ tyRhC03hrFWgctV0ay+pQzDm2j0+sKPSRMp7ALKWG7j9hl+eIOue42v7x7c8OpEK4GaCFKGu RDohvSj0QzHNrnV/ATlfQnHNOvBCyqtWNEEvWNSIg==
  • Ironport-hdrordr: A9a23:sVKx66DDcePI6ujlHem955DYdb4zR+YMi2TDtnoddfUxSKfzqy nApoV56faKskdyZJhNo7690cq7LU80l6QU3WB5B97LYOCMggSVxe9ZjLcKygeQfhHDyg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.



 


Rackspace

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