[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DM5PR2101MB0918926EDE4D256EC16637A7D77F0@DM5PR2101MB0918.namprd21.prod.outlook.com>
Date: Fri, 22 Feb 2019 15:58:44 +0000
From: Michael Kelley <mikelley@...rosoft.com>
To: Tianyu Lan <Tianyu.Lan@...rosoft.com>
CC: Tianyu Lan <Tianyu.Lan@...rosoft.com>,
"joro@...tes.org" <joro@...tes.org>,
"mchehab+samsung@...nel.org" <mchehab+samsung@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"nicolas.ferre@...rochip.com" <nicolas.ferre@...rochip.com>,
"arnd@...db.de" <arnd@...db.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
KY Srinivasan <kys@...rosoft.com>,
vkuznets <vkuznets@...hat.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"sashal@...nel.org" <sashal@...nel.org>,
"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: RE: [PATCH V5 2/3] HYPERV/IOMMU: Add Hyper-V stub IOMMU driver
From: Tianyu.Lan@...rosoft.com <Tianyu.Lan@...rosoft.com> Sent: Friday, February 22, 2019 4:12 AM
>
> On the bare metal, enabling X2APIC mode requires interrupt remapping
> function which helps to deliver irq to cpu with 32-bit APIC ID.
> Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
> MSI protocol already supports to deliver interrupt to the CPU whose
> virtual processor index is more than 255. IO-APIC interrupt still has
> 8-bit APIC ID limitation.
>
> This patch is to add Hyper-V stub IOMMU driver in order to enable
> X2APIC mode successfully in Hyper-V Linux guest. The driver returns X2APIC
> interrupt remapping capability when X2APIC mode is available. Otherwise,
> it creates a Hyper-V irq domain to limit IO-APIC interrupts' affinity
> and make sure cpus assigned with IO-APIC interrupt have 8-bit APIC ID.
>
> Define 24 IO-APIC remapping entries because Hyper-V only expose one
> single IO-APIC and one IO-APIC has 24 pins according IO-APIC spec(
> https://pdos.csail.mit.edu/6.828/2016/readings/ia32/ioapic.pdf).
>
> Signed-off-by: Lan Tianyu <Tianyu.Lan@...rosoft.com>
> ---
> Change since v4:
> - Fix the loop of scan cpu's APIC id
>
> Change since v3:
> - Make Hyper-V IOMMU as Hyper-V default driver
> - Fix hypervisor_is_type() input parameter
> - Check possible cpu numbers during scan 0~255 cpu's apic id.
>
> Change since v2:
> - Improve comment about why save IO-APIC entry in the irq chip data.
> - Some code improvement.
> - Improve statement in the IOMMU Kconfig.
>
> Change since v1:
> - Remove unused pr_fmt
> - Make ioapic_ir_domain as static variable
> - Remove unused variables cfg and entry in the hyperv_irq_remapping_alloc()
> - Fix comments
Reviewed-by: Michael Kelley <mikelley@...rosoft.com>
Powered by blists - more mailing lists