WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH][RFC] Support S3 for MSI interrupt in latest kernel dom0
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Fri, 19 Dec 2008 18:39:42 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Fri, 19 Dec 2008 02:40:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <494B858C.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4949294A.76E4.0078.0@xxxxxxxxxx> <C56ED104.2057C%keir.fraser@xxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098401C4BBA925@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <494A0ACB.76E4.0078.0@xxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098401C4C330D5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <494B858C.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclhxKF2D6ZKmmkgQZqCPSHH0eM7vwAAA4qA
Thread-topic: [PATCH][RFC] Support S3 for MSI interrupt in latest kernel dom0
Yes, I tried it in Sles11 RC1, but some changes needed both for this patch and 
for the kernel, including:

a) In this patch, it call pci_get_pdev and protected by pcidevs_lock, while in 
SLES11, it will be pci_lock_pdev() and get protected by pci_dev's lock.

b) In .27 kernel,  current pci_restore_msi_state() will call 
__pci_restore_msix_state/__pci_restore_msi_state one by one, since we now 
passed the bus/devfn to Xen, so only a hypercall needed in 
pci_restore_msi_state() and no distinguish for msi/msix anymore. It is 
something like following:

static int msi_restore_msi(struct pci_dev *dev)
{
        struct physdev_restore_msi restore_msi;
        int rc;

        restore_msi.bus = dev->bus->number;
        restore_msi.devfn = dev->devfn;
        if ((rc = HYPERVISOR_physdev_op(PHYSDEVOP_restore_msi, &restore_msi)))
                printk(KERN_WARNING "restore msi failed\n");

        return rc;
}

void pci_restore_msi_state(struct pci_dev *dev)
{
        msi_restore_msi(dev);
}

At least it works for my AHCI mode disk and my e1000 NIC.

Thanks
Yunhong Jiang

Jan Beulich <mailto:jbeulich@xxxxxxxxxx> wrote:
>>>> "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> 19.12.08 11:10 >>>
>> 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.
> 
> Looks fine to me - did you try it with a patched .27 kernel?
> 
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel