summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2011-08-25Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"Anthony Liguori45-637/+543
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1. From Avi: Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this out - it isn't trivial. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-25vga: Silence bogus gcc warning about uninitialized variablesJan Kiszka1-0/+1
Some gcc versions do not properly detect that all possible cases are covered and base and size are always initialized. Please gcc by defining a pseudo default case. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-25Merge remote-tracking branch 'qemu-kvm/memory/batch' into stagingAnthony Liguori45-543/+637
2011-08-25Merge remote-tracking branch 'aneesh/for-upstream-2' into stagingAnthony Liguori8-1329/+850
2011-08-25milkymist: convert to memory APIAvi Kivity1-4/+5
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25milkymist-softusb: convert to memory APIAvi Kivity1-24/+24
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25milkymist-minimac2: convert to memory APIAvi Kivity1-22/+21
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25mcf5208: convert to memory APIAvi Kivity1-40/+32
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25mainstone: convert to memory APIAvi Kivity1-5/+8
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25lm32_boards: convert to memory APIAvi Kivity1-6/+9
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25g364fb: convert to memory APIAvi Kivity3-29/+38
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25dummy_m68k: convert to memory APIAvi Kivity1-2/+5
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25pflash_cfi01/pflash_cfi02: convert to memory APIAvi Kivity18-223/+246
cfi02 is annoying in that is ignores some address bits; we probably want explicit support in the memory API for that. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25piix_pci: wrap memory update in a transactionAvi Kivity1-0/+2
The code will remap all PAMs, even if just one is updated, resulting in reduced performance. Wrap in a transaction to detect that those other PAMs have not changed. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25cirrus: wrap memory update in a transactionAvi Kivity1-0/+2
This prevents spurious unmapping and remapping of the vga windows, which reduces performance. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25leon3: convert to memory APIAvi Kivity1-6/+9
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25integratorcp: convert to memory API (RAM/flash only)Avi Kivity1-8/+20
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25sysbus: add sysbus_add_memory_overlap()Avi Kivity2-0/+9
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25axis_dev88: convert to memory API (RAM only)Avi Kivity1-8/+8
Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-25ppc_oldworld, ppc_newworld: fix escc BAR related crashAvi Kivity2-3/+8
ppc maps the escc mmio region both at a fixed offset (as a sysbus area) and as part of a PCI BAR. This crashes, since a MemoryRegion may have only one parent. Use an alias so we have a separate MemoryRegion for the BAR. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-24gt64xxx: fix crash in gt64120_pci_mapping()Avi Kivity1-1/+5
The map/unmap code was assymetric - unmap used the local MemoryRegion while map used isa_mmio_init(), which cannot handle dynamic mappings. Fix by using isa_mmio_setup() and the local MemoryRegion. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-24armv7m: convert to memory APIAvi Kivity3-12/+20
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-24an5206: convert to memory APIAvi Kivity1-4/+8
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-24pci_host: convert conf index and data ports to memory APIAvi Kivity9-133/+131
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-24sysbus: add helpers to add and delete memory regions to the system busAvi Kivity2-0/+28
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-24stellaris_enet: convert to memory APIAvi Kivity1-17/+12
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-23hw/omap_gpmc: Don't try to map CS0 twice on resetPeter Maydell1-1/+0
Remove a spurious second map of the OMAP GPMC CS0 region on reset. This fixes an assertion failure when we try to add the region to its container when it was already added. (The old code did not complain about mismatched map/unmap calls, but the new MemoryRegion implementation does.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-22xilinx: removed microbalze_pic_init from xilinx.hPeter A. G. Crosthwaite5-4/+12
This is a microblaze target specific function that belongs outside of xilinx.h (which is a collection of target independent device model instantiator functions) Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-22xilinx.h: Added missing includesPeter A. G. Crosthwaite1-0/+2
Added some missing #includes for this file. Previously this file relied on its clients to pre-include its dependencies. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-08-22vga: Drop some unused fieldsJan Kiszka1-2/+0
Memory region refactorings obsoleted them. CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vga: Use linear mapping + dirty logging in chain 4 memory access modeJan Kiszka2-1/+52
Most VGA memory access modes require MMIO handling as they demand weird logic to get a byte from or into the video RAM. However, there is one exception: chain 4 mode with all memory planes enabled for writing. This mode actually allows lineary mapping, which can then be combined with dirty logging to accelerate KVM. This patch accelerates specifically VBE accesses like they are used by grub in graphical mode. Not only the standard VGA adapter benefits from this, also vmware and spice in VGA mode. CC: Gerd Hoffmann <kraxel@redhat.com> CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Eliminate vga_dirty_log_restartJan Kiszka3-9/+0
After the conversion to the new Memory API, vga_dirty_log_restart became seriously pointless. Remove it from vmware-vga and and then finally drop the service. CC: Andrzej Zaborowski <balrogg@gmail.com> CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Remove dead DIRECT_VRAM modeJan Kiszka1-142/+30
The code was disabled since day 1 of vmware-vga, and now it does not even build anymore. Time for a cleanup. CC: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Disable verbose modeJan Kiszka1-1/+1
Elimiates 'vmsvga_value_write: guest runs Linux.' messages from the console. CC: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Register reset serviceJan Kiszka1-31/+35
Fixes cold reset in vmware graphic modes. We need to split up the reset function for this purpose, breaking out init-once bits. Cc: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22ioapic: Implement polarityJan Kiszka1-0/+3
If the polarity bit is set in the redirection table, the input level simply has to inverted as it is low active in this case. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22target-i386: Remove unused polarity arguments from APIC APIJan Kiszka3-20/+12
Polarity of external interrupts needs to be handled in the IOAPIC. Passing it to the APIC is pointless. So remove all these arguments. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22440fx: fix PAM, PCI holesAvi Kivity4-46/+115
The current implementation of PAM and the PCI holes is broken in several ways: - PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored) This patch fixes things by introducing a pci address space, and using memory region aliases to represent PAM regions, SMRAM, and PCI holes. The memory hierarchy looks something like system_memory | +--- low memory alias (0-0xe0000000) | | | +-- ram@0 | +--- high memory alias (0x100000000-EOM) | | | +-- ram@0xe0000000 | +--- pci hole alias (end of low memory-0x100000000) | | | +-- pci@end-of-low-memory | | +--- pam[n] (0xc0000-0xc3fff etc) (when set to pci, priority 1) | | | +-- pci@0xc4000 etc | +--- smram (0xa0000-0xbffff) (when set to pci/vga, priority 1) | +-- pci@0xa0000 etc ram (simple ram region) pci | +--- BARn | +--- VGA 0xa0000-0xbffff | +--- ROMs Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vga: drop get_system_memory() from vga devices and derivativesAvi Kivity11-34/+37
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22pci: add pci_address_space()Avi Kivity2-0/+6
Returns the PCI address space. Useful for bridges that can obscure part of the PCI address space. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22isa: add isa_address_space()Avi Kivity2-0/+7
A helper that returns the address space used by ISA devices. Useful for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind bridges. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22sysbus: remove sysbus_init_mmio_cb()Avi Kivity2-14/+0
This problem with this function is that it is not reversible - it is impossible to know where things are registered and unregister them exactly. As there are no more users, we can remove it. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22ppce500_pci: convert to sysbus_init_mmio_cb2()Avi Kivity1-1/+11
Not a huge step forward, but at least we now have a 1:1 relationship between registration and unregistration. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22versatile_pci: convert to memory APIAvi Kivity1-49/+43
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22arm11mpcore: use sysbus_init_mmio_cb2Avi Kivity1-1/+6
This tells the sysbus code it need not use IO_MEM_UNASSIGNED. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22sh_pci: convert to memory APIAvi Kivity1-21/+42
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22sysbus: add a variant of sysbus_init_mmio_cb with an unmap callbackAvi Kivity2-0/+18
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a region. Provide an alternative that calls an unmap callback, so the removal may be done non-destructively. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22ppc4xx_sdram: convert to memory APIAvi Kivity6-29/+69
Clumsy due to the lack of clipping support, needed for changing exposed ram size. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22ppc405_uc: convert to memory APIAvi Kivity1-65/+51
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22pcie_host: convert to memory APIAvi Kivity2-79/+31
Assuming that mmcfg size cannot change at runtime. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>