mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
pc: limit 64 bit hole to 2G by default
It turns out that some 32 bit windows guests crash if 64 bit PCI hole size is >2G. Limit it to 2G for piix and q35 by default. User may override default 64-bit PCI hole size by using "pci-hole64-size" property. Examples: -global i440FX-pcihost.pci-hole64-size=4G -global q35-pcihost.pci-hole64-size=4G Reported-by: Igor Mammedov <imammedo@redhat.com>, Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1375109277-25561-8-git-send-email-imammedo@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e8cd45c78f
commit
3984890181
6 changed files with 211 additions and 58 deletions
|
@ -129,15 +129,6 @@ static void pc_init1(MemoryRegion *system_memory,
|
|||
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
|
||||
guest_info->has_pci_info = has_pci_info;
|
||||
|
||||
/* Set PCI window size the way seabios has always done it. */
|
||||
/* Power of 2 so bios can cover it with a single MTRR */
|
||||
if (ram_size <= 0x80000000)
|
||||
guest_info->pci_info.w32.begin = 0x80000000;
|
||||
else if (ram_size <= 0xc0000000)
|
||||
guest_info->pci_info.w32.begin = 0xc0000000;
|
||||
else
|
||||
guest_info->pci_info.w32.begin = 0xe0000000;
|
||||
|
||||
/* allocate ram and load rom/bios */
|
||||
if (!xen_enabled()) {
|
||||
fw_cfg = pc_memory_init(system_memory,
|
||||
|
@ -160,10 +151,7 @@ static void pc_init1(MemoryRegion *system_memory,
|
|||
system_memory, system_io, ram_size,
|
||||
below_4g_mem_size,
|
||||
0x100000000ULL - below_4g_mem_size,
|
||||
0x100000000ULL + above_4g_mem_size,
|
||||
(sizeof(hwaddr) == 4
|
||||
? 0
|
||||
: ((uint64_t)1 << 62)),
|
||||
above_4g_mem_size,
|
||||
pci_memory, ram_memory);
|
||||
} else {
|
||||
pci_bus = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue