Skip to content

x86/Hyper-V/IOMMU: Add Hyper-V IOMMU driver to support x2apic mode

[email protected] linux-hyperv linux-iommu lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 3 repliesIn review
  2. v53 patches 2 repliesSuperseded
  3. v43 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches8 repliesSuperseded
v23 patches3 repliesSuperseded
v13 patches14 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/Hyper-V: Set x2apic destination mode to physical when x2apic is availablearch/x86/kernel/cpu/mshyperv.c+12 -01 reply
2/3IOMMU/Hyper-V: Add Hyper-V stub IOMMU driverdrivers/iommu/Kconfig drivers/iommu/Makefile drivers/iommu/hyperv-iommu.c +2 more+210 -01 reply
3/3MAINTAINERS: Add Hyper-V IOMMU driver into Hyper-V CORE AND DRIVERS scopeMAINTAINERS+1 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchThomas GleixnerMichael Kelley
1/3R-b R-b R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH V6 0/3] x86/Hyper-V/IOMMU: Add Hyper-V IOMMU driver to support x2apic mode

From: Lan Tianyu <[email protected]>

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 patchset 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. X2APIC destination mode is set to physical by PATCH 1 when X2APIC is available. Hyper-V IOMMU driver will scan cpu 0~255 and set cpu into IO-APIC MAX cpu affinity cpumask if its APIC ID is 8-bit. Driver creates a Hyper-V irq domain to limit IO-APIC interrupts' affinity and make sure cpus assigned with IO-APIC interrupt are in the scope of IO-APIC MAX cpu affinity.

Lan Tianyu (3):
x86/Hyper-V: Set x2apic destination mode to physical when x2apic is
available
HYPERV/IOMMU: Add Hyper-V stub IOMMU driver
MAINTAINERS: Add Hyper-V IOMMU driver into Hyper-V CORE AND DRIVERS
scope

 MAINTAINERS                    |   1 +
 arch/x86/kernel/cpu/mshyperv.c |  12 +++
 drivers/iommu/Kconfig          |   9 ++
 drivers/iommu/Makefile         |   1 +
 drivers/iommu/hyperv-iommu.c   | 196 +++++++++++++++++++++++++++++++++++++++++
 drivers/iommu/irq_remapping.c  |   3 +
 drivers/iommu/irq_remapping.h  |   1 +
 7 files changed, 223 insertions(+)
 create mode 100644 drivers/iommu/hyperv-iommu.c
Signature · 1 line
2.7.4