summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | acpi: don't pass overflow_time to acpi_pm1_evt_get_stsGerd Hoffmann2012-02-244-8/+8
| | | | | | | | | | | | | | Pretty pointless, can easily be reached via ACPIREGS now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | acpi: add ACPIREGSGerd Hoffmann2012-02-244-143/+145
| | | | | | | | | | | | | | | | | | | | | | | | All those acpi structs are not independent from each other. Various acpi functions expecting multiple acpi structs passed in are a clean indicator for that ;) So this patch bundles all acpi structs in the new ACPIREGS struct, then use it everythere pass around acpi state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | acpi: move around structsGerd Hoffmann2012-02-241-25/+23
| | | | | | | | | | | | | | | | Group all structs at the top of hw/acpi.h. Just moving around lines, no code changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-02-243-28/+9
|\ \ | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: slirp/misc: fix gcc __warn_memset_zero_len warnings vl.c: Increase width of machine name column in "-M ?" output tcg: Remove unneeded include statements
| * | slirp/misc: fix gcc __warn_memset_zero_len warningsAlon Levy2012-02-241-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | By removing memset altogether (Patch from Stefan Hajnoczi, tested compile only by me). Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | vl.c: Increase width of machine name column in "-M ?" outputPeter Maydell2012-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase the width of the column used for the machine name in the "-M ?" output from 10 to 20 spaces. This fixes the formatting so it looks nice for architectures where a few of the machines have overly long names. (Our current longest machine name is "petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | tcg: Remove unneeded include statementsStefan Weil2012-02-231-12/+0
| |/ | | | | | | | | | | | | | | | | | | | | The standard include files are already included in qemu-common.h. malloc.h and alloca.h were needed for alloca() which was removed from TCG code some years ago when switching from dyngen to TCG (see commit 49516bc0d622112caac9df628caf19010fda8b67). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'mdroth/qga-win32-pull-2-23-12' into stagingAnthony Liguori2012-02-2414-318/+1263
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mdroth/qga-win32-pull-2-23-12: qemu-ga: add win32 guest-shutdown command qemu-ga: add Windows service integration qemu-ga: add initial win32 support qemu-ga: fixes for win32 build of qemu-ga qemu-ga: rename guest-agent-commands.c -> commands-posix.c qemu-ga: separate out common commands from posix-specific ones qemu-ga: move channel/transport functionality into wrapper class qemu-ga: Add schema documentation for types
| * | qemu-ga: add win32 guest-shutdown commandMichael Roth2012-02-231-1/+40
| | | | | | | | | | | | | | | | | | | | | Implement guest-shutdown RPC for Windows. Functionally this should be equivalent to the posix implementation. Original patch by Gal Hammer <ghammer@redhat.com>
| * | qemu-ga: add Windows service integrationMichael Roth2012-02-234-10/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows qemu-ga to function as a Windows service: - to install the service (will auto-start on boot): qemu-ga --service install - to start the service: net start qemu-ga - to stop the service: net stop qemu-ga - to uninstall service: qemu-ga --service uninstall Original patch by Gal Hammer <ghammer@redhat.com>
| * | qemu-ga: add initial win32 supportMichael Roth2012-02-233-1/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a win32 channel implementation that makes qemu-ga functional on Windows using virtio-serial (unix-listen/isa-serial not currently implemented). Unlike with the posix implementation, we do not use GIOChannel for the following reasons: - glib calls stat() on an fd to check whether S_IFCHR is set, which is the case for virtio-serial on win32. Because of that, a one-time check to determine whether the channel is readable is done by making a call to PeekConsoleInput(), which reports the underlying handle is not a valid console handle, and thus we can never read from the channel. - if one goes as far as to "trick" glib into thinking it is a normal file descripter, the buffering is done in such a way that data written to the output stream will subsequently result in that same data being read back as if it were input, causing an error loop. furthermore, a forced flush of the channel only moves the data into a secondary buffer managed by glib, so there's no way to prevent output from getting read back as input. The implementation here ties into the glib main loop by implementing a custom GSource that continually submits asynchronous/overlapped I/O to fill an GAChannel-managed read buffer, and tells glib to poll the corresponding event handle for a completion whenever there is no data/RPC in the read buffer to notify the main application about.
| * | qemu-ga: fixes for win32 build of qemu-gaMichael Roth2012-02-235-6/+114
| | | | | | | | | | | | | | | | | | Various stubs and #ifdefs to compile for Windows using mingw cross-build. Still has 1 linker error due to a dependency on the forthcoming win32 versions of the GAChannel/transport class.
| * | qemu-ga: rename guest-agent-commands.c -> commands-posix.cMichael Roth2012-02-232-1/+1
| | |
| * | qemu-ga: separate out common commands from posix-specific onesMichael Roth2012-02-234-59/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the current RPC implementations are very much POSIX-specific and require complete re-writes for Windows. There are however a small set of core guest agent commands that are common to both, and other commands such as guest-file-* which *may* be portable. So we introduce commands.c for the latter, and will rename guest-agent-commands.c to commands-posix.c in a future commit. Windows implementations will go in commands-win32.c, eventually.
| * | qemu-ga: move channel/transport functionality into wrapper classMichael Roth2012-02-235-233/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly in preparation for the win32 port, which won't use GIO channels for reasons that will be made clearer later. Here the GAChannel class is just a loose wrapper around GIOChannel calls/callbacks, but we also roll in the logic/configuration for various channel types and managing unix socket connections, which makes the abstraction much more complete and further aids in the win32 port since isa-serial/unix-listen will not be supported initially. There's also a bit of refactoring in the main logic to consolidate the exit paths so we can do common cleanup for things like pid files, which weren't always cleaned up previously.
| * | qemu-ga: Add schema documentation for typesMichael Roth2012-02-231-21/+97
| |/ | | | | | | | | Document guest agent schema types in similar fashion to qmp schema types.
* | Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-02-2412-62/+104
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * qmp/queue/qmp: qmp: add DEVICE_TRAY_MOVED event ide: drop ide_tray_state_post_load() block: Don't call bdrv_eject() if the tray state didn't change block: bdrv_eject(): Make eject_flag a real bool block: Rename bdrv_mon_event() & BlockMonEventAction
| * | qmp: add DEVICE_TRAY_MOVED eventLuiz Capitulino2012-02-224-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's emitted whenever the tray is moved by the guest or by HMP/QMP commands. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
| * | ide: drop ide_tray_state_post_load()Luiz Capitulino2012-02-221-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used to sync the physical tray state after migration when using CD-ROM passthrough. However, migrating when using passthrough is broken anyway and shouldn't be supported... So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED event, which is going to be introduced by the next commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
| * | block: Don't call bdrv_eject() if the tray state didn't changeLuiz Capitulino2012-02-222-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not needed. Besides we can then assume that bdrv_eject() is only called when there's a tray state change, which is useful to the DEVICE_TRAY_MOVED event (going to be added in a future commit). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
| * | block: bdrv_eject(): Make eject_flag a real boolLuiz Capitulino2012-02-225-7/+7
| | | | | | | | | | | | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
| * | block: Rename bdrv_mon_event() & BlockMonEventActionLuiz Capitulino2012-02-225-41/+41
| |/ | | | | | | | | | | | | | | | | | | | | They are QMP events, not monitor events. Rename them accordingly. Also, move bdrv_emit_qmp_error_event() up in the file. A new event will be added soon and it's good to have them next each other. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-02-2469-0/+153385
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: (46 commits) qemu-iotests: common.config: Allow use of arbitrary qemu* paths qemu-iotests: check: print relevant path information qemu-iotests: test loading internal snapshots qemu-iotests: Update filter for default cluster size qemu-iotests: add qed support to 025 image resize test qemu-iotests: Update rbd support qemu-iotests: common.config: Fix no $TEST_DIR directory qemu-iotests: only run 016 for file and sheepdog protocols qemu-iotests: Use zero-based offsets for IO patterns qemu-iotests: add support for rbd and sheepdog protocols qemu-iotests: filter IMGFMT correctly in 019 qemu-iotests: README: Fix spelling qemu-iotests: add support for qed format qemu-iotests: filter TEST_DIR correctly in 019 qemu-iotests: fix 019 golden output qemu-iotests: update expected results after qemu-img changes qemu-iotests: add read/write from smaller backing image test qemu-iotests: add sub-cluster allocating write test for sparse image formats qemu-iotests: improve test for qemu-img convert with backing file qemu-iotests: consider more cases in parsing qemu-io output ...
| * \ Merge qemu-iotests into for-anthonyKevin Wolf2012-02-2369-0/+153385
| |\ \ | | |/ | |/|
| | * qemu-iotests: common.config: Allow use of arbitrary qemu* pathsLucas Meneghel Rodrigues2012-02-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we might want to test arbitrary qemu, qemu-img and qemu-io paths, allow users to specify environment variable values for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG so the testsuite will use those values rather than find them on PATH. Obviously, if such env variables are not set prior to script execution, normal detection mechanism takes place. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: check: print relevant path informationLucas Meneghel Rodrigues2012-02-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Print the paths of the programs under test (qemu, qemu-img and qemu-io). Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: test loading internal snapshotsKevin Wolf2012-02-233-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | Test loading internal snapshots where the L1 table of the snapshot is smaller than the current L1 table. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: Update filter for default cluster sizeKevin Wolf2012-02-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until recently, qemu-img create displayed cluster_size=0 for the default cluster size. It is changed to display the real cluster size now, which results in the cluster size not being filtered out any more. If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output, and if using the default, filter it out. This mostly restores the old behaviour of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using extra_img_options for it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: add qed support to 025 image resize testStefan Hajnoczi2012-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QED now supports the truncate (aka resize) operation for growing images. Update test 025 so it runs for QED. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: Update rbd supportJosh Durgin2012-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | rbd implements bdrv_truncate, so test 025 will work. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: common.config: Fix no $TEST_DIR directoryMitnick Lyu2012-02-231-1/+5
| | | | | | | | | | | | | | | | | | | | | mkdir $TEST_DIR on common.config first run Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: only run 016 for file and sheepdog protocolsChristoph Hellwig2012-02-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 016 writes past EOF which isn't support by most protocols, so limit it to file and sheepdog, which explicitly support it. Pointed out by Josh Durgin <josh.durgin@dreamhost.com>. Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: Use zero-based offsets for IO patternsStefan Hajnoczi2012-02-2312-1863/+1873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The io_pattern style functions have the following loop: for i in `seq 1 $count`; do echo ... $(( start + i * step )) ... done Offsets are 1-based so start=1024, step=512, count=4 yields: 1536, 2048, 2560, 3072 Normally we expect: 1024, 1536, 2048, 2560 Most tests ignore this detail, which means that they perform I/O to a slightly different range than expected by the test author. Later on things got less innocent and tests started trying to compensate for the 1-based indexing. This included negative start values in test 024 and my own attempt with count-1 in test 028! The end result is that tests that use io_pattern are hard to reason about and don't work the way you'd expect. It's time to clean this mess up. This patch switches io_pattern to 0-based offsets. This requires adjusting the golden outputs since I/O ranges are now shifted and output differs. Verifying these output diffs is easy, however. Each diff hunk moves one I/O from beyond the end of the pattern range to the beginning. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: add support for rbd and sheepdog protocolsMORITA Kazutaka2012-02-2331-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | This patch introduces tests for protocols other than file, and initially supports rbd and sheepdog. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: filter IMGFMT correctly in 019Stefan Hajnoczi2012-02-233-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test 019 can be run with qcow2 and qed image formats. Replace the specific image format value with "IMGFMT" so the golden output does not hardcode qcow2 or qed. This patch also includes a typo fix for "occurrences". Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: README: Fix spellingStefan Weil2012-02-231-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: add support for qed formatStefan Hajnoczi2012-02-239-9/+16
| | | | | | | | | | | | | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: filter TEST_DIR correctly in 019Christoph Hellwig2012-02-232-3/+3
| | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| | * qemu-iotests: fix 019 golden outputKevin Wolf2012-02-221-15/+562
| | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: update expected results after qemu-img changesKevin Wolf2012-02-221-30/+90
| | | | | | | | | | | | | | | | | | | | | | | | The error message for leaked clusters has changed. qemu-iotests needs to be updated to pass 026 again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: add read/write from smaller backing image testStefan Hajnoczi2012-02-223-0/+560
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some image formats support backing images that are smaller than the image file. This patch adds a test that verifies that reads and writes beyond the end of backing image work. Unallocated reads beyond the end of the backing file should produce zeroes. Writes beyond the end of the backing file should copy-on-write using zeroes. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: add sub-cluster allocating write test for sparse image formatsStefan Hajnoczi2012-02-223-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Image formats that grow the image file on demand and are organized into clusters must handle sub-cluster allocating writes. Such writes touch a portion of a previously unallocated data cluster. After the image file is grown with the written data, reads of that cluster should work as expected: 1. Sectors before the written region are zero. 2. The written region is present and the data is uncorrupted. 3. Sectors after the written region are zero. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: improve test for qemu-img convert with backing fileKevin Wolf2012-02-221-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally to testing the qemu-img convert -B option, also test -o backing_file. Also, the old test acidentlly used a pattern of zeros for most of the writes, so that the allocation test didn't really work out. This is fixed by using an explicit pattern. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: consider more cases in parsing qemu-io outputKevin Wolf2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got a bug report with test output diffs like this: -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +4 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec) This patch extends the regular expression to consider terabytes, petabytes and exabytes, and to allow inf as value for the throughput. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: qcow2 error path testsKevin Wolf2012-02-223-0/+751
| | | | | | | | | | | | | | | | | | | | | This adds test cases for qcow2 error paths (using blkdebug) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: improve rebase testKevin Wolf2012-02-222-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | The old test didn't consider cases in which the COW files contains some unallocated clusters and after them allocated ones again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: test bdrv_truncateStefan Hajnoczi2012-02-223-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds an image resize grow test to ensure that existing data is not lost during grow and new space is zeroed. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: explicitly use bash interpreterStefan Hajnoczi2012-02-2230-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | The tests use bash language features like 'let', which aren't supported by /bin/sh on systems that use a conservative shell like dash. This patch changes the interpreter to /bin/bash. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: test qemu-img rebaseKevin Wolf2012-02-223-0/+186
| | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| | * qemu-iotests: test larger clusters sizes on qcow2Kevin Wolf2012-02-227-818/+26645
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds test case 023 which tests some more cluster sizes. For anythinger larger than 4k clusters we can't use requests that are l2_size or more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters). Therefore one of the common.pattern cases is changed and needs new expected results for some old test cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
OpenPOWER on IntegriCloud