diff options
author | Michael S. Tsirkin | 2013-08-27 07:37:26 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2013-08-27 09:13:41 +0200 |
commit | 1466cef32dd5e7ef3c6477e96d85d92302ad02e3 (patch) | |
tree | a5c37ae97d4ec34786244b388701b87cf251f174 /hw/pci-host/piix.c | |
parent | pci: Introduce helper to retrieve a PCI device's DMA address space (diff) | |
download | qemu-1466cef32dd5e7ef3c6477e96d85d92302ad02e3.tar.gz qemu-1466cef32dd5e7ef3c6477e96d85d92302ad02e3.tar.xz qemu-1466cef32dd5e7ef3c6477e96d85d92302ad02e3.zip |
pc: fix regression for 64 bit PCI memory
commit 398489018183d613306ab022653552247d93919f
pc: limit 64 bit hole to 2G by default
introduced a way for management to control
the window allocated to the 64 bit PCI hole.
This is useful, but existing management tools do not know how to set
this property. As a result, e.g. specifying a large ivshmem device with
size > 4G is broken by default. For example this configuration no
longer works:
-device ivshmem,size=4294967296,chardev=cfoo
-chardev socket,path=/tmp/sock,id=cfoo,server,nowait
Fix this by detecting that hole size was not specified
and defaulting to the backwards-compatible value of 1 << 62.
Cc: qemu-stable@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host/piix.c')
-rw-r--r-- | hw/pci-host/piix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index dc1718fe30..221d82b637 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -320,6 +320,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, PCII440FXState *f; unsigned i; I440FXState *i440fx; + uint64_t pci_hole64_size; dev = qdev_create(NULL, TYPE_I440FX_PCI_HOST_BRIDGE); s = PCI_HOST_BRIDGE(dev); @@ -351,13 +352,15 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, pci_hole_start, pci_hole_size); memory_region_add_subregion(f->system_memory, pci_hole_start, &f->pci_hole); + pci_hole64_size = pci_host_get_hole64_size(i440fx->pci_hole64_size); + pc_init_pci64_hole(&i440fx->pci_info, 0x100000000ULL + above_4g_mem_size, - i440fx->pci_hole64_size); + pci_hole64_size); memory_region_init_alias(&f->pci_hole_64bit, OBJECT(d), "pci-hole64", f->pci_address_space, i440fx->pci_info.w64.begin, - i440fx->pci_hole64_size); - if (i440fx->pci_hole64_size) { + pci_hole64_size); + if (pci_hole64_size) { memory_region_add_subregion(f->system_memory, i440fx->pci_info.w64.begin, &f->pci_hole_64bit); |