[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH]Add MSI support to PV_dom0
Jeremy, attached is basic MSI support to PV_dom0. Please have a look on it. Thanks Yunhong Jiang The pci_wrapper.patch add some hook to pci_bus_type, so that Xen will be notified when a PCI device is added to system. Makefile | 2 - pci_wrap.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) The enable_msi.patch add the MSI support to dom0, basically it just allocate irq from Xen irq name space. arch/x86/include/asm/xen/pci.h | 17 +++++++ arch/x86/kernel/apic/io_apic.c | 22 +++++++-- arch/x86/xen/apic.c | 1 drivers/xen/events.c | 91 +++++++++++++++++++++++++++++++++++++++- include/xen/interface/physdev.h | 59 +++++++++++++++++++++++++ 5 files changed, 182 insertions(+), 8 deletions(-) The reenable_msi.patch just remove original function that disable MSI in xen environment. arch/x86/xen/apic.c | 2 -- drivers/pci/pci.h | 2 ++ include/linux/pci.h | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) Notice: a) Currently the PCI save/restore is broken. The reason is because pci_restore_msi_state() in "drivers/pci/msi.c" will try to restore the MSI config depends on device's msi msg information (i.e. content of msi_desc->msg). However, that information is wrong in Xen environment because Xen HV owns MSI. I'm still trying to find a method to achieve the save/restore without touch the common msi.c code, any suggestion is welcome. b) I notice pci frontend is in a branch. But to support pci frontend without touch common PCI function is difficult, I'm still considering it. c) I'm not sure if xen's irq space should be same as pirq. Basically I think irq is dom0 internal structure, while PIRQ is interface between Xen HV/dom0. But seems current implementation think these two items are same. I didn't try to change it, but that may need improvement. Attachment:
enable_msi.patch Attachment:
pci_wrapper.patch Attachment:
reenable_msi.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |