qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] vfio updates
@ 2014-08-05 19:44 Alex Williamson
  2014-08-05 19:44 ` [Qemu-devel] [PULL 2/2] vfio: Don't cache MSIMessage Alex Williamson
  2014-08-07 11:20 ` [Qemu-devel] [PULL 0/2] vfio updates Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Williamson @ 2014-08-05 19:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.williamson

The following changes since commit 69f87f713069f1f70f86cb65883f7d43e3aa21de:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140804' into staging (2014-08-04 15:01:38 +0100)

are available in the git repository at:


  git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20140805.0

for you to fetch changes up to 9b3af4c0e40f14b5173ad6e2d9fcc376207ec1dd:

  vfio: Don't cache MSIMessage (2014-08-05 13:05:57 -0600)

----------------------------------------------------------------
VFIO patches: Fix MSI-X vector expansion, remove MSI/X message caching

----------------------------------------------------------------
Alex Williamson (2):
      vfio: Fix MSI-X vector expansion
      vfio: Don't cache MSIMessage

 hw/misc/vfio.c | 46 +++++++++++++++++++++++++++++++---------------
 1 file changed, 31 insertions(+), 15 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 2/2] vfio: Don't cache MSIMessage
  2014-08-05 19:44 [Qemu-devel] [PULL 0/2] vfio updates Alex Williamson
@ 2014-08-05 19:44 ` Alex Williamson
  2014-08-07 11:20 ` [Qemu-devel] [PULL 0/2] vfio updates Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2014-08-05 19:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.williamson

Commit 40509f7f added a test to avoid updating KVM MSI routes when the
MSIMessage is unchanged and f4d45d47 switched to relying on this
rather than doing our own comparison.  Our cached msg is effectively
unused now.  Remove it.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 hw/misc/vfio.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index e88b610..ba08adb 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -132,7 +132,6 @@ typedef struct VFIOMSIVector {
     EventNotifier interrupt;
     EventNotifier kvm_interrupt;
     struct VFIODevice *vdev; /* back pointer to device */
-    MSIMessage msg; /* cache the MSI message so we know when it changes */
     int virq;
     bool use;
 } VFIOMSIVector;
@@ -744,7 +743,6 @@ static void vfio_add_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage *msg,
         return;
     }
 
-    vector->msg = *msg;
     vector->virq = virq;
 }
 
@@ -760,7 +758,6 @@ static void vfio_remove_kvm_msi_virq(VFIOMSIVector *vector)
 static void vfio_update_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage msg)
 {
     kvm_irqchip_update_msi_route(kvm_state, vector->virq, msg);
-    vector->msg = msg;
 }
 
 static int vfio_msix_vector_do_use(PCIDevice *pdev, unsigned int nr,
@@ -939,6 +936,7 @@ retry:
 
     for (i = 0; i < vdev->nr_vectors; i++) {
         VFIOMSIVector *vector = &vdev->msi_vectors[i];
+        MSIMessage msg = msi_get_message(&vdev->pdev, i);
 
         vector->vdev = vdev;
         vector->virq = -1;
@@ -951,13 +949,11 @@ retry:
         qemu_set_fd_handler(event_notifier_get_fd(&vector->interrupt),
                             vfio_msi_interrupt, NULL, vector);
 
-        vector->msg = msi_get_message(&vdev->pdev, i);
-
         /*
          * Attempt to enable route through KVM irqchip,
          * default to userspace handling if unavailable.
          */
-        vfio_add_kvm_msi_virq(vector, &vector->msg, false);
+        vfio_add_kvm_msi_virq(vector, &msg, false);
     }
 
     /* Set interrupt type prior to possible interrupts */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] vfio updates
  2014-08-05 19:44 [Qemu-devel] [PULL 0/2] vfio updates Alex Williamson
  2014-08-05 19:44 ` [Qemu-devel] [PULL 2/2] vfio: Don't cache MSIMessage Alex Williamson
@ 2014-08-07 11:20 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-08-07 11:20 UTC (permalink / raw)
  To: Alex Williamson; +Cc: QEMU Developers

On 5 August 2014 20:44, Alex Williamson <alex.williamson@redhat.com> wrote:
> The following changes since commit 69f87f713069f1f70f86cb65883f7d43e3aa21de:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140804' into staging (2014-08-04 15:01:38 +0100)
>
> are available in the git repository at:
>
>
>   git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20140805.0
>
> for you to fetch changes up to 9b3af4c0e40f14b5173ad6e2d9fcc376207ec1dd:
>
>   vfio: Don't cache MSIMessage (2014-08-05 13:05:57 -0600)
>
> ----------------------------------------------------------------
> VFIO patches: Fix MSI-X vector expansion, remove MSI/X message caching

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-07 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 19:44 [Qemu-devel] [PULL 0/2] vfio updates Alex Williamson
2014-08-05 19:44 ` [Qemu-devel] [PULL 2/2] vfio: Don't cache MSIMessage Alex Williamson
2014-08-07 11:20 ` [Qemu-devel] [PULL 0/2] vfio updates Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).