[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/msi: dynamically map pages for MSI-X tables
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ruben Hakobyan <hakor@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 2 May 2023 12:18:06 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=xEep6J3w5rqH6AHqUm58pv5LcYpdYtdRvkslNxU9Hi0=; b=lMeeamR4dnJZj/VHRXu8MtVO8ydL97TGdNi5I3NEMy2EoRktlPNgOFnujmAlcIbCamd6EePztNBb6+r/wUcfkFapt1Fvvti1ZHyCb1a6k6OivUYfWV1g6gudpuDAiJNMbWHm9XpDMGSsk68TGG1+MZE21JMJoLytrIKs18koCgIEx0c+1cO/R/OkFEeab00oBMLjJwAT0eSTcy7nTxLEjahnbab4wK5WKpdMVKL5VmufEh8kR9oywbg7FpHv/0e9zGEiSqx7/yevFB+kHdtjLq3X4cDBg6g6YJsP+wz+HdkzBvoFcsyL8mKQZAjZh4bgMq+IiG3XtkQkrZS5L7/AcQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CsLNfOW1W2yiuCDCNHqvfGcAigxhKI7kO4AessEpqaxhab5srP/+E8y+Yh4/it4dufy3efTI1scs8ER7ickA5l6D1fqANu8uXIdM1a7Hj+9DHv1qn+2wKku6qKJMS+ZaTWacnoJSRYtCeuM5pbpYO4faYnXfELAtMt2SmKtAFUKeaYozSFH7yZaEPfoM/Fx2xUUXJnoaCS02LhhtPzSoMinLJ71sVx54jFREmPsYHxB8RlTtUBckXNKuyTXvlouyWOQAUvUNe+6v6si2Mw4scsYZ9dbkMNFFfiJaNh+nQPWxj3scBLltxvRvZRjhYhou/qjJzBYuVix6O7kookIL+Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 02 May 2023 10:18:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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).
Jan
|