]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Revert "contrib/vhost-user-blk: fix the compilation issue"
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 12 Feb 2019 14:06:19 +0000 (15:06 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 21 Feb 2019 17:28:41 +0000 (12:28 -0500)
Commit a56de056c91f8 squashed the following two unrelated commits
at once:

- "contrib/vhost-user-blk: fix the compilation issue"
  (Message-Id: 1547615970-23545-2-git-send-email-changpeng.liu@intel.com)
- "i386/kvm: ignore masked irqs when update msi routes"
  (Message-Id: 20190116030815.27273-5-peterx@redhat.com)

While the git history remains bisectable, having a commit that changes
MSI/MSIX code but describes it as "fix vhost-user-blk compilation" is
rather confusing.
Revert the offending commit to properly apply both patches separately.

Reported-by: Peter Xu <peterx@redhat.com>
Fixes: a56de056c91f8
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190212140621.17009-2-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
contrib/vhost-user-blk/vhost-user-blk.c
target/i386/kvm.c

index 43583f26596c5865f74c2ae10a67b8bddc21ebce..5c2092e13ade7d9d99c7cec1bf22d4dcb4844ef9 100644 (file)
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "contrib/libvhost-user/libvhost-user.h"
 
-#if defined(__linux__)
-#include <linux/fs.h>
-#include <sys/ioctl.h>
-#endif
 
 struct virtio_blk_inhdr {
     unsigned char status;
@@ -525,7 +521,7 @@ vub_get_blocksize(int fd)
 
 #if defined(__linux__) && defined(BLKSSZGET)
     if (ioctl(fd, BLKSSZGET, &blocksize) == 0) {
-        return blocksize;
+        return blocklen;
     }
 #endif
 
index beae1b99daba0a51f02ebca4eeece8df1fcea7ac..9af4542fb8a8d0bfbf5535a0d7b9e826e75f2d53 100644 (file)
@@ -3894,7 +3894,7 @@ static QLIST_HEAD(, MSIRouteEntry) msi_route_list = \
 static void kvm_update_msi_routes_all(void *private, bool global,
                                       uint32_t index, uint32_t mask)
 {
-    int cnt = 0, vector;
+    int cnt = 0;
     MSIRouteEntry *entry;
     MSIMessage msg;
     PCIDevice *dev;
@@ -3902,19 +3902,11 @@ static void kvm_update_msi_routes_all(void *private, bool global,
     /* TODO: explicit route update */
     QLIST_FOREACH(entry, &msi_route_list, list) {
         cnt++;
-        vector = entry->vector;
         dev = entry->dev;
-        if (msix_enabled(dev) && !msix_is_masked(dev, vector)) {
-            msg = msix_get_message(dev, vector);
-        } else if (msi_enabled(dev) && !msi_is_masked(dev, vector)) {
-            msg = msi_get_message(dev, vector);
-        } else {
-            /*
-             * Either MSI/MSIX is disabled for the device, or the
-             * specific message was masked out.  Skip this one.
-             */
+        if (!msix_enabled(dev) && !msi_enabled(dev)) {
             continue;
         }
+        msg = pci_get_msi_message(dev, entry->vector);
         kvm_irqchip_update_msi_route(kvm_state, entry->virq, msg, dev);
     }
     kvm_irqchip_commit_routes(kvm_state);