[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] RE: [PATCH][RFC] Support S3 for MSI interrupt in latest kernel dom0

Attached is the patch with a new hypercall added. Jan/Keir, can you please have 
a look on it? I didn't change the dom0 since it has already implemented 
save/restore logic with dom0's internal data structure. But latest kernel will 
need this.

Because this patch is based in current xen, the pcidevs_lock is still used as 
rw_lock, the below small patch will change that to spin_lock if needed.

Yunhong Jiang

diff -r a020395f3ea3 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Fri Dec 19 18:01:38 2008 +0800
+++ b/xen/arch/x86/msi.c        Fri Dec 19 18:02:31 2008 +0800
@@ -748,7 +748,7 @@ int pci_restore_msi_state(struct pci_dev
     struct msi_desc *entry, *tmp;
     irq_desc_t *desc;
-    ASSERT(rw_is_locked(&pcidevs_lock));
+    ASSERT(spin_is_locked(&pcidevs_lock));
     if (!pdev)
         return -EINVAL;
diff -r a020395f3ea3 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Fri Dec 19 18:01:38 2008 +0800
+++ b/xen/arch/x86/physdev.c    Fri Dec 19 18:02:57 2008 +0800
@@ -429,17 +429,17 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
         ret = -ENODEV;
-        read_lock(&pcidevs_lock);
+        spin_lock(&pcidevs_lock);
         pdev = pci_get_pdev(restore_msi.bus, restore_msi.devfn);
         if (!pdev)
-            read_unlock(&pcidevs_lock);
+            spin_unlock(&pcidevs_lock);
         ret = pci_restore_msi_state(pdev);
-        read_unlock(&pcidevs_lock);
+        spin_unlock(&pcidevs_lock);

Yunhong Jiang

Jan Beulich <mailto:jbeulich@xxxxxxxxxx> wrote:
>>>> "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> 18.12.08 03:24 >>>
>> As for guest side, I assume it will be not complex (Jan may have more
>> estimate), 
> No, it wouldn't be difficult (mostly replacing the map-pirq hypercall with
> whatever the new name would be.
>> but we are not sure if the new hypercall is acceptable for Suse.
> I don't see a problem with this.
> Jan

Attachment: msi_s3_restore.patch
Description: msi_s3_restore.patch

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.