|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] Refactor msi/msix restore code Part2
On 2013-07-25 20:25, Konrad Rzeszutek Wilk wrote: Non business of guest kernel, this patch is fixing driver load issue in dom0.On Thu, Jul 25, 2013 at 02:52:00PM +0800, Zhenzhong Duan wrote:On 2013-07-24 21:46, Konrad Rzeszutek Wilk wrote:On Wed, Jul 24, 2013 at 11:08:10AM +0800, Zhenzhong Duan wrote:xen_initdom_restore_msi_irqs trigger a hypercall to restore addr/data/mask in dom0. It's better to do the same for default_restore_msi_irqs in baremetal. Move restore of mask in default_restore_msi_irqs, this could avoid mask restored twice in dom0, once in hypercall, the other in kernel.Why not remove the hypercall then?If removed, msi entry couldn't be restored, such as pci_reset_function who will reset pci registers.I did not read your email first time correctly. You are saying that we restore it twice in the host kernel (aka dom0), once in the hypervisor (b/c the guest tries to do MSI-X write and it ends up in the hypervisor), and then we also do it in the guest kernel? Driver qlcnic called pci_reset_function during init. The call path: pci_reset_function->pci_restore_state->__pci_restore_msix_state->arch_restore_msi_irqs-> xen_initdom_restore_msi_irqs->PHYSDEVOP_restore_msi hypercallFirst mask restore is in xen_initdom_restore_msi_irqs->PHYSDEVOP_restore_msi hypercall Second restore is __pci_restore_msix_state->msix_mask_irq(entry, entry->masked) Mask bits are under full control of xen, and the entry->masked in dom0 kernel is invalid. We restore an invalid value to mask register could mask the msix interrupt. The first restore in hypercall is needed, and second restore should be removed for dom0 But baremetal need that restore, so I move it in default_restore_msi_irqs which is the func for baremetal.That is a lot of duplicate calls.Or alter the function to detect whether the restore of the mask has occurred?Then we need to add the check for dom0 only.I am not sure I completly follow this. Is the reason for the lost of interrupt b/c one of those four MSI-X writes ends up masking and the subsequent writes end up with invalid data? Without that, qlcnic driver calling pci_reset_function will lost interrupt in dom0.But if you pass said PCI device to a guest there is no need for the interrupts to go to the host (dom0). They should go to the hypervisor which will deliever them to the guest. Is that what you meant by 'in dom0' ? Yes _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |