[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 0/3] vpci/msix: separate out common MSI-X code
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
- Date: Tue, 27 Oct 2026 09:39:05 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=zs+rNXfxKdI34rPisFtEQGl7/0ZgToIo7kHNoA9PQYI=; b=Phf0gdLsKk1LBIk0X9icUJa9xvno15u5x74FdlBRVQxaVtL9pZ/lfL5Uooc3VIv8lmhD+5V7n75CW9WquAxQYpKZ9iJL5eo7Bxay+oolYulIPFMnkzIjFLALm6wDxb0OAxnvj+12Qd73q3oHTZuxIWVo8AGpfFKwCZYILhbibw+5hjs33uZKOlxRivSlgC2m26iVMs24u4vQp8TT/CAw7N0I6Vz+W5BHF2xU+biMlHQF4Cn7Uu5VJa5UQk08pEdqDJaheloLLZNFB96yrEUs958LfEx+RKcw+EJ2hhEgNWT9x7Iu5mPYmuyoPnzJ/4PS33jSPDLrBJUlxBQUpEWb2Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lUS70TBfgwiHIZrnIUBiHHmLnUogVkZM8lmmmvy5RN0St0oclcCNj69HOGicE7/IAIr9ZnFtqwPd86wWitjzbzgEPo2xQGwOLwHKbVb6HFD6lSJLkB86v1JC1ng1HglLksM8lZRFJyrMGsHd8maShV+vsLyIdCiQ0xLPikY80zH/4P1yBG/fSHnkrKYd+oGdbqvrDypbU6Z5gbT0zjPwwBOGEevC7iaTTqJNotte+xhY//bobQQXkxvcn6N2SlcSJRAUyxUWediK112D3OZnmMPvtifuRJmqSUmBG8xqsx8fAXncKRiQltufTfHECLbq/ezY3Orwf0pubtZJYEbIdA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 27 Oct 2026 09:39:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHdZUVvbuj2+I/wmEeMfHolzOWTxrcPwg+AgAFhaAA=
- Thread-topic: [PATCH v1 0/3] vpci/msix: separate out common MSI-X code
On 10/26/26 2:34 PM, Jan Beulich wrote:
> On 26.10.2026 13:27, Mykyta Poturai wrote:
>> This is preparatory work to make vPCI MSI-X functional on Arm. Split the
>> vPCI MSI-X code so that intercepting the MSI-X table and PBA stays x86
>> only,
>
> This likely is related to peculiarities of Arm's interrupt handling, yet
> on the surface I can't see why not intercepting MSI-X table accesses
> would be safe. Would it be possible to extend background here a little?
>
Hi,
On Arm most of the work is done by the ITS, so the only thing the device
needs to write to the doorbell register is the EventID. Interrupt
translation is fully configured in the ITS; it will reject invalid
EventIDs and also has a sideband DeviceID, so misconfigured devices
cannot trigger each other's interrupts. Memory-wise everything is gated
by the IOMMU, so a wrong doorbell address would not pose any risk either.
So there is no need or benefit in translating anything here.
>> while the MSI-X capability handling becomes common. No functional
>> change intended.
>>
>> This is a continuation of work done by Rahul from February 2022[1].
>>
>> The approach is inverted, instead of moving out the x86 parts, move out
>> the common ones that will be needed on Arm. Subsequent arm patches for
>> reference can be found here[2].
>>
>> [1]
>> https://lore.kernel.org/xen-devel/cover.1644937405.git.rahul.singh@xxxxxxx/T/#t
>> [2] https://github.com/stewdk/xen/tree/pcie-passthrough-arm-vpci-v26
>>
>> Rahul Singh (1):
>> vpci/msix: move helpers to common
>>
>> Stewart Hildebrand (2):
>> vpci/msix: move msix region removal to msix.c
>> vpci/msix: move common msix code to common file
>>
>> xen/arch/x86/include/asm/msi.h | 21 ---
>> xen/arch/x86/msi.c | 2 +-
>> xen/drivers/passthrough/amd/iommu.h | 2 +-
>> xen/drivers/vpci/Makefile | 6 +-
>> xen/drivers/vpci/header.c | 30 +----
>> xen/drivers/vpci/msi.c | 3 +-
>> xen/drivers/vpci/msix.c | 197 ++++++---------------------
>> xen/drivers/vpci/msix_common.c | 202 ++++++++++++++++++++++++++++
>
> Nit: New file's names want to use dashes in favor of underscores.
>
> Jan
|