summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | migration: run setup callbacks out of big lockPaolo Bonzini2013-03-115-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only the migration_bitmap_sync() call needs the iothread lock. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: run pending/iterate callbacks out of big lockPaolo Bonzini2013-03-114-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to do blocking writes directly to the socket, with no buffer in the middle. For RAM, only the migration_bitmap_sync() call needs the iothread lock. For block migration, it is needed by the block layer (including bdrv_drain_all and dirty bitmap access), but because some code is shared between iterate and complete, all of mig_save_device_dirty is run with the lock taken. In the savevm case, the iterate callback runs within the big lock. This is annoying because it complicates the rules. Luckily we do not need to do anything about it: the RAM iterate callback does not need the iothread lock, and block migration never runs during savevm. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: reorder SaveVMHandlers membersPaolo Bonzini2013-03-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This groups together the callbacks that later will have similar locking rules. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | block-migration: add lockPaolo Bonzini2013-03-112-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some state is shared between the block migration code and its AIO callbacks. Once block migration will run outside the iothread, the block migration code and the AIO callbacks will be able to run concurrently. Protect the critical sections with a separate lock. Do the same for completed_sectors, which can be used from the monitor. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | block-migration: document usage of state across threadsPaolo Bonzini2013-03-111-5/+18
| | | | | | | | | | | | | | | | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | block-migration: small preparatory changes for lockingPaolo Bonzini2013-03-111-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some small changes that will simplify the positioning of lock/unlock primitives. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | block-migration: remove variables that are never readPaolo Bonzini2013-03-111-13/+0
| | | | | | | | | | | | | | | | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: cleanup migration (including thread) in the iothreadPaolo Bonzini2013-03-112-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perform final cleanup in a bottom half, and add joining the thread to the series of cleanup actions. migrate_fd_error remains for connection error, but it doesn't need to cleanup anything anymore. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: prepare to access s->state outside critical sectionsPaolo Bonzini2013-03-111-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessing s->state outside the big QEMU lock will simplify a bit the locking/unlocking of the iothread lock. We need to keep the lock in migrate_fd_error and migrate_fd_completed, however, because they call migrate_fd_cleanup. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: add migrate_set_state tracepointKazuya Saito2013-03-112-1/+11
| | | | | | | | | | | | | | | | | | Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: do not nest flushing of device dataPaolo Bonzini2013-03-111-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completion of migration is currently done with a "nested" loop that invokes buffered_flush: migrate_fd_completed is called by buffered_file_thread, which calls migrate_fd_cleanup, which calls buffered_close (via qemu_fclose), which flushes the buffer. Simplify this, by reusing the buffered_flush call of buffered_file_thread. Then if qemu_savevm_state_complete was called, and the buffer is empty (including the QEMUFile buffer, for which we need the previous patch), we are done. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: simplify error handlingPaolo Bonzini2013-03-112-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always use qemu_file_get_error to detect errors, since that is how QEMUFile itself drops I/O after an error occurs. There is no need to propagate and check return values all the time. Also remove the "complete" member, since we know that it is set (via migrate_fd_cleanup) only when the state changes. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: use qemu_file_set_errorPaolo Bonzini2013-03-111-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the return value of buffered_flush, pass it via the error code of s->file. Once this is done, the error can be retrieved simply via migrate_fd_close's call to qemu_fclose. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: flush all data to fd when buffered_flush is calledPaolo Bonzini2013-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Including data that resided in the QEMUFile's own buffer. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | qemu-file: temporarily expose qemu_file_set_error and qemu_fflushPaolo Bonzini2013-03-112-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, migration cannot entirely rely on QEMUFile's automatic drop of I/O after an error, because it does its "real" I/O outside the put_buffer callback. To fix this until buffering is gone, expose qemu_file_set_error which we will use in buffered_flush. Similarly, buffered_flush is not a complete flush because some data may still reside in the QEMUFile's own buffer. This somewhat complicates the process of closing the migration thread. Again, when buffering is gone buffered_flush will disappear and calling qemu_fflush will not be needed; in the meanwhile, we expose the function for use in migration.c. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: use qemu_file_set_error to pass error codes back to qemu_savevm_statePaolo Bonzini2013-03-112-29/+21
| | | | | | | | | | | | | | | | | | | | | Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | qemu-file: pass errno from qemu_fflush via f->last_errorPaolo Bonzini2013-03-111-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by almost all callers of qemu_fflush, move the code directly to qemu_fflush. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | block-migration: remove useless calls to blk_mig_cleanupPaolo Bonzini2013-03-111-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the cancel callback is called consistently for all errors, we can avoid doing its work in the other callbacks. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*Paolo Bonzini2013-03-111-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful, because it lets us keep the cancellation callbacks inside the big lock while pushing the others out. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: move more error handling to migrate_fd_cleanupPaolo Bonzini2013-03-111-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next patch will add more cases where qemu_savevm_state_cancel needs to be called; prepare for that already, the function can be called twice with no ill effect. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: always use vm_stop_force_statePaolo Bonzini2013-03-111-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vm_stop_force_state does: if (runstate_is_running()) { vm_stop(state); } else { runstate_set(state); } migration.c does: if (runstate_is_running()) { vm_stop(state); } else { vm_stop_force_state(state); } The code run is the same even if we always use vm_stop_force_state in migration.c. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * | migration: simplify while loopPaolo Bonzini2013-03-111-10/+1
| |/ | | | | | | | | | | | | | | Unify the goto around the loop, with the exit condition at the end of it. Both can be expressed as "while (ret >= 0)". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | arm: fix compilation with CONFIG_FDTPaolo Bonzini2013-03-111-1/+0
|/ | | | | | | | | | | A conflict was resolved the wrong way when merging commit 320ba5f (build: always link device_tree.o into emulators if libfdt available, 2013-02-05). This causes a build failure for the arm-softmmu target due to multiply defined symbol. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1362997886-9470-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2013-03-1025-3833/+4150
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (75 commits) tcg: Don't make exitreq flag a local temporary Makefile: Add subdir dependency on config-devices-all.mak make_device_config.sh: Emit dependency file to directory where included Revert "make_device_config.sh: Fix target path in generated dependency file" s390/virtio-ccw: remove redundant call to blockdev_mark_auto_del s390/css: Fix subchannel detection Allow virtio-net features for legacy s390 virtio bus s390: virtio-ccw maintainer s390: simplify kvm cpu init pseries: Add compatible property to root of device tree target-ppc: Move CPU aliases out of translate_init.c target-ppc: Report CPU aliases for QMP target-ppc: List alias names alongside CPU models target-ppc: Make host CPU a subclass of the host's CPU model PPC: xnu kernel expects FLUSH to be cleared on STOP PPC: Fix dma interrupt target-ppc: Fix PPC_DUMP_SPR_ACCESS build target-ppc: Synchronize FPU state with KVM target-ppc: Add mechanism for synchronizing SPRs with KVM Save memory allocation in the elf loader ...
| * tcg: Don't make exitreq flag a local temporaryRichard Henderson2013-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | The value is not actually live across basic blocks, so there's no need for the local property. This eliminates storing the temporary to its home location at the branch. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
| * Makefile: Add subdir dependency on config-devices-all.makAndreas Färber2013-03-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | What 23bf49b5eca716aaad073f2b47613434e1515cb5 really seemed to try to fix is that Makefile could recurse into *-softmmu/ subdirectories before a new *-softmmu/config-devices.mak was generated from pci.mak. Fix this by adding a dependency on config-all-devices.mak, which in turn has dependencies on *-softmmu/config-devices.mak. Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * make_device_config.sh: Emit dependency file to directory where includedAndreas Färber2013-03-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | Placing the config-devices.mak.d file alongside the config-devices.mak file in *-softmmu/ lead to it getting included into through *-softmmu/Makefile in addition to ./Makefile, leading to confusion. Instead, emit it to ./%-config-devices.mak.d, where it is included. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * Revert "make_device_config.sh: Fix target path in generated dependency file"Andreas Färber2013-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 23bf49b5eca716aaad073f2b47613434e1515cb5. While *-softmmu/config-devices.mak.d is included through *.d pattern via Makefile.target, the make_devices_config.sh call these dependencies are for is in ./Makefile. Therefore revert to original behavior. This should unbreak pci.mak dependencies not propagating. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * Merge branch 's390-for-upstream' of git://github.com/agraf/qemuBlue Swirl2013-03-097-14/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * 's390-for-upstream' of git://github.com/agraf/qemu: s390/virtio-ccw: remove redundant call to blockdev_mark_auto_del s390/css: Fix subchannel detection Allow virtio-net features for legacy s390 virtio bus s390: virtio-ccw maintainer s390: simplify kvm cpu init
| | * s390/virtio-ccw: remove redundant call to blockdev_mark_auto_delChristian Borntraeger2013-03-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | blockdev_mark_auto_del is already called in virtio-blk-exit. Remove the redundant call. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * s390/css: Fix subchannel detectionChristian Borntraeger2013-03-083-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to consider the m bit to find the real channel subsystem when determining the last subchannel. If we fail to take this into account, removal of a subchannel in the middle of a big list of devices will stop device detection after a reboot. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * Allow virtio-net features for legacy s390 virtio busChristian Borntraeger2013-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable all virtio-net features for the legacy s390 virtio bus. This also fixes kernel BUG at /usr/src/packages/BUILD/kernel-default-3.0.58/linux-3.0/drivers/s390/kvm/kvm_virtio.c:121! Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf <agraf@suse.de>
| | * s390: virtio-ccw maintainerCornelia Huck2013-03-081-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Add myself as maintainer for virtio-ccw and the s390-ccw-virtio machine. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> [agraf: add myself for virtio-ccw machine] Signed-off-by: Alexander Graf <agraf@suse.de>
| | * s390: simplify kvm cpu initChristian Borntraeger2013-03-081-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | There is no special code right now and the reset ioctl is done later on in the the reset handler anyway. Lets simplify the cpu init. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemuBlue Swirl2013-03-0915-3815/+4117
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'ppc-for-upstream' of git://github.com/agraf/qemu: (66 commits) pseries: Add compatible property to root of device tree target-ppc: Move CPU aliases out of translate_init.c target-ppc: Report CPU aliases for QMP target-ppc: List alias names alongside CPU models target-ppc: Make host CPU a subclass of the host's CPU model PPC: xnu kernel expects FLUSH to be cleared on STOP PPC: Fix dma interrupt target-ppc: Fix PPC_DUMP_SPR_ACCESS build target-ppc: Synchronize FPU state with KVM target-ppc: Add mechanism for synchronizing SPRs with KVM Save memory allocation in the elf loader pseries: Implement h_read hcall target-ppc: Change "POWER7" CPU alias target-ppc: Fix remaining microcontroller typos among models target-ppc: Split model definitions out of translate_init.c target-ppc: Update Coding Style for CPU models target-ppc: Turn descriptive CPU model comments into device descriptions target-ppc: Turn descriptive CPU family comments into device descriptions target-ppc: Set remaining fields on CPU family classes target-ppc: Register all types for TARGET_PPCEMB ...
| | * | pseries: Add compatible property to root of device treeDavid Gibson2013-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, for the pseries machine the device tree supplied by qemu to SLOF and from there to the guest does not include a 'compatible property' at the root level. Usually that works fine, since in this case the compatible property doesn't really give any information not already found in the 'device_type' or 'model' properties. However, the lack of 'compatible' confuses the bootloader install in the SLES11 SP2 and SLES11 SP3 installers. This patch therefore adds a token 'compatible' property to work around that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Move CPU aliases out of translate_init.cAndreas Färber2013-03-083-198/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move array of CPU aliases to cpu-models.c, alongside model definitions. This requires to zero-terminate the aliases array since ARRAY_SIZE() can no longer be used in translate_init.c then. Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Report CPU aliases for QMPAndreas Färber2013-03-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMP query-cpu-definitions implementation iterated over CPU classes only, which were getting less and less as aliases were extracted. Keep them in QMP as valid -cpu arguments even if not guaranteed stable. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: List alias names alongside CPU modelsAndreas Färber2013-03-081-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert adding a separate -cpu ? output section for aliases and list them per CPU subclass. Requested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Make host CPU a subclass of the host's CPU modelAndreas Färber2013-03-082-50/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids assigning individual class fields and contributors forgetting to add field assignments in KVM-only code. ppc_cpu_class_find_by_pvr() requires the CPU model classes to be registered, so defer host CPU type registration to kvm_arch_init(). Only register the host CPU type if there is a class with matching PVR. This lets us drop error handling from instance_init. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | PPC: xnu kernel expects FLUSH to be cleared on STOPAmadeusz Sławiński2013-03-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | otherwise it gets stuck in a loop so clear it when unsetting run when flush is set void IODBDMAStop( volatile IODBDMAChannelRegisters *registers) { IOSetDBDMAChannelControl( registers, IOClearDBDMAChannelControlBits( kdbdmaRun ) | IOSetDBDMAChannelControlBits( kdbdmaFlush )); DBDMA: writel 0x0000000000000b00 <= 0xa0002000 DBDMA: channel 0x16 reg 0x0 DBDMA: status 0x00002000 while( IOGetDBDMAChannelStatus( registers) & ( kdbdmaActive | kdbdmaFlush)) eieio(); DBDMA: readl 0x0000000000000b04 => 0x00002000 DBDMA: channel 0x16 reg 0x1 DBDMA: readl 0x0000000000000b04 => 0x00002000 DBDMA: channel 0x16 reg 0x1 DBDMA: readl 0x0000000000000b04 => 0x00002000 DBDMA: channel 0x16 reg 0x1 DBDMA: readl 0x0000000000000b04 => 0x00002000 DBDMA: channel 0x16 reg 0x1 it continues to get printed } Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> [agraf: replace tabs with spaces] Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | PPC: Fix dma interruptAmadeusz Sławiński2013-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In openbios (drivers/ide.c) they are set to 0000000d 00000000 00000002 00000000 0000000e 00000000 00000003 00000000 0000000f 00000000 00000004 00000000 (The last one seems to be not implemented in qemu) It follows convention of how they are set on real machines, both ide and dma ones are increased Real machine one: http://web.archive.org/web/20090107151044/http://penguinppc.org/historical/dev-trees-html/g4_agp_500_2.html 00000013 00000001 0000000b 00000000 00000014 00000001 0000000c 00000000 00000015 00000001 0000000d 00000000 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Fix PPC_DUMP_SPR_ACCESS buildAndreas Färber2013-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A victim of the d523dd00a7d73b28f2e99acf45a4b3f92e56e40a AREG0 conversion, insert the missing cpu_env arguments. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Synchronize FPU state with KVMDavid Gibson2013-03-081-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently qemu does not get and put the state of the floating point and vector registers to KVM. This is obviously a problem for savevm, as well as possibly being problematic for debugging of FP-using guests. This patch fixes this by using new extensions to the ONE_REG interface to synchronize the qemu floating point state with KVM. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Add mechanism for synchronizing SPRs with KVMDavid Gibson2013-03-083-57/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when runing under KVM on ppc, we synchronize a certain number of vital SPRs to KVM through the SET_SREGS call. This leaves out quite a lot of important SPRs which are maintained in KVM. It would be helpful to have their contents in qemu for debugging purposes, and when we implement migration it will be vital, since they include important guest state that will need to be restored on the target. This patch sets up for synchronization of any registers supported by the KVM ONE_REG calls. A new variant on spr_register() allows a ONE_REG id to be stored with the SPR information. When we set/get information to KVM we also synchronize any SPRs so registered. For now we set this mechanism up to synchronize a handful of important registers that already have ONE_REG IDs, notably the DAR and DSISR. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | Save memory allocation in the elf loaderFabien Chouteau2013-03-083-21/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current elf loader uses too much memory. For example, I have a executable with a bss section of 400 MB and I set the ram size to 512 MB. Qemu uses about 780MB of RAM (which is fine), but there's a peak at 1.6 GB during initialization (this is not fine). This patch fixes two things: 1) do not allocate each elf program twice. 2) do not allocate memory for areas that are only zeros. For this we need a new field in Rom: "datasize" which is the size of the allocated data. If datasize is less than romsize, it means that the area from datasize to romsize is filled with zeros. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | pseries: Implement h_read hcallErlon Cruz2013-03-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This h_call is useful for DLPAR in future amongst other things. Given an index it fetches the corresponding PTE stored in the htab. Signed-off-by: Erlon Cruz <erlon.cruz@br.flextronics.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Change "POWER7" CPU aliasAndreas Färber2013-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let it resolve to v2.3 rather than v2.0. Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Fix remaining microcontroller typos among modelsAndreas Färber2013-03-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | controler -> controller Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| | * | target-ppc: Split model definitions out of translate_init.cAndreas Färber2013-03-084-1905/+1955
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that model definitions only reference their parent type, model definitions are independent of the family definitions and can be compiled independently of TCG translation. Keep all #if defined(TODO) code local to cpu-models.c. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud