Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > aadbe78a25743146bb784eee19f007c5 > files > 298

kvm-83-164.el5_5.9.src.rpm

From 6916c263661e85dfc93cb3f15f66fb830df9f322 Mon Sep 17 00:00:00 2001
From: Izik Eidus <ieidus@redhat.com>
Date: Wed, 27 May 2009 18:21:14 +0300
Subject: [PATCH 14/14] fix wrong bios pci mapping for large slots (Bug 499432)

Izik Eidus wrote:
>
> Thanks.
Opss, last patch included unrelevent code...

Please use this patch.

Thanks.

>From 283aae2c88f20d9525a3d453d9c5f88c4752a359 Mon Sep 17 00:00:00 2001
From: Izik Eidus <ieidus@redhat.com>
Date: Wed, 27 May 2009 17:15:38 -0400
Subject: [PATCH] bochs bios: fix wrong pci memory mapping for pci slots above 64mb (bug 499432)

In cases of slots above or equal to 64mb bochs-bios was using varible named
pci_bigmem_addr to map the addresses, the problem was that this varible was
set to be the ram_size of qemu, and in case of big memory guests, this ram_size
is 0xc0000... or in mainline 0xe0000... (just before the memory hole)
this calculation does not take into account the vga physical mapping at 0xc00...
or 0xe000.. in mainline.

this break spice with big memory beacuse spice use large pci slots.

This code seems uneeded to kvm so i removed it

Signed-off-by: Izik Eidus <ieidus@redhat.com>
Message-ID: <4A1D5A6A.9050601@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Obsoletes: <4A1D58E3.5060004@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Dor Laor <dlaor@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Yaniv Kamay <ykamay@redhat.com>
Bugzilla: 503793
---
 bios/rombios32.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/bios/rombios32.c b/bios/rombios32.c
index f1e1834..b049487 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -696,7 +696,6 @@ typedef struct PCIDevice {
 
 static uint32_t pci_bios_io_addr;
 static uint32_t pci_bios_mem_addr;
-static uint32_t pci_bios_bigmem_addr;
 /* host irqs corresponding to PCI irqs A-D */
 static uint8_t pci_irqs[4] = { 10, 10, 11, 11 };
 static PCIDevice i440_pcidev;
@@ -981,8 +980,6 @@ static void pci_bios_init_device(PCIDevice *d)
                 size = (~(val & ~0xf)) + 1;
                 if (val & PCI_ADDRESS_SPACE_IO)
                     paddr = &pci_bios_io_addr;
-                else if (size >= 0x04000000)
-                    paddr = &pci_bios_bigmem_addr;
                 else
                     paddr = &pci_bios_mem_addr;
                 *paddr = (*paddr + size - 1) & ~(size - 1);
@@ -1041,9 +1038,6 @@ void pci_bios_init(void)
 {
     pci_bios_io_addr = 0xc000;
     pci_bios_mem_addr = 0xc0000000 + 0x1000000;
-    pci_bios_bigmem_addr = ram_size;
-    if (pci_bios_bigmem_addr < 0x90000000)
-        pci_bios_bigmem_addr = 0x90000000;
 
     pci_for_each_device(pci_bios_init_bridges);
 
-- 
1.6.3.rc4.29.g8146