Blame SOURCES/seabios-pci-don-t-map-virtio-1.0-storage-devices-above-4G.patch

60a3a4
From 01549028733315a513b1b5fcc1951fd271e8a531 Mon Sep 17 00:00:00 2001
60a3a4
From: Marcel Apfelbaum <marcel@redhat.com>
60a3a4
Date: Tue, 13 Sep 2016 13:20:45 +0200
60a3a4
Subject: [PATCH] pci: don't map virtio 1.0 storage devices above 4G
60a3a4
60a3a4
RH-Author: Marcel Apfelbaum <marcel@redhat.com>
60a3a4
Message-id: <1473772845-913-1-git-send-email-marcel@redhat.com>
60a3a4
Patchwork-id: 72292
60a3a4
O-Subject: [RHEL-7.3 seabios PATCH V2] pci: don't map virtio 1.0 storage devices above 4G
60a3a4
Bugzilla: 1373154
60a3a4
RH-Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
60a3a4
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
60a3a4
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
60a3a4
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
60a3a4
60a3a4
v1->v2:
60a3a4
  - add the note to the commit message (Gerd)
60a3a4
60a3a4
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1373154
60a3a4
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=11741451
60a3a4
Upstream: Fixed upstream by commit: 0e21548b15 (virtio: pci cfg access)
60a3a4
Tests: Checked the virtio BARs are placed in the 32-bit range and
60a3a4
       the guest boots successfully.
60a3a4
60a3a4
Otherwise SeaBIOS can't access virtio's modern BAR.
60a3a4
60a3a4
Note: It works in the master branch but can't be merged easily
60a3a4
into 1.9 branch, so use this as an interim solution
60a3a4
until we'll rebase to 1.10.
60a3a4
60a3a4
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
60a3a4
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
60a3a4
---
60a3a4
 src/fw/pciinit.c | 7 +++++++
60a3a4
 1 file changed, 7 insertions(+)
60a3a4
60a3a4
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
60a3a4
index 7896600..4ff1262 100644
60a3a4
--- a/src/fw/pciinit.c
60a3a4
+++ b/src/fw/pciinit.c
60a3a4
@@ -650,6 +650,13 @@ static void pci_region_migrate_64bit_entries(struct pci_region *from,
60a3a4
             continue;
60a3a4
         if (entry->dev->class == PCI_CLASS_SERIAL_USB)
60a3a4
             continue;
60a3a4
+        if (entry->dev->vendor == PCI_VENDOR_ID_REDHAT_QUMRANET &&
60a3a4
+            (entry->dev->device == PCI_DEVICE_ID_VIRTIO_BLK_09  ||
60a3a4
+             entry->dev->device == PCI_DEVICE_ID_VIRTIO_BLK_10  ||
60a3a4
+             entry->dev->device == PCI_DEVICE_ID_VIRTIO_SCSI_09 ||
60a3a4
+             entry->dev->device == PCI_DEVICE_ID_VIRTIO_SCSI_10))
60a3a4
+            continue;
60a3a4
+
60a3a4
         // Move from source list to destination list.
60a3a4
         hlist_del(&entry->node);
60a3a4
         hlist_add(&entry->node, last);
60a3a4
-- 
60a3a4
1.8.3.1
60a3a4