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] fix PV MSI-X

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] fix PV MSI-X
From: "Zhao, Yu" <yu.zhao@xxxxxxxxx>
Date: Thu, 4 Sep 2008 21:57:13 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 04 Sep 2008 06:57:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C4E5989D.26CB4%keir.fraser@xxxxxxxxxxxxx>
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: <7A25B56E4BE99C4283EB931CD1A40E11017B3CE1@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C4E5989D.26CB4%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckOhWnJYvgtpfkCTiGEGe/mxpsNlwAB6zcNAACpfkA=
Thread-topic: [PATCH] fix PV MSI-X
A bee in a hurry made stupid mistake... did test following patch this time :-)

Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>

diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c   Mon Sep 01 10:46:19 
2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c   Thu Sep 04 22:01:01 
2008 -0400
@@ -37,22 +37,26 @@
 int pciback_enable_msix(struct pciback_device *pdev,
                struct pci_dev *dev, struct xen_pci_op *op)
 {
+       int i;
        int result;
+       struct msix_entry entries[op->value];
 
        if (op->value > SH_INFO_MAX_VEC)
                return -EINVAL;
-       else {
-               struct msix_entry entries[op->value];
-               int i;
 
-               for (i = 0; i < op->value; i++) {
-                       entries[i].entry = op->msix_entries[i].entry;
-                       entries[i].vector = op->msix_entries[i].vector;
-               }
+       for (i = 0; i < op->value; i++) {
+               entries[i].entry = op->msix_entries[i].entry;
+               entries[i].vector = op->msix_entries[i].vector;
+       }
 
-               result = pci_enable_msix(dev, entries, op->value);
-               op->value = result;
+       result = pci_enable_msix(dev, entries, op->value);
+
+       for (i = 0; i < op->value; i++) {
+               op->msix_entries[i].entry = entries[i].entry;
+               op->msix_entries[i].vector = entries[i].vector;
        }
+
+       op->value = result;
 
        return result;
 }

>-----Original Message-----
>From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
>Sent: Thursday, September 04, 2008 8:52 PM
>To: Zhao, Yu
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [PATCH] fix PV MSI-X
>
>You haven't put brackets around what is presumably supposed to be a
>multi-statement block. Did you test this patch? Please send one that at
>least passes casual observation. :-)
>
> -- Keir
>
>On 4/9/08 12:57, "Zhao, Yu" <yu.zhao@xxxxxxxxx> wrote:
>
>> MSI-X for PV was broken, make it work again.
>>
>> diff -r 8566781df55e drivers/xen/pciback/conf_space_capability_msi.c
>> --- a/drivers/xen/pciback/conf_space_capability_msi.c Mon Sep 01 10:46:19
>2008
>> +0100
>> +++ b/drivers/xen/pciback/conf_space_capability_msi.c Thu Sep 04 19:26:31
>2008
>> -0400
>> @@ -51,6 +51,11 @@
>> }
>>
>> result = pci_enable_msix(dev, entries, op->value);
>> +
>> +  for (i = 0; i < op->value; i++)
>> +   op->msix_entries[i].entry = entries[i].entry;
>> +   op->msix_entries[i].vector = entries[i].vector;
>> +
>> op->value = result;
>> }
>>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>