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

"IOMMU modes of operation" - meeting notes


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Thu, 22 Sep 2022 10:48:54 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=wW5M5FQbI2JEbOjFtRzhDqx08LEuavkzzBCA1+dCRPU=; b=i4ihtD+QlNJQDWZWR3j73T0GtFId/bTM9yI3zaCUfMwKudm+txrWK89Vmm0ufuwTS5QQw28LBtOljPQj+MJ5S5wwuzzkfEge/+86O7Zvu5yDCeMXocrO+fyfiA6BoebmRZRJatum6BoLGsLvT+sU/dRvgN3BdAKiKn7c5Z+hMCf9YqZ8WcZ4wQAA0CLezdlMxdJFaSef/vR9wo7zk9YX4zoBgsd84DztKdlZCgedx79/eUdLXQ7OlPWPhOdjsDuLMCwZ6L4ANmAhXFps9Oc2sqE4PkIjge4TY8AtNr4H5g98hVe/y9Lmbq7oHhCPxqZejDrgM9JAvclE5i6QVtjO4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WMBIw5BDxQWPq4FucLTcjG2J66qUBVcL3b6+cyDC/LvxwF2cy053F8zWY6QncPENTruzJZzsw1QkoydR4I/CQKJd0/DjGI7vVH7qUBI/kfQR0ACWiRGiofGXHRvt9s7VcHu5YBrzU4TB7rdChedxoqCHC8OxxATZpQk0W6ubJFnJDlvwKHIjRHmGCGpqSXz/HngelGNPuEtMYR/Rj8Gyy0IjP2YHF2MwwXE9B5JkaC8kJf02KEZQLruRkJs4OrssUUb90SBqmZr7BmVZv+f+hvtLkGnoE88S/TRiFR1gHHq8B3P1jmsbQKd5OK38EkgB4frys7MPmx9QhAaasaIqPQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Delivery-date: Thu, 22 Sep 2022 09:49:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi All,

PFA the meeting notes as follows.

Kind regards,

Ayan

The way how IOMMU works is not best. Do we change it ? Means people using command line will be impacts. On Inten, IOMMU does dma and interrupt translation. Can it be done independently. For passthrough we need dma translation. IRQ translation can be done different. Disagreement in community. We need to resolve the disagreement in command line option

Iommu=off “ in CMD means everything off

iommu_remap=off means IRQ remapping off and DMA remapping is on

Do we need to an option to do IRQ mapping and not DMA mapping.

Bertrand - Is the option applicable to both X86 and Arm applicable ?

Jan - Yes, this should impact all architecture.

Bertrand - Linux option “”iommu=off” do ?

Jan - It varies. Sometime means interrupt remapping is ON. On Arm, IRQ remapping differs from X86. There is no remapping register.

Rahul - In Arm, IRQ remapping is done by mapping one door bell register. Then everything is done by hw.

Bertrand - This applies to only MSI. Interupt remapping has no meaning on Arm.

Jan - In such an environment, this is an x86 specific option that irq remapping is on.

Bertrand - The interrupt remapping problem does not exist on Arm. So keep the current option and have the necessary feature for x86.

Jan - Split option have no meaning. So IRQ off and DMA off applies only on X86.  The split option (irc remapping) should be unavailable for Arm.
Have people using X86 for chasing it ?

XXX - iommu = off should switch off everything (DMA + IRQ). Then have specific option.

Jan - IRQ on and DMA off is useful. To boot with extra requirement. There is a confusion whether irq remapping is off or dma remapping is off. On passthrough system you don’t need iommu (except for irq remapping). The address space is 1-1 mapping. Intrusive / Extrusive mode.

Jan - PV Dom0 case, this is applicable as translation is done

Roger - No need to discuss more.

Jan - We need to clear of a semantic change when “iommu=off”.
We should change variable from iommu_enable to iommu_dma_map and iommu_entry_map.

Roger - No need for a separate top level irq remapping.

Jan - iommu=dma_remap=off

Roger - Global option off and irq option is on.

iommu=off will make dma and irc off

Iommu=dma_remap=off, irq_remap=on  (We will introduce the split option)

Jan - iommu is a top level option with many sub options. IRQ remapping option will not be exposed to Arm. DMA_remap will be used in the everyone. “iommu=enabled” is ambiguous.

Bertrand - RISCV is similar to Arm. So this should be x86 specific iommu option.

Jan - The common code should explicitly specify dma remapping or irq remapping . The other architecture should say whether dma remapping or irq remapping is apllicable,

Bertrand - This change will impact Arm code,

Jan - If the severe code changes in Arm, then we will reconsider.

Jurgen - Common code should be architecture agnostic.

XXX - We could add defines in x86 code.

Jurgen/Jan - In common code, we should be very explicit. No ambiguous check anywhere.

Bertrand - iommu.c should be renamed to iommu_dma.c ??

Jan - We could do that, there is no bad behaviour when keeping the name. We will prevent irq mapping  is added in common code. However, the common variable should not be ambiguous.

Kind regards,

Ayan




 


Rackspace

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