summaryrefslogtreecommitdiffstats
path: root/arch_init.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * ram: save_live_setup() we don't need to synchronize the dirty bitmap.Juan Quintela2012-07-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | 1st: we were synchonizing the dirty bitmap before calling memory_global_dirty_log_start(). 2nd: We are marking all pages as dirty anywhere, no reason to go through all the bitmap to "mark" dirty same pages twice. So, call removed. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * ram: iterate phaseJuan Quintela2012-07-201-3/+7
| | | | | | | | | | | | | | We only need to synchronize the bitmap when the number of dirty pages is low. Not every time that we call the function. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * ram: save_live_complete() only do one loopJuan Quintela2012-07-201-32/+0
| | | | | | | | | | | | | | We were doing the same loop that stage2, and a new one for stage3. We only need the one for stage3. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * ram: save_live_setup() don't need to sent pagesJuan Quintela2012-07-201-34/+0
| | | | | | | | | | | | | | | | We should send pages on interate phase, not in setup one. This was a "bug". Just removing the loop does what we want. Tested that it works with current ram_load(). Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: split save_live into stage2 and stage3Juan Quintela2012-07-201-17/+55
| | | | | | | | | | | | | | | | We split it into 2 functions, foo_live_iterate, and foo_live_complete. At this point, we only remove the bits that are for the other stage, functionally this is equivalent to previous code. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: split save_live_setup from save_live_stateJuan Quintela2012-07-201-22/+65
| | | | | | | | | | | | | | | | This patch splits stage 1 to its own function for both save_live users, ram and block. It is just a copy of the function, removing the parts of the other stages. Optimizations would came later. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: Refactor cancel operation in its own operationJuan Quintela2012-07-201-5/+6
| | | | | | | | | | | | Intead of abusing stage with value -1. Signed-off-by: Juan Quintela <quintela@redhat.com>
| * savevm: Live migration handlers register the struct directlyJuan Quintela2012-07-201-2/+7
| | | | | | | | | | | | | | Notice that the live migration users never unregister, so no problem about freeing the ops structure. Signed-off-by: Juan Quintela <quintela@redhat.com>
* | target-or32: Add target stubs and QOM cpuJia Liu2012-07-271-0/+2
|/ | | | | | | Add OpenRISC target stubs, QOM cpu and basic machine. Signed-off-by: Jia Liu <proljc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Maintain the number of dirty pagesJuan Quintela2012-06-291-14/+1
| | | | | | | Calculate the number of dirty pages takes a lot on hosts with lots of memory. Just maintain how many pages are dirty. Signed-off-by: Juan Quintela <quintela@redhat.com>
* Exit loop if we have been there too longJuan Quintela2012-06-291-0/+18
| | | | | | | | | | Checking each 64 pages is a random magic number as good as any other. We don't want to test too many times, but on the other hand, qemu_get_clock_ns() is not so expensive either. We want to be sure that we spent less than 50ms (half of buffered_file timer), if we spent more than 100ms, all the accounting got wrong. Signed-off-by: Juan Quintela <quintela@redhat.com>
* Only calculate expected_time for stage 2Juan Quintela2012-06-291-5/+8
| | | | | | | ram_save_remaining() is an expensive operation when there is a lot of memory. So we only call the function when we need it. Signed-off-by: Juan Quintela <quintela@redhat.com>
* Add migration_end functionOrit Wasserman2012-06-291-1/+6
| | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com>
* Add debugging infrastructureOrit Wasserman2012-06-291-6/+27
| | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com>
* Add save_block_hdr functionOrit Wasserman2012-06-291-12/+14
| | | | | | | Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com> Signed-off-by: Petter Svard <petters@cs.umu.se> Signed-off-by: Aidan Shribman <aidan.shribman@sap.com> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
* Add missing check for host_from_stream_offset return value for ↵Orit Wasserman2012-06-291-0/+3
| | | | | | RAM_SAVE_FLAG_PAGE Signed-off-by: Orit Wasserman <owasserm@redhat.com>
* arch_init: Fix AltiVec build on Darwin/ppcAndreas Färber2012-05-291-0/+4
| | | | | | | | | | | | | | | | Commit f29a56147b66845914d0a645bf9b4c5bb9a6af57 (implement -no-user-config command-line option (v3)) introduced uses of bool in arch_init.c. Shortly before that usage is support code for AltiVec (conditional to __ALTIVEC__). GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool, leading to type mismatches. altivec.h recommends to #undef for C++ compatibility, but doing so in C leads to bool remaining undefined. Fix by redefining bool to _Bool as mandated for stdbool.h by POSIX. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* move CPU definitions to /usr/share/qemu/cpus-x86_64.conf (v2)Eduardo Habkost2012-05-101-0/+1
| | | | | | | | Changes v1 -> v2: - userconfig variable is now bool, not int Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* implement -no-user-config command-line option (v3)Eduardo Habkost2012-05-101-3/+8
| | | | | | | | | | | | Changes v2 -> v3: - Rebase against latest qemu.git Changes v1 -> v2: - Change 'userconfig' field/variables to bool instead of int - Coding style change Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* move list of default config files to an arrayEduardo Habkost2012-05-101-9/+16
| | | | | | | More files will be added to the list, with additional attributes, later. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* eliminate arch_config_name variableEduardo Habkost2012-05-101-2/+1
| | | | | | | | Not needed anymore, as the code that uses the variable is already inside arch_init.c. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* move code to read default config files to a separate function (v2)Eduardo Habkost2012-05-101-0/+18
| | | | | | | | | | | Function added to arch_init.c because it depends on arch-specific settings. Changes v1 -> v2: - Move qemu_read_default_config_file() prototype to qemu-config.h Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pcspk: initialize PC speaker if compiled inHervé Poussineau2012-04-151-1/+1
| | | | | | | | | | PC speaker has been moved to target-independant code in 71093711589dafcb920dc3bc9bb811eaf8b14101, so do not depend of target to include it or not. Cc: malc <av1474@comtv.ru> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Herv? Poussineau <hpoussin@reactos.org> Signed-off-by: malc <av1474@comtv.ru>
* Purge migration of (almost) everything to do with monitorsLuiz Capitulino2012-03-151-1/+1
| | | | | | | | | | | | | | | | | The Monitor object is passed back and forth within the migration/savevm code so that it can print errors and progress to the user. However, that approach assumes a HMP monitor, being completely invalid in QMP. This commit drops almost every single usage of the Monitor object, all monitor_printf() calls have been converted into DPRINTF() ones. There are a few remaining Monitor objects, those are going to be dropped by the next commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* pcspk: Convert to qdevJan Kiszka2012-02-171-0/+1
| | | | | | | | | Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: change dirty getting API to take a sizeBlue Swirl2012-02-041-3/+4
| | | | | | | Instead of each device knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* memory: change dirty setting APIs to take a sizeBlue Swirl2012-01-251-1/+1
| | | | | | | Instead of each target knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vectorize is_dup_pagePaolo Bonzini2012-01-131-6/+22
| | | | | | | | is_dup_page is already proceeding in 32-bit chunks. Changing it to 16 bytes using Altivec or SSE is easy. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: obsolete cpu_physical_memory_[gs]et_dirty_tracking()Avi Kivity2012-01-041-4/+3
| | | | | | | The getter is no longer used, so it is completely removed. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Convert ram_load() to the memory APIAvi Kivity2012-01-041-2/+2
| | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Remove support for version 3 ram_loadAvi Kivity2012-01-041-14/+4
| | | | | | | | | Version 3 ram_load depends on ram_addrs, which are not stable. Version 4 was introduced in 0.13 (and RHEL 6), so this means live migration from 0.12 and earlier to 1.1 or later will not work. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Sort RAMBlocks by ID for migration, not by ram_addrAvi Kivity2012-01-041-6/+2
| | | | | | | | | | | ram_addr is (a) unstable (b) going away. Sort by idstr instead. Commit b2e0a138e initially introduced the sorting for the purpose of improving debuggability. After this patch, the order is still stable, but perhaps less usable by a human. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Switch ram_save to the memory APIAvi Kivity2012-01-041-20/+14
| | | | | | | Avoid using ram_addr_t, instead use (MemoryRegion *, offset) pairs. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into stagingAnthony Liguori2012-01-031-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/memory/page_desc: (22 commits) Remove cpu_get_physical_page_desc() sparc: avoid cpu_get_physical_page_desc() virtio-balloon: avoid cpu_get_physical_page_desc() vhost: avoid cpu_get_physical_page_desc() kvm: avoid cpu_get_physical_page_desc() memory: remove CPUPhysMemoryClient xen: convert to MemoryListener API memory: temporarily add memory_region_get_ram_addr() xen, vga: add API for registering the framebuffer vhost: convert to MemoryListener API kvm: convert to MemoryListener API kvm: switch kvm slots to use host virtual address instead of ram_addr_t memory: add API for observing updates to the physical memory map memory: replace cpu_physical_sync_dirty_bitmap() with a memory API framebuffer: drop use of cpu_physical_sync_dirty_bitmap() loader: remove calls to cpu_get_physical_page_desc() framebuffer: drop use of cpu_get_physical_page_desc() memory: introduce memory_region_find() memory: add memory_region_is_logging() memory: add memory_region_is_rom() ...
| * memory: replace cpu_physical_sync_dirty_bitmap() with a memory APIAvi Kivity2011-12-201-4/+2
| | | | | | | | | | | | The function is still used as the implementation. Signed-off-by: Avi Kivity <avi@redhat.com>
* | audio: remove unused parameter isa_picHervé Poussineau2011-12-201-5/+5
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() ↵Hervé Poussineau2011-12-201-4/+4
|/ | | | | | | | | functions NULL is a valid bus/device, so there is no change in behaviour. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* migration: make *save_live return errorsJuan Quintela2011-10-201-2/+7
| | | | | | | Make *save_live() return negative values when there is one error, and updates all callers to check for the error. Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: use qemu_file_get_error() return value when possibleJuan Quintela2011-10-201-2/+4
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: rename qemu_file_has_error to qemu_file_get_errorJuan Quintela2011-10-201-1/+1
| | | | | | | Now the function returned errno, so it is better the new name. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* migration: change has_error to contain errno valuesJuan Quintela2011-10-201-1/+1
| | | | | | We normally already have an errno value. When not, abuse EIO. Signed-off-by: Juan Quintela <quintela@redhat.com>
* core: remove qemu_service_ioFrediano Ziglio2011-09-231-5/+0
| | | | | | | | | qemu_service_io was mainly an alias to qemu_notify_event, currently used only by PPC for timer hack, so call qemu_notify_event directly. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-xtensa: add target stubsMax Filippov2011-09-101-0/+2
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-2/+2
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce -machine command option.Anthony PERARD2011-05-081-0/+5
| | | | | | | | | | | | | | | | | | | This option gives the ability to switch one "accelerator" like kvm, xen or the default one tcg. We can specify more than one accelerator by separate them by a colon. QEMU will try each one and use the first whose works. So, ./qemu -machine accel=xen:kvm:tcg which would try Xen support first, then KVM and finally TCG if none of the other works. By default, QEMU will use TCG. But we can specify another default in the global configuration file. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* LatticeMico32 target supportMichael Walle2011-03-071-0/+2
| | | | | | | | This patch adds support for the LatticeMico32 softcore processor by Lattice Semiconductor. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* audio: consolidate audio_init()Isaku Yamahata2011-01-251-1/+34
| | | | | | | | consolidate audio_init() and remove references to shoundhw. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* migration: stable ram block orderingMichael S. Tsirkin2010-12-021-0/+35
| | | | | | | | This makes ram block ordering under migration stable, ordered by offset. This is especially useful for migration to exec, for debugging. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Jason Wang <jasowang@redhat.com>
* Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori2010-11-011-0/+3
|\
| * migration: don't segfault on invalid inputMichael S. Tsirkin2010-10-271-0/+3
| | | | | | | | | | | | | | | | host_from_stream_offset returns NULL on error, return error instead of trying to use that address, to avoid segfault on invalid stream. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud