summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* xen: convert to MemoryListener APIAvi Kivity2012-01-032-59/+83
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: temporarily add memory_region_get_ram_addr()Avi Kivity2011-12-202-0/+16
| | | | | | | This is a layering violation, but needed while the code contains naked calls to qemu_get_ram_ptr() and the like. Signed-off-by: Avi Kivity <avi@redhat.com>
* xen, vga: add API for registering the framebufferAvi Kivity2011-12-204-0/+15
| | | | | | | Xen currently uses the name of a memory region to determine whether it is the framebuffer. Replace with an explicit API. Signed-off-by: Avi Kivity <avi@redhat.com>
* vhost: convert to MemoryListener APIAvi Kivity2011-12-202-33/+96
| | | | | | | | | Drop the use of cpu_register_phys_memory_client() in favour of the new MemoryListener API. The new API simplifies the caller, since there is no need to deal with splitting and merging slots; however this is not exploited in this patch. Signed-off-by: Avi Kivity <avi@redhat.com>
* kvm: convert to MemoryListener APIAvi Kivity2011-12-201-37/+70
| | | | | | | | | Drop the use of cpu_register_phys_memory_client() in favour of the new MemoryListener API. The new API simplifies the caller, since there is no need to deal with splitting and merging slots; however this is not exploited in this patch. Signed-off-by: Avi Kivity <avi@redhat.com>
* kvm: switch kvm slots to use host virtual address instead of ram_addr_tAvi Kivity2011-12-204-21/+25
| | | | | | This simplifies a later switch to the memory API in slot management. Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add API for observing updates to the physical memory mapAvi Kivity2011-12-203-0/+145
| | | | | | | | | | | | | | | Add an API that allows a client to observe changes in the global memory map: - region added (possibly with logging enabled) - region removed (possibly with logging enabled) - logging started on a region - logging stopped on a region - global logging started - global logging removed This API will eventually replace cpu_register_physical_memory_client(). Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: replace cpu_physical_sync_dirty_bitmap() with a memory APIAvi Kivity2011-12-205-7/+19
| | | | | | The function is still used as the implementation. Signed-off-by: Avi Kivity <avi@redhat.com>
* framebuffer: drop use of cpu_physical_sync_dirty_bitmap()Avi Kivity2011-12-201-1/+1
| | | | | | Replace with memory API equivalent. Signed-off-by: Avi Kivity <avi@redhat.com>
* loader: remove calls to cpu_get_physical_page_desc()Avi Kivity2011-12-201-4/+5
| | | | | | | cpu_get_physical_page_desc() is tied into the memory core's innards, replace it with uses of the API. Signed-off-by: Avi Kivity <avi@redhat.com>
* framebuffer: drop use of cpu_get_physical_page_desc()Avi Kivity2011-12-206-24/+27
| | | | | | | cpu_get_physical_page_desc() is tied into the memory core's innards, replace it with uses of the API. Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: introduce memory_region_find()Avi Kivity2011-12-202-0/+101
| | | | | | | | | | | Given an address space (represented by the top-level memory region), returns the memory region that maps a given range. Useful for implementing DMA. The implementation is a simplistic binary search. Once we have a tree representation this can be optimized. Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add memory_region_is_logging()Avi Kivity2011-12-202-0/+14
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add memory_region_is_rom()Avi Kivity2011-12-202-0/+14
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: add memory_region_is_ram()Avi Kivity2011-12-202-0/+18
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* sysbus: add sysbus_address_space()Avi Kivity2011-12-202-0/+6
| | | | | | Given a bus device, retrieves the memory address space for its bus. Signed-off-by: Avi Kivity <avi@redhat.com>
* sysbus: remove sysbus_init_mmio_cb2Benoît Canet2011-12-192-21/+0
| | | | | | | This function is not longer in use so remove it. Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ppce500_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet2011-12-191-21/+6
| | | | | | | | | Expose only one container MemoryRegion to sysbus. (Peter Maydell's idea) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sh_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet2011-12-192-27/+16
| | | | | | | | | | The isa region is not exposed as a sysbus region because the iobr register contains its address and use it to remap dynamically the region. (Peter Maydell's idea) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: register qdev properties also as non-legacy propertiesPaolo Bonzini2011-12-192-7/+28
| | | | | | | | | | | | | Push legacy properties into a "legacy-..." namespace, and make them available with correct types too. For now, all properties come in both variants. This need not be the case for string properties. We will revisit this after -device is changed to actually use the legacy properties. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: distinguish "legacy" property type name from QOM type namePaolo Bonzini2011-12-193-7/+15
| | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: introduce get/set methods for PropertyPaolo Bonzini2011-12-193-0/+399
| | | | | | | | | | | | | | | | This patch adds a visitor interface to Property. This way, QOM will be able to expose Properties that access a fixed field in a struct without exposing also the everything-is-a-string "feature" of qdev properties. Whenever the printed representation in both QOM and qdev (which is typically the case for device backends), parse/print code can be reused via get_generic/set_generic. Dually, whenever multiple PropertyInfos have the same representation in both the struct and the visitors the code can be reused (for example among all of int32/uint32/hex32). Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGEPaolo Bonzini2011-12-192-0/+8
| | | | | | | | | This will be used when reject invalid values for integer fields that are less than 64-bits wide. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: interpret the return value when setting legacy propertiesPaolo Bonzini2011-12-193-19/+29
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: push permission checks up into qdev_property_add_legacyPaolo Bonzini2011-12-191-27/+19
| | | | | | | | | | qdev_property_get and qdev_property_set can generate permission denied errors themselves. Do not duplicate this functionality in qdev_get/set_legacy_property, and clean up excessive indentation. Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: fix swapped parametersPaolo Bonzini2011-12-191-1/+1
| | | | | | Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qapi: protect against NULL QObject in qmp_input_get_objectPaolo Bonzini2011-12-191-4/+6
| | | | | | | | | | | | | | A NULL qobj can occur when a parameter is fetched via qdict_get, but the parameter is not in the command. By returning NULL, the caller can choose whether to raise a missing parameter error, an invalid parameter type error, or use a default value. For example, qom-set could can use this to reset a property to its default value, though at this time it will fail with "Invalid parameter type". In any case, anything is better than crashing! Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Move balloon option out of i386 only sectionMichael Ellerman2011-12-191-13/+13
| | | | | | | | The balloon option is not i386 only, so move it into the standard options section. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: In qemu -h output, only print options for the arch we are running asMichael Ellerman2011-12-194-17/+26
| | | | | | | | | | | | | | | | | | | | Only print options in the help output that are accepted by our arch. This is less confusing for users and also for other programs that consume the help output. The options affected are: -g and -prom-env only displayed on PPC or SPARC -win2k-hack, -rtc-td-hack, -no-fd-bootchk, -no-acpi, -no-hpet, -acpitable, -smbios only displayed on i386 -semihosting only displayed on ARM, M68K or XTENSA -old-param only displayed on ARM Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: Move option generation logic into a wrapper fileMichael Ellerman2011-12-193-21/+38
| | | | | | | | | | | | In vl.c and qemu-options.h we define macros and include qemu-options.def in order to generate different content. Move the bulk of the def'ing and undef'ing into a wrapper, this will make it cleaner when we add another macro in the next patch. AFAICS undefining GEN_DOCS services no purpose, but I've left it for now. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'qemu-kvm/memory/exec-obsolete' into stagingAnthony Liguori2011-12-195-42/+74
|\
| * memory: move obsolete exec.c functions to a private headerAvi Kivity2011-12-194-39/+74
| | | | | | | | | | | | This will help avoid accidental usage. Signed-off-by: Avi Kivity <avi@redhat.com>
| * etraxfs_eth: drop bogus cpu_unregister_io_memory()Avi Kivity2011-12-191-3/+0
| | | | | | | | | | | | Leftover call to cpu_unregister_io_memory() can segfault on cleanup. Remove. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/xen' into stagingAnthony Liguori2011-12-196-31/+42
|\ \ | |/
| * xen: convert to memory APIAvi Kivity2011-12-191-19/+22
| | | | | | | | | | | | | | Undo the private implementation of qemu_ram_alloc(); use the global one (which calls right back into xen_ram_alloc()). Signed-off-by: Avi Kivity <avi@redhat.com>
| * memory, xen: pass MemoryRegion to xen_ram_alloc()Avi Kivity2011-12-196-12/+20
| | | | | | | | | | | | | | Currently xen_ram_alloc() relies on ram_addr, which is going away. Give it something else to use as a cookie. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/mutators' into stagingAnthony Liguori2011-12-195-58/+144
|\ \ | | | | | | | | | | | | Conflicts: memory.h
| * | docs: document memory API interaction with migrationAvi Kivity2011-12-071-0/+12
| | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com>
| * | piix_pci: adapt smram mapping to use memory mutatorsAvi Kivity2011-12-051-14/+6
| | | | | | | | | | | | | | | | | | Eliminates fake state ->smram_enabled. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | cirrus_vga: adapt to memory mutators APIAvi Kivity2011-12-051-33/+17
| | | | | | | | | | | | | | | | | | | | | Simplify the code by avoiding dynamic creation and destruction of memory regions. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: optimize empty transactions due to mutatorsAvi Kivity2011-12-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mutating memory APIs can easily cause empty transactions, where the mutators don't actually change anything, or perhaps only modify disabled regions. Detect these conditions and avoid regenerating the memory topology. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: introduce memory_region_set_alias_offset()Avi Kivity2011-12-052-0/+26
| | | | | | | | | | | | | | | | | | | | | Add an API to update an alias offset of an active alias. This can be used to simplify implementation of dynamic memory banks. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: introduce memory_region_set_address()Avi Kivity2011-12-042-0/+32
| | | | | | | | | | | | | | | | | | | | | Allow changing the address of a memory region while it is in the memory hierarchy. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: introduce memory_region_set_enabled()Avi Kivity2011-12-042-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | This allows users to disable a memory region without removing it from the hierarchy, simplifying the implementation of memory routers. Signed-off-by: Avi Kivity <avi@redhat.com>
* | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-12-197-34/+58
|\ \ \
| * | | configure: Improve Xen autodetection for hosts without XenStefan Weil2011-12-191-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, it only takes one test (instead of four) to detect that there is no Xen support at all. For most build hosts, this will reduce the time configure needs. It will also reduce noisy output in config.log. Build hosts with Xen now need up to five (instead of up to four) tests. They get improved diagnostics when Xen support fails. Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | configure: Fix compiler warnings in config.log (statement without effect)Stefan Weil2011-12-191-4/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | configure: Fix compiler warning in config.log (value was never used)Stefan Weil2011-12-191-2/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | configure: Fix compiler warning in config.log (undefined NULL)Stefan Weil2011-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the warning when probing for xfs. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | configure: Fix compiler warnings in config.log (uninitialized variable)Stefan Weil2011-12-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warning: ‘fd’ is used uninitialized in this function warning: ‘id’ is used uninitialized in this function Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud