diff options
author | Wei Liu <wei.liu@kernel.org> | 2021-02-03 18:04:34 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-02-11 11:47:07 +0300 |
commit | e39397d1fd6851bef4dfb63a631b8e15d1f43329 (patch) | |
tree | 3307af33016b6666afee279c70d64688e16e8f65 /arch/x86/hyperv/hv_init.c | |
parent | 466a9c3f88d04152ca83e840ca940c5f700402ac (diff) | |
download | linux-e39397d1fd6851bef4dfb63a631b8e15d1f43329.tar.xz |
x86/hyperv: implement an MSI domain for root partition
When Linux runs as the root partition on Microsoft Hypervisor, its
interrupts are remapped. Linux will need to explicitly map and unmap
interrupts for hardware.
Implement an MSI domain to issue the correct hypercalls. And initialize
this irq domain as the default MSI irq domain.
Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Co-Developed-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20210203150435.27941-16-wei.liu@kernel.org
Diffstat (limited to 'arch/x86/hyperv/hv_init.c')
-rw-r--r-- | arch/x86/hyperv/hv_init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index aeea8fbf3c23..b81047dec1da 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -511,6 +511,15 @@ void __init hyperv_init(void) BUG_ON(hv_root_partition && hv_current_partition_id == ~0ull); +#ifdef CONFIG_PCI_MSI + /* + * If we're running as root, we want to create our own PCI MSI domain. + * We can't set this in hv_pci_init because that would be too late. + */ + if (hv_root_partition) + x86_init.irqs.create_pci_msi_domain = hv_create_pci_msi_domain; +#endif + return; remove_cpuhp_state: |