Skip to contentSkip to conversation

use PCI_MSIX_FLAGS on retrieving the MSIX entries

PATCH Applied Wei Yang 5 participants 10 messages Feb 19, 2016 – Feb 24, 2016

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

cover use PCI_MSIX_FLAGS on retrieving the MSIX entries

These two patches replace the PCI_CAP_FLAGS with PCI_MSIX_FLAGS on retrieving the MSIX entries. The change is the same, while I put them in two patches for different author to review.

Wei Yang (2):
vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

 hw/s390x/s390-pci-bus.c |    2 +-
 hw/vfio/pci.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/2 vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

---
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/pci.c +1 -1
index e66c47f..321423b 100644
@@ -1210,7 +1210,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev)
     }
 
     if (pread(fd, &ctrl, sizeof(ctrl),
-              vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) {
+              vdev->config_offset + pos + PCI_MSIX_FLAGS) != sizeof(ctrl)) {
         return -errno;
     }
 
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Quoted 15 lines · On Fri, 19 Feb 2016 15:18:10 +0000 Wei Yang <[email protected]> wrote:

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

---
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/pci.c +0 -0
index e66c47f..321423b 100644

hw/vfio/pci.c static int vfio_msix_early_setup(VFIOPCIDevice *vdev) · line 1216

Quoted 8 lines
hw/vfio/pci.c +1 -1
@@ -1210,7 +1210,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev)
     }
 
     if (pread(fd, &ctrl, sizeof(ctrl),
-              vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) {
+              vdev->config_offset + pos + PCI_MSIX_FLAGS) != sizeof(ctrl)) {
         return -errno;
     }
 

This is certainly trivial, I'll grab it for the respin of yesterday's pull request. Thanks,

Alex

author
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Quoted 20 lines · Alex Williamson
Quoted 17 lines · On Fri, 19 Feb 2016 15:18:10 +0000 Wei Yang <[email protected]> wrote:

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

---
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/pci.c +0 -0
index e66c47f..321423b 100644
@@ -1210,7 +1210,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev)
     }
 
Quoted 9 lines

hw/vfio/pci.c static int vfio_msix_early_setup(VFIOPCIDevice *vdev) · line 1216

Quoted 6 lines
hw/vfio/pci.c +1 -1
     if (pread(fd, &ctrl, sizeof(ctrl),
-              vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) {
+              vdev->config_offset + pos + PCI_MSIX_FLAGS) != sizeof(ctrl)) {
         return -errno;
     }
 

This is certainly trivial, I'll grab it for the respin of yesterday's pull request. Thanks,

Thanks Alex, have a nice weekend :-)

Quoted 2 lines

Alex

Signature · 2 lines
Wei Yang
Help you, Help me
author
#4 lore raw

PATCH 2/2 s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

In reply to Wei Yang

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +1 -1
index 132588b..9d40039 100644
@@ -523,7 +523,7 @@ static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev)
         return 0;
     }
 
-    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_CAP_FLAGS,
+    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_FLAGS,
              pci_config_size(pbdev->pdev), sizeof(ctrl));
     table = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_TABLE,
              pci_config_size(pbdev->pdev), sizeof(table));
Signature · 1 line
1.7.9.5
#5 lore raw

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Quoted 18 lines · Wei Yang

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +0 -0
index 132588b..9d40039 100644

hw/s390x/s390-pci-bus.c static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev) · line 529

Quoted 8 lines
hw/s390x/s390-pci-bus.c +1 -1
@@ -523,7 +523,7 @@ static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev)
         return 0;
     }
 
-    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_CAP_FLAGS,
+    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_FLAGS,
              pci_config_size(pbdev->pdev), sizeof(ctrl));
     table = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_TABLE,
              pci_config_size(pbdev->pdev), sizeof(table));

looks sane.
Yi Min, can you ack/nack?

#6 lore raw

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

于 Mon, 22 Feb 2016 14:15:07 +0100

Quoted 21 lines · Christian Borntraeger
Quoted 20 lines · Wei Yang

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +0 -0
index 132588b..9d40039 100644
@@ -523,7 +523,7 @@ static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev)
         return 0;
     }
 
Quoted 11 lines

hw/s390x/s390-pci-bus.c static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev) · line 529

Quoted 6 lines
hw/s390x/s390-pci-bus.c +1 -1
-    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_CAP_FLAGS,
+    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_FLAGS,
              pci_config_size(pbdev->pdev), sizeof(ctrl));
     table = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_TABLE,
              pci_config_size(pbdev->pdev), sizeof(table));

looks sane.
Yi Min, can you ack/nack?

It looks sane to me. A little change.

author
#7 lore raw

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Quoted 36 lines · Yi Min Zhao

于 Mon, 22 Feb 2016 14:15:07 +0100

Quoted 21 lines · Christian Borntraeger
Quoted 20 lines · Wei Yang

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +0 -0
index 132588b..9d40039 100644
@@ -523,7 +523,7 @@ static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev)
         return 0;
     }
 
Quoted 11 lines

hw/s390x/s390-pci-bus.c static int s390_pcihost_setup_msix(S390PCIBusDevice *pbdev) · line 529

Quoted 6 lines
hw/s390x/s390-pci-bus.c +1 -1
-    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_CAP_FLAGS,
+    ctrl = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_FLAGS,
              pci_config_size(pbdev->pdev), sizeof(ctrl));
     table = pci_host_config_read_common(pbdev->pdev, pos + PCI_MSIX_TABLE,
              pci_config_size(pbdev->pdev), sizeof(table));

looks sane.
Yi Min, can you ack/nack?

Quoted 1 line

It looks sane to me. A little change.

Thanks Yi Min and Christian.

So someone would pick it up?

Signature · 2 lines
Wei Yang
Help you, Help me
#8 lore raw

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

In reply to Wei Yang
Quoted 11 lines · On Fri, 19 Feb 2016 15:18:11 +0000 Wei Yang <[email protected]> wrote:

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to s390-next.

author
#9 lore raw

Re: [Qemu-devel] [PATCH 2/2] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries

Quoted 8 lines · Cornelia Huck
Quoted 5 lines · On Fri, 19 Feb 2016 15:18:11 +0000 Wei Yang <[email protected]> wrote:

Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries.

This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries.

Quoted 8 lines
Quoted 6 lines
CC Cornelia Huck <[email protected]>
CC Christian Borntraeger <[email protected]>
---
 hw/s390x/s390-pci-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to s390-next.

Thanks :-)

Signature · 2 lines
Wei Yang
Help you, Help me