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

Re: [PATCH v10 1/6] xen/domctl: chain SCI handling before IOMMU in assign_device domctl


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Date: Fri, 13 Feb 2026 13:31:07 +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=4T6cb6vWFA6yEHoMdtiibbUpHbFJNfNV1Fc4K2rpetI=; b=n2Soa7sKWT1nibOGr1qtbFm9tR0KDbm5lWPvpFQpR3/ePOaNbHGfiDtxBSP1tSQpLZEdf9vgTXWBO6bEJgukhCOFbhAWMcEjEJEffC1qp1p+zbOdREpWBTn22UEKhVZhNBiJ1ogCw6fjaC0T6y2e5czdJ8Wp7wmj+TXCrFH/xvAzP0DKZXQqtEQPDYtzNaoI9MNOTQRPdjD+cN0PUaCRVtYv5K4lYs9lGYTpLKCLneAkiGPSgKrbv6G8oIsGDVyPm+zZvTNkB5sqm9VwheHvcL3OkZn//HiG/sM0C5hSQvMBwfKU1zJAG+SazYA/+OK+M6LkPiprQseDVJFN1P+W8w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fY2xefEZgViHDGeFoYAbJg+0TgCs/WiHTG+hujh1LD+pQWZyh+JHFqQrsYwrCQMrleERX8fSSbApTL/wjMZrrFBWzw8cBHsy8/BUjoY6jrSX/YaoCN6j/LySlo9c4yr62kgg5/97AeBCRYLCRMjJ5yAgG51Yw6KtMbnmF1SIX3k4QuBop94qkU9iO7CfnJgnoLWBP4hUUg9UeRO74wf3FFVtgX/wbnNOJCvD5KHia2SdjKAd/B4wOMwZ78W7BalFjSzu+7hN5FQapx/eslI0rtU0muZRUhbAKwbiIOAVOek9hNd8J3REiQab71WWusMt43eefpmJHSDz1d3IPLirRw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 13 Feb 2026 13:31:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcnN0TIpWAusmvHEWrF5RBUFLqU7WAlR4AgAALKgA=
  • Thread-topic: [PATCH v10 1/6] xen/domctl: chain SCI handling before IOMMU in assign_device domctl


On 13/02/2026 14:51, Jan Beulich wrote:
> On 13.02.2026 12:37, Oleksii Moisieiev wrote:
>> From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>>
>> Add chained handling of assigned DT devices to support access-controller
>> functionality through SCI framework, so a DT device assign request can be
>> passed to firmware for processing and enabling VM access to the requested
>> device (for example, device power management through SCMI).
>>
>> The SCI access-controller DT device processing is called before the IOMMU
>> path. It runs for any DT-described device (protected or not, and even when
>> the IOMMU is disabled). The IOMMU path remains unchanged for PCI devices;
>> only the DT path is relaxed to permit non-IOMMU devices.
>>
>> This lets xl.cfg:"dtdev" list both IOMMU-protected and non-protected DT
>> devices:
>>
>> dtdev = [
>>      "/soc/video@e6ef0000", <- IOMMU protected device
>>      "/soc/i2c@e6508000", <- not IOMMU protected device
>> ]
>>
>> The change is done in two parts:
>> 1) call sci_do_domctl() in do_domctl() before IOMMU processing. If
>> sci_do_domctl() reports an error other than -ENXIO, treat it as
>> authoritative and skip the IOMMU path. A return of -ENXIO indicates
>> that SCI did not handle the request and is ignored, allowing the
>> existing IOMMU handling to run unchanged;
>> 2) update iommu_do_dt_domctl() to check for dt_device_is_protected() and
>> not fail if DT device is not protected by IOMMU. iommu_do_pci_domctl
>> doesn't need to be updated because iommu_do_domctl first tries
>> iommu_do_pci_domctl (when CONFIG_HAS_PCI) and falls back to
>> iommu_do_dt_domctl only if PCI returns -ENODEV.
>>
>> The new dt_device_is_protected() bypass in iommu_do_dt_domctl only
>> applies to DT-described devices; SCI parameters are carried via DT
>> nodes. PCI devices handled by iommu_do_pci_domctl do not carry DT/SCI
>> metadata in this path, so there is no notion of “SCI parameters on a
>> non-IOMMU-protected PCI device” for it to interpret or to skip. The PCI
>> path should continue to report errors if assignment cannot be performed
>> by the IOMMU layer. So we should leave iommu_do_pci_domctl unchanged; the
>> SCI/DT-specific relaxations belong only in the DT path. Also SCI handling
>> only exists when DT is present.
>>
>> Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx>
> Mind me asking where my A-b went?
>
> Jan
Sorry, missed that... :( Will add in the next patch series...

---
Oleksii

 


Rackspace

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