• D
    PCI: hv: Use effective affinity mask · 79aa801e
    Dexuan Cui 提交于
    The effective_affinity_mask is always set when an interrupt is assigned in
    __assign_irq_vector() -> apic->cpu_mask_to_apicid(), e.g. for struct apic
    apic_physflat: -> default_cpu_mask_to_apicid() ->
    irq_data_update_effective_affinity(), but it looks d->common->affinity
    remains all-1's before the user space or the kernel changes it later.
    
    In the early allocation/initialization phase of an IRQ, we should use the
    effective_affinity_mask, otherwise Hyper-V may not deliver the interrupt to
    the expected CPU.  Without the patch, if we assign 7 Mellanox ConnectX-3
    VFs to a 32-vCPU VM, one of the VFs may fail to receive interrupts.
    Tested-by: NAdrian Suhov <v-adsuho@microsoft.com>
    Signed-off-by: NDexuan Cui <decui@microsoft.com>
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: NJake Oshins <jakeo@microsoft.com>
    Cc: stable@vger.kernel.org
    Cc: Jork Loeser <jloeser@microsoft.com>
    Cc: Stephen Hemminger <sthemmin@microsoft.com>
    Cc: K. Y. Srinivasan <kys@microsoft.com>
    79aa801e
pci-hyperv.c 73.1 KB