thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
0a122b
From c538b7706e6f03a1eae8f11f9f89b9cbee73dbc9 Mon Sep 17 00:00:00 2001
0a122b
From: Laszlo Ersek <lersek@redhat.com>
0a122b
Date: Sat, 11 Jan 2014 18:00:08 +0100
0a122b
Subject: [PATCH 18/22] piix: fix 32bit pci hole
0a122b
0a122b
RH-Author: Laszlo Ersek <lersek@redhat.com>
0a122b
Message-id: <1389463208-6278-19-git-send-email-lersek@redhat.com>
0a122b
Patchwork-id: 56630
0a122b
O-Subject: [RHEL-7.0 qemu-kvm PATCH 18/18] piix: fix 32bit pci hole
0a122b
Bugzilla: 1032346
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Amos Kong <akong@redhat.com>
0a122b
RH-Acked-by: Andrew Jones <drjones@redhat.com>
0a122b
0a122b
From: Gerd Hoffmann <kraxel@redhat.com>
0a122b
0a122b
Make the 32bit pci hole start at end of ram, so all possible address
0a122b
space is covered.
0a122b
0a122b
We used to try and make addresses aligned so they are easier to cover
0a122b
with MTRRs, but since they are cosmetic on KVM, this is probably not
0a122b
worth worrying about.
0a122b
Of course the firmware can use less than that.  Leaving space unused is
0a122b
no problem, mapping pci bars outside the hole causes problems though.
0a122b
0a122b
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
0a122b
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
0a122b
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
(cherry picked from commit ddaaefb4dd427d6d2e41c1cfbe0cd8d8e8d6aad9)
0a122b
0a122b
Conflicts:
0a122b
	hw/i386/pc_piix.c
0a122b
	hw/pci-host/piix.c
0a122b
	include/hw/i386/pc.h
0a122b
0a122b
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
0a122b
---
0a122b
 hw/pci-host/piix.c | 10 +---------
0a122b
 1 file changed, 1 insertion(+), 9 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/pci-host/piix.c |   10 +---------
0a122b
 1 files changed, 1 insertions(+), 9 deletions(-)
0a122b
0a122b
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
0a122b
index 9284c8d..5757b1d 100644
0a122b
--- a/hw/pci-host/piix.c
0a122b
+++ b/hw/pci-host/piix.c
0a122b
@@ -337,15 +337,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state,
0a122b
     f->ram_memory = ram_memory;
0a122b
 
0a122b
     i440fx = I440FX_PCI_HOST_BRIDGE(dev);
0a122b
-    /* Set PCI window size the way seabios has always done it. */
0a122b
-    /* Power of 2 so bios can cover it with a single MTRR */
0a122b
-    if (ram_size <= 0x80000000) {
0a122b
-        i440fx->pci_info.w32.begin = 0x80000000;
0a122b
-    } else if (ram_size <= 0xc0000000) {
0a122b
-        i440fx->pci_info.w32.begin = 0xc0000000;
0a122b
-    } else {
0a122b
-        i440fx->pci_info.w32.begin = 0xe0000000;
0a122b
-    }
0a122b
+    i440fx->pci_info.w32.begin = pci_hole_start;
0a122b
 
0a122b
     memory_region_init_alias(&f->pci_hole, "pci-hole", f->pci_address_space,
0a122b
                              pci_hole_start, pci_hole_size);
0a122b
-- 
0a122b
1.7.1
0a122b