summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vmstate: Move VMState code to vmstate.cEduardo Habkost2014-01-133-645/+651
| | | | | | | | | This will allow unit tests to be written for VMState code without pulling dependencies from the savevm code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm.c: Coding style fixEduardo Habkost2014-01-131-1/+2
| | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm.c: Coding style fixesEduardo Habkost2014-01-131-31/+44
| | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* savevm: Convert all tabs to spacesEduardo Habkost2014-01-131-9/+9
| | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Move QEMU_VM_* defines to migration/migration.hEduardo Habkost2014-01-132-11/+11
| | | | | | | | | The VMState code will be moved to vmstate.c and it uses some of the QEMU_VM_* constants, so move it to a header. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: Make a few functions non-staticEduardo Habkost2014-01-132-4/+8
| | | | | | | | | | | | | | | The QEMUFile code will be moved to qemu-file.c. This will require making the following functions non-static because they are used by the savevm.c code: * qemu_peek_byte() * qemu_peek_buffer() * qemu_file_skip() * qemu_file_set_error() Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Fix rate limitMatthew Garrett2014-01-131-1/+1
| | | | | | | | | | | | The migration thread appears to want to allow writeout to occur at full speed rather than being rate limited during completion of state saving, but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes problems if there's more than 2GB of state left to save at this point. It probably ought to just be INT64_MAX instead. Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* introduce MIG_STATE_CANCELLING stateZhanghaoyu (A)2014-01-131-10/+16
| | | | | | | | | Introduce MIG_STATE_CANCELLING state to avoid starting a new migration task while the previous one still exist. Signed-off-by: Zeng Junliang <zengjunliang@huawei.com> Signed-off-by: Zhang Haoyu <haoyu.zhang@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* avoid a bogus COMPLETED->CANCELLED transitionZhanghaoyu (A)2014-01-131-1/+8
| | | | | | | | | | Avoid a bogus COMPLETED->CANCELLED transition. There is a period of time from the timing of setting COMPLETED state to that of migration thread exits, so during which it's problematic in COMPLETED->CANCELLED transition. Signed-off-by: Zeng Junliang <zengjunliang@huawei.com> Signed-off-by: Zhang Haoyu <haoyu.zhang@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Merge remote-tracking branch 'pmaydell/tags/pull-cocoa-20140112' into stagingAnthony Liguori2014-01-122-37/+64
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cocoa queue: * pass command key to guest when VM has mousegrab * add .qcow2 to extension list for image load dialog * fix bugs in code for starting QEMU via image load dialog * fix resize/redraw interaction * draw window black if guest hasn't sent anything to screen * minor style/typo fixes * add myself as cocoa co-maintainer # gpg: Signature made Sun 12 Jan 2014 02:45:52 PM PST using RSA key ID 14360CDE # gpg: Can't check signature: public key not found * pmaydell/tags/pull-cocoa-20140112: MAINTAINERS: add myself as cocoa UI co-maintainer ui/cocoa: Remove stray tabs ui/cocoa: Draw black rectangle if we have no data yet ui/cocoa: Redraw at correct size when switching surface ui/cocoa: Fix code for starting QEMU via image file load dialog ui/cocoa: Add ".qcow2" to extension list for image load dialog ui/cocoa: Send warning message to stderr, not stdout ui/cocoa: Correct typos in comments and variable names ui/cocoa: Pass command key through to guest when VM has mousegrab Message-id: 1389567158-31066-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * MAINTAINERS: add myself as cocoa UI co-maintainerPeter Maydell2014-01-121-0/+1
| | | | | | | | | | | | | | | | | | Add myself to the maintainers list for the cocoa UI; status remains "Odd Fixes". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Andreas Färber <andreas.faerber@web.de> Message-id: 1387207075-10280-1-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Remove stray tabsPeter Maydell2014-01-121-3/+3
| | | | | | | | | | | | | | | | The ui/cocoa.m file has just three lines with hardcoded tabs; fix them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1387886052-27067-1-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Draw black rectangle if we have no data yetPeter Maydell2014-01-121-1/+6
| | | | | | | | | | | | | | | | | | | | If our redraw method is called before we have any data from the guest, then draw a black rectangle rather than leaving the window empty. This mostly only matters when the guest machine has no framebuffer device, but it is more in line with the behaviour of other QEMU UIs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-3-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Redraw at correct size when switching surfacePeter Maydell2014-01-121-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the surface switch involved a resize, we were doing the redraw at the old size rather than the new, because the update of screen.width and screen.height was being done after the setFrame method calls which triggered a redraw. Normally this isn't very noticeable because typically after the guest triggers the window resize it also draws something to it, which will in turn cause us to redraw. However, the combination of a guest which never draws to the display and a command line setting of a screen size larger than the default can reveal odd effects. Move most of the handling of resizes to the top of the method, and guard it with a check that the surface size actually changed, to avoid unnecessary operations (including some user visible ones like "recenter the window on the screen") if the surface is the same size as the old one. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-2-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Fix code for starting QEMU via image file load dialogPeter Maydell2014-01-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of bugs in the code for starting QEMU via the image file load dialog: * use the actual argv[0] rather than "qemu": this avoids failures to find BIOS image files caused by not looking in the correct directory relative to the executable path * allocate a large enough argv array to NULL terminate it * use g_strdup(X) rather than g_strdup_printf("%s", X) or g_strdup_printf(X) * disable the printing of the simulated command line argument (which is presumably intended for debug only) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-6-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Add ".qcow2" to extension list for image load dialogPeter Maydell2014-01-121-1/+1
| | | | | | | | | | | | | | | | | | Add ".qcow2" to the list of file extensions which are accepted by the initial disk image load dialog which is displayed if the user runs QEMU without any command line arguments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-5-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Send warning message to stderr, not stdoutPeter Maydell2014-01-121-1/+1
| | | | | | | | | | | | | | | | Bring a warning message into line with the others in this file by sending it to stderr, not stdout. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-4-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Correct typos in comments and variable namesPeter Maydell2014-01-121-14/+14
| | | | | | | | | | | | | | | | Fix various non-user-visible typos in comments and variable names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1386543546-31919-3-git-send-email-peter.maydell@linaro.org
| * ui/cocoa: Pass command key through to guest when VM has mousegrabPeter Maydell2014-01-121-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guest might want to be able to use the command key for its won purposes (as command if it is MacOS X, or for the Windows key if it is a PC guest, for instance). In line with other UI frontends, pass it through if the guest has mousegrab, and only use it for UI menu accelerators if not grabbed. Thanks to John Arbuckle for reporting this problem, helping us work through what the best solution would be and providing a patch which was the initial inspiration for this one. Reported-by: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-2-git-send-email-peter.maydell@linaro.org
* | Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20140112' into ↵Anthony Liguori2014-01-121-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | staging target-arm queue: * build fix for bigendian hosts # gpg: Signature made Sun 12 Jan 2014 01:38:22 PM PST using RSA key ID 14360CDE # gpg: Can't check signature: public key not found * pmaydell/tags/pull-target-arm-20140112: arm: fix compile on bigendian host Message-id: 1389562970-30944-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * arm: fix compile on bigendian hostAlexey Kardashevskiy2014-01-121-1/+1
|/ | | | | Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2014-01-102-1/+30
|\ | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi-disk: add UNMAP limits to block limits VPD page block/iscsi: use a bh to schedule co reentrance Message-id: 1387720926-11421-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * scsi-disk: add UNMAP limits to block limits VPD pagePaolo Bonzini2013-12-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux prefers WRITE SAME to UNMAP if the limits are zero, and WRITE SAME does not discard anything unless the device can guarantee that the resulting block is zero. Setting the maximum unmap block and descriptor counts to non-zero makes Linux choose UNMAP and fixes thin provisioning on glusterfs. While the maximum unmap block count can have some effect on performance, the (suggested) maximum number of descriptors is not particularly important so I didn't add a customization option. SCSI drivers are used to online firmware updates so I'm not yet adding versioning support for SCSI, but we're probably getting close to the point when it's worth thinking about it. Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * block/iscsi: use a bh to schedule co reentrancePeter Lieven2013-12-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this fixes a potential segfault and performance regression. If the coroutine is reentered directly in the iscsi_co_generic_cb iscsi_process_{read,write} are interrupted and reentered any time later. One the one hand this could happen after an iscsi_close where the iscsi context is already gone (segfault). On the other hand this limits the number of processed callbacks in each aio_dispatch to one (potential performance regression). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2014-01-1024-541/+535
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/block: commit: Remove unused check qemu-iotests: Update test cases for commit active commit: Support commit active layer block: Add commit_active_start() mirror: Move base to MirrorBlockJob mirror: Don't close target qemu-iotests: drop duplicate virtio-blk initialization failure vmdk: Allow vmdk_create to work with protocol vmdk: Check VMFS extent line field number docs: updated qemu-img man page and qemu-doc to reflect VHDX support. block: vhdx - improve error message, and .bdrv_check implementation block/iscsi: Fix compilation for libiscsi 1.4.0 (API change) qapi-schema: fix QEMU 1.8 references dataplane: replace hostmem with memory_region_find dataplane: change vring API to use VirtQueueElement vring: factor common code for error exits vring: create a common function to parse descriptors sheepdog: fix dynamic grow for running qcow2 format Message-id: 1387554416-5837-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * | commit: Remove unused checkFam Zheng2013-12-201-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We support top == active for commit now, remove the check and add an assertion here. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-iotests: Update test cases for commit activeFam Zheng2013-12-201-42/+32
| | | | | | | | | | | | | | | | | | | | | | | | Factor out commit test common logic into super class, and update test of committing the active image. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | commit: Support commit active layerFam Zheng2013-12-203-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If active is top, it will be mirrored to base, (with block/mirror.c code), then the image is switched when user completes the block job. QMP documentation is updated. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Add commit_active_start()Fam Zheng2013-12-202-19/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit_active_start is implemented in block/mirror.c, It will create a job with "commit" type and designated base in block-commit command. This will be used for committing active layer of device. Sync mode is removed from MirrorBlockJob because there's no proper type for commit. The used information is is_none_mode. The common part of mirror_start and commit_active_start is moved to mirror_start_job(). Fix the comment wording for commit_start. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | mirror: Move base to MirrorBlockJobFam Zheng2013-12-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows setting the base before entering mirror_run, commit will make use of it. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | mirror: Don't close targetFam Zheng2013-12-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Let reference count manage target and don't call bdrv_close here. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-iotests: drop duplicate virtio-blk initialization failureStefan Hajnoczi2013-12-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 75884afd5c6c42e523b08565e289dbe319e17ad9 ("virtio-blk: Convert to QOM realize") dropped a duplicate error_report() call. Now we no longer get the following error message twice: QEMU_PROG: -drive if=virtio: Device initialization failed. Update qemu-iotests 051. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vmdk: Allow vmdk_create to work with protocolFam Zheng2013-12-201-69/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves vmdk_create to use bdrv_* functions to replace qemu_open and other fd functions. The error handling are improved as well. One difference is that bdrv_pwrite will round up buffer to sectors, so for description file, an extra bdrv_truncate is used in the end to drop inding zeros. Notes: - A bonus bug fix is correct endian is used in initializing GD entries. - ROUND_UP and DIV_ROUND_UP are used where possible. I tested that new code produces exactly the same file as previously. Signed-off-by: Fam Zheng <famz@redhat.com> Tested-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vmdk: Check VMFS extent line field numberFam Zheng2013-12-203-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VMFS extent line in description file should be with 4 fields: RW <size> VMFS "file-name.vmdk" Check the number explicitly and report error if offset is appended as FLAT, which should be invalid format. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | docs: updated qemu-img man page and qemu-doc to reflect VHDX support.Jeff Cody2013-12-202-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The man page for qemu-img, and the qemu-doc, did not mention VHDX as a supported format. This adds in reference to VHDX in those documents. [Stefan Weil <sw@weilnetz.de> suggested s/Block Size/Block size/ for consistency. I have made this change. --Stefan] Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: vhdx - improve error message, and .bdrv_check implementationJeff Cody2013-12-203-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a dirty log file to be replayed in a VHDX image, it is replayed in .vhdx_open(). However, if the file is opened read-only, then a somewhat cryptic error message results. This adds a more helpful error message for the user. If an image file contains a log to be replayed, and is opened read-only, the user is instructed to run 'qemu-img check -r all' on the image file. Running qemu-img check -r all will cause the image file to be opened r/w, which will replay the log file. If a log file replay is detected, this is flagged, and bdrv_check will increase the corruptions_fixed count for the image. [Fixed typo in error message that was pointed out by Eric Blake <eblake@redhat.com>. --Stefan] Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block/iscsi: Fix compilation for libiscsi 1.4.0 (API change)Stefan Weil2013-12-202-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function iscsi_read10_task got additional parameters starting with version libiscsi 1.5.0. libiscsi 1.4.0 is still widely used (Debian wheezy, jessie and other Linux distributions currently provide packages for QEMU which use it), so we still need support for this older API. Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qapi-schema: fix QEMU 1.8 referencesStefan Hajnoczi2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving boldly on to QEMU 2.0 in the next release. Some patches written at a time where we assumed 1.8 would be the next version number managed to sneak in. s/1.8/2.0/ in qapi-schema.json Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * | dataplane: replace hostmem with memory_region_findPaolo Bonzini2013-12-205-252/+72
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | dataplane: change vring API to use VirtQueueElementPaolo Bonzini2013-12-203-76/+72
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vring: factor common code for error exitsPaolo Bonzini2013-12-202-13/+22
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vring: create a common function to parse descriptorsPaolo Bonzini2013-12-201-62/+51
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | sheepdog: fix dynamic grow for running qcow2 formatLiu Yuan2013-12-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running qcow2 over sheepdog, we might meet following problem qemu-system-x86_64: shrinking is not supported And cause IO errors to Guest. This is because we abuse bs->total_sectors, which is manipulated by generic block layer and race with sheepdog code. We should directly check if offset > vdi_size to dynamically enlarge the volume instead of 'offset > bs->total_sectors', which will cause problem when following case happens: vdi_size > offset > bs->total_sectors # then trigger sd_truncate() to shrink the volume wrongly. Cc: qemu-devel@nongnu.org Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Reported-by: Hadrien KOHL <hadrien.kohl@gmail.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | | Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2014-01-1018-140/+359
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi,pci,pc,fedora,virtio fixes and enhancements This includes some Preparatory patches for cpu hotplug for q25 and memory hotplug by Igor, tests and memory mapping change by Laszlo and pci reset cleanup by Paolo. There are also some fixes for fedora and virtio: included here since they are test blockers for me. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 23 Dec 2013 08:07:18 AM PST using RSA key ID D28D5469 # gpg: Can't check signature: public key not found * mst/tags/for_anthony: target-arm: fix build with gcc 4.8.2 virtio: add back call to virtio_bus_device_unplugged piix: fix 32bit pci hole qdev: switch reset to post-order qdev: allow both pre- and post-order vists in qdev walking functions pci: clean up resetting of IRQs pci: do not export pci_bus_reset ACPI/DSDT-CPU: cleanup bogus comment ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler acpi: ich9: allow guest to clear SCI rised by GPE acpi: factor out common pm_update_sci() into acpi core acpi: piix4: remove not needed GPE0 mask i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash i440fx-test: generate temporary firmware blob i440fx-test: give each GTest case its own qtest i440fx-test: qtest_start() should be paired with qtest_end() hw/i386/pc_sysfw: support two flash drives pc_piix: document gigabyte_align piix: gigabyte alignment for ram Message-id: 1387815007-1272-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * | | target-arm: fix build with gcc 4.8.2Michael S. Tsirkin2013-12-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5ce4f35781028ce1aee3341e6002f925fdc7aaf3 "target-arm: A64: add set_pc cpu method" introduces an array aarch64_cpus which is zero size if this code is built without CONFIG_USER_ONLY. In particular an attempt to iterate over this array produces a warning under gcc 4.8.2: CC aarch64-softmmu/target-arm/cpu64.o /scm/qemu/target-arm/cpu64.c: In function ‘aarch64_cpu_register_types’: /scm/qemu/target-arm/cpu64.c:124:5: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] for (i = 0; i < ARRAY_SIZE(aarch64_cpus); i++) { ^ cc1: all warnings being treated as errors This is the result of ARRAY_SIZE being an unsigned type, causing "i" to be promoted to unsigned int as well. As zero size arrays are a gcc extension, it seems cleanest to add a dummy element with NULL name, and test for it during registration. We'll be able to drop this when we add more CPUs. Cc: Alexander Graf <agraf@suse.de> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de>
| * | | virtio: add back call to virtio_bus_device_unpluggedPaolo Bonzini2013-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This got lost in a rebase. Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | piix: fix 32bit pci holeGerd Hoffmann2013-12-233-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the 32bit pci hole start at end of ram, so all possible address space is covered. We used to try and make addresses aligned so they are easier to cover with MTRRs, but since they are cosmetic on KVM, this is probably not worth worrying about. Of course the firmware can use less than that. Leaving space unused is no problem, mapping pci bars outside the hole causes problems though. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | qdev: switch reset to post-orderPaolo Bonzini2013-12-234-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-order is the only sensible direction for the reset signals. For example, suppose pre-order is used and the parent has some data structures that cache children state (for example a list of active requests). When the reset method is invoked on the parent, these caches could be in any state. If post-order is used, on the other hand, these will be in a known state when the reset method is invoked on the parent. This change means that it is no longer possible to block the visit of the devices, so the callback is changed to return void. This is not a problem, because PCI was returning 1 exactly in order to achieve the same ordering that this patch implements. PCI can then rely on the qdev core having sent a "reset signal" (whatever that means) to the device, and only do the PCI-specific initialization with pci_do_device_reset. MST: fixed up virtio-ccw Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | qdev: allow both pre- and post-order vists in qdev walking functionsPaolo Bonzini2013-12-232-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resetting should be done in post-order, not pre-order. However, qdev_walk_children and qbus_walk_children do not allow this. Fix it by adding two extra arguments to the functions. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pci: clean up resetting of IRQsPaolo Bonzini2013-12-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pci_device_reset will deassert the INTX pins, and this will make the irq_count array all-zeroes. Check that this is the case, and remove the existing loop which might even unsync irq_count and irq_state. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud