summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | linux-user: don't include timerfd if not neededRiku Voipio2014-10-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, builds on older systems fail with: qemu/linux-user/syscall.c:61:25: warning: sys/timerfd.h: No such file or directory v2: fix the usual case where CONFIG_TIMERFD is enabled.. Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * | linux-user: Simplify timerid checks on g_posix_timers rangeAlexander Graf2014-10-061-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check whether the passed in timer id is negative on all calls that involve g_posix_timers. However, these checks are bogus. First off we limit the timer_id to 16 bits which is not what Linux does. Then we check whether it's negative which it can't be because we masked it. We can safely remove the masking. For the negativity check we can just treat the timerid as unsigned and only check for upper boundaries. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * | linux-user: Convert blkpg to use a special subop handlerAlexander Graf2014-10-063-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The blkpg ioctl can take different payloads depending on the opcode in its payload structure. Create a new special ioctl handler that can only deal with partition style ones for now. This patch fixes running parted for me. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * | linux-user: Enable epoll_pwait syscall for ARMPeter Maydell2014-10-061-1/+1
|/ / | | | | | | | | | | | | | | | | | | We have support for the epoll_pwait syscall, but it wasn't enabled for ARM guests because we hadn't defined the syscall number; correct this deficiency. Reported-by: Dave Flogeras <dflogeras2@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* | gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flagPeter Maydell2014-10-067-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GDB assumes that watchpoint set via the gdbstub remote protocol will behave in the same way as hardware watchpoints for the target. In particular, whether the CPU stops with the PC before or after the insn which triggers the watchpoint is target dependent. Allow guest CPU code to specify which behaviour to use. This fixes a bug where with guest CPUs which stop before the accessing insn GDB would manually step forward over what it thought was the insn and end up one insn further forward than it should be. We set this flag for the CPU architectures which set gdbarch_have_nonsteppable_watchpoint in gdb 7.7: ARM, CRIS, LM32, MIPS and Xtensa. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: Michael Walle <michael@walle.cc> (for lm32) Message-id: 1410545057-14014-1-git-send-email-peter.maydell@linaro.org
* | Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-10-0652-285/+500
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Sat 04 Oct 2014 21:24:46 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (23 commits) blockdev-test: Test device_del after drive_del blockdev-test: Factor out some common code into helpers blockdev-test: Simplify by using g_assert_cmpstr() blockdev-test: Clean up bogus drive_add argument blockdev-test: Use single rather than double quotes in QMP drive_del-test: Merge of qdev-monitor-test, blockdev-test iotests: qemu-img info output for corrupt image qapi: Add corrupt field to ImageInfoSpecificQCow2 iotests: Use _img_info util: Emancipate id_wellformed() from QemuOpts q35/ahci: Pick up -cdrom and -hda options qtest/bios-tables: Correct Q35 command line ide: Update ide_drive_get to be HBA agnostic pc/vl: Add units-per-default-bus property blockdev: Allow overriding if_max_dev property blockdev: Orphaned drive search qemu-iotests: Fix supported cache modes for 052 make check-block: Use default cache modes Modify qemu_opt_rename to realize renaming all items in opts vmdk: Fix integer overflow in offset calculation ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | blockdev-test: Test device_del after drive_delMarkus Armbruster2014-10-041-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Executed in this order, drive_del and device_del's automatic drive deletion take notoriously tricky special paths. [Fixed "an device" -> "a device" typo as requested by Eric Blake. --Stefan] Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-7-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev-test: Factor out some common code into helpersMarkus Armbruster2014-10-041-25/+25
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-6-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev-test: Simplify by using g_assert_cmpstr()Markus Armbruster2014-10-041-7/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-5-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev-test: Clean up bogus drive_add argumentMarkus Armbruster2014-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first argument should be a PCI address, which pci-addr=auto isn't. Doesn't really matter, as drive_add ignores its first argument when its second argument has if=none. Clean it up anyway. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-4-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev-test: Use single rather than double quotes in QMPMarkus Armbruster2014-10-041-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMP accepts both single and double quotes. This is the only test using double quotes. They need to be quoted in C strings. Replace them by single quotes. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-3-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | drive_del-test: Merge of qdev-monitor-test, blockdev-testMarkus Armbruster2014-10-043-75/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each of qdev-monitor-test and blockdev-test has just one test case, and both are about drive_del. [Extended copyright from 2013 to 2013-2014 as requested by Eric Blake. --Stefan] Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412261496-24455-2-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | iotests: qemu-img info output for corrupt imageMax Reitz2014-10-042-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "corrupt" entry in the format-specific information section should be "true". Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412105489-7681-4-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qapi: Add corrupt field to ImageInfoSpecificQCow2Max Reitz2014-10-046-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like lazy-refcounts, this field will be present iff the qcow2 compat level is 1.1 (or probably any future revision). As expected, this breaks some tests due to the new field present in qemu-img info output; so fix their output accordingly. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412105489-7681-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | iotests: Use _img_infoMax Reitz2014-10-046-68/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu-img info should only be used directly if the format-specific information or the name of the format is relevant (some tests explicitly test format-specific information; test 082 uses qcow2-specific settings to test the qemu-img interface); otherwise, tests should always use _img_info instead. Test 082 was touched only partially. It does test the qemu-img interface; however, its invocations of qemu-img info are not real tests but rather verifications, so if format-specific information is not important for the test, there is no reason not to use _img_info. In contrast to directly invoking qemu-img info, "qcow2" is replaced by "IMGFMT"; but as "qcow2" is only mentioned once in test 082 (in _supported_fmt), I consider this an improvement. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412105489-7681-2-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | util: Emancipate id_wellformed() from QemuOptsMarkus Armbruster2014-10-036-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IDs have long spread beyond QemuOpts: not everything with an ID necessarily goes through QemuOpts. Commit 9aebf3b is about such a case: block layer names are meant to be well-formed IDs, but some of them don't go through QemuOpts, and thus weren't checked. The commit fixed that the straightforward way: rename the internal QemuOpts helper id_wellformed() to qemu_opts_id_wellformed() and give it external linkage. Instead of using it directly in block.c, the commit adds wrapper bdrv_is_valid_name(), probably to hide the connection to QemuOpts. Go one logical step further: emancipate IDs from QemuOpts. Rename the function back to id_wellformed(), and put it in another file. While there, clean up its value to bool. Peel off the bdrv_is_valid_name() wrapper. [Replaced stray return 0 with return false to match bool returns used elsewhere in id_wellformed(). --Stefan] Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | q35/ahci: Pick up -cdrom and -hda optionsJohn Snow2014-10-033-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the backend for the Q35 board for us to be able to pick up and use drives defined by the -cdrom, -hda, or -drive if=ide shorthand options. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1412187569-23452-7-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qtest/bios-tables: Correct Q35 command lineJohn Snow2014-10-031-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the Q35 board types are to begin recognizing and decoding syntactic sugar for drive/device declarations, then workarounds found within the qtests suite need to be adjusted to prevent any test failures after the fix. bios-tables-test improperly uses this cli: -drive file=etc,id=hd -device ide-hd,drive=hd Which will create a drive and device due to the lack of specifying if=none. Then, it will attempt to create a second device and fail. This patch corrects this test to always use the full, non-sugared -device/-drive syntax for both PC and Q35. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1412187569-23452-6-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | ide: Update ide_drive_get to be HBA agnosticJohn Snow2014-10-0312-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI HBAs as well, and can be used in the Q35 initialization. Lastly, change the nature of the argument to ide_drive_get so that represents the number of total drives we can support, and not the total number of buses. This will prevent array overflows if the units-per-default-bus property ever needs to be adjusted for compatibility reasons. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1412187569-23452-5-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | pc/vl: Add units-per-default-bus propertyJohn Snow2014-10-034-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the 'units_per_default_bus' property which allows individual boards to declare their desired index => (bus,unit) mapping for their default HBA, so that boards such as Q35 can specify that its default if_ide HBA, AHCI, only accepts one unit per bus. This property only overrides the mapping for drives matching the block_default_type interface. This patch also adds this property to *all* past and present Q35 machine types. This retroactive addition is justified because the previous erroneous index=>(bus,unit) mappings caused by lack of such a property were not utilized due to lack of initialization code in the Q35 init routine. Further, semantically, the Q35 board type has always had the property that its default HBA, AHCI, only accepts one unit per bus. The new code added to add devices to drives relies upon the accuracy of this mapping. Thus, the property is applied retroactively to reduce complexity of allowing IDE HBAs with different units per bus. Examples: Prior to this patch, all IDE HBAs were assumed to use 2 units per bus (Master, Slave). When using Q35 and AHCI, however, we only allow one unit per bus. -hdb foo.qcow2 would become index=1, or bus=0,unit=1. -hdd foo.qcow2 would become index=3, or bus=1,unit=1. -drive file=foo.qcow2,index=5 becomes bus=2,unit=1. These are invalid for AHCI. They now become, under Q35 only: -hdb foo.qcow2 --> index=1, bus=1, unit=0. -hdd foo.qcow2 --> index=3, bus=3, unit=0. -drive file=foo.qcow2,index=5 --> bus=5,unit=0. The mapping is adjusted based on the fact that the default IF for the Q35 machine type is IF_IDE, and units-per-default-bus overrides the IDE mapping from its default of 2 units per bus to just 1 unit per bus. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1412187569-23452-4-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev: Allow overriding if_max_dev propertyJohn Snow2014-10-032-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if_max_devs table as in the past been an immutable default that controls the mapping of index => (bus,unit) for all boards and all HBAs for each interface type. Since adding this mapping information to the HBA device itself is currently unwieldly from the perspective of retrieving this information at option parsing time (e.g, within drive_new), we consider the alternative of marking the if_max_devs table mutable so that later configuration and initialization can adjust the mapping at will, but only up until a drive is added, at which point the mapping is finalized. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1412187569-23452-3-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev: Orphaned drive searchJohn Snow2014-10-033-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When users use command line options like -hda, -cdrom, or even -drive if=ide, it is up to the board initialization routines to pick up these drives and create backing devices for them. Some boards, like Q35, have not been doing this. However, there is no warning explaining why certain drive specifications are just silently ignored, so this function adds a check to print some warnings to assist users in debugging these sorts of issues in the future. This patch will not warn about drives added with if_none, for which it is not possible to tell in advance if the omission of a backing device is an issue. A warning in these cases is considered appropriate. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1412187569-23452-2-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-iotests: Fix supported cache modes for 052Kevin Wolf2014-10-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The requirement for this test case is really "no O_DIRECT", because the temporary snapshot for BDRV_O_SNAPSHOT is created in /tmp, which often is a tmpfs. Commit f210a83c ('qemu-iotests: Add _default_cache_mode and _supported_cache_modes') turned the restriction into writethrough-only, but that's not really necessary. Allow to run the test for any non-O_DIRECT cache modes, and use the global default of writeback if no cache mode is specified. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1412076430-11623-3-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | make check-block: Use default cache modesKevin Wolf2014-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qemu-iotests only gave a choice between cache=none and cache=writethrough, we picked cache=none because it was the option that would complete the test in finite time. Some tests could only work for one of the two options and would be skipped with cache=none, but that was an acceptable trade-off at the time. Today, however, qemu-iotests is a bit more flexible than that and you can specify any of the cache modes supported by qemu. The default is writeback, like in qemu, which is fast and (unlike cache=none) compatible with any host filesystem. Test cases that have specific requirements for the cache mode can also specify a different default. In order to get a fast test run that works everywhere and doesn't skip tests that need a different cache mode, not specifying any cache mode and instead relying on the default is the best we can do today. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1412076430-11623-2-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | Modify qemu_opt_rename to realize renaming all items in optsJun Li2014-10-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add realization of rename all items in opts for qemu_opt_rename. e.g: When add bps twice in command line, need to rename all bps to throttling.bps-total. This patch solved following bug: Bug 1145586 - qemu-kvm will give strange hint when add bps twice for a drive ref:https://bugzilla.redhat.com/show_bug.cgi?id=1145586 [Resolved conflict with commit 5abbf0ee4d87c695deb1c3fca9bb994b93a3e3be ("block: Catch simultaneous usage of options and their aliases"). Check for simultaneous use first, and then loop over all options. --Stefan] Signed-off-by: Jun Li <junmuzi@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1411537527-16715-1-git-send-email-junmuzi@gmail.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vmdk: Fix integer overflow in offset calculationFam Zheng2014-10-034-1/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1411437381-11234-1-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Drop superfluous conditionals around qemu_opts_del()Markus Armbruster2014-10-033-9/+3
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1411999675-14533-1-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | ssh: Don't crash if either host or path is not specified.Richard W.M. Jones2014-10-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ ./qemu-img create -f qcow2 overlay \ -b 'json: { "file.driver":"ssh", "file.host":"localhost", "file.host_key_check":"no" }' qemu-img: qobject/qdict.c:193: qdict_get_obj: Assertion `obj != ((void *)0)' failed. Aborted A similar crash also happens if the file.host field is omitted. https://bugzilla.redhat.com/show_bug.cgi?id=1147343 Bug found and reported by Jun Li. Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | snapshot: fix referencing wrong variable in while loop in do_delvmZhang Haoyu2014-10-031-6/+5
|/ / | | | | | | | | | | | | | | | | | | The while loop variabal is "bs1", but "bs" is always passed to bdrv_snapshot_delete_by_id_or_name. Broken in commit a89d89d, v1.7.0. Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20141002-1' ↵Peter Maydell2014-10-024-2/+126
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging input monitor patches: fix send-key release ordering and new input-send-event command # gpg: Signature made Thu 02 Oct 2014 09:10:44 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-input-20141002-1: add input-send-event command input: fix send-key monitor command release event ordering Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | add input-send-event commandMarcelo Tosatti2014-10-023-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which allows specification of absolute/relative, up/down and console parameters. Suggested by Gerd Hoffman. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | input: fix send-key monitor command release event orderingGerd Hoffmann2014-10-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2e377f1730d06deafb3e3ef6cf88792de4a6f4df changed the ordering of the release events as side effect. Some guests are not happy with that and don't recognise ctrl-alt-del any more. This patch restores the old last-pressed first-released behavior. Cc: Amos Kong <akong@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-20141002-1' ↵Peter Maydell2014-10-021-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging pixman: fix qemu_default_pixman_format (32bpp non-native endian) # gpg: Signature made Thu 02 Oct 2014 08:47:20 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-console-20141002-1: pixman: fix qemu_default_pixman_format (32bpp non-native endian) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | pixman: fix qemu_default_pixman_format (32bpp non-native endian)Gerd Hoffmann2014-09-301-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Bug breaks SDL display of bigendian guests on little endian hosts. Reported-by: BALATON Zoltan <balaton@eik.bme.hu> Reported-by: Valentin Manea <valentin.manea@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20141002-1' into ↵Peter Maydell2014-10-025-590/+296
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging vga: cleanups, prepare for endianness switching # gpg: Signature made Thu 02 Oct 2014 08:10:49 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vga-20141002-1: vga: Add endian to vmstate vga: Make fb endian a common state variable vga: Rename vga_template.h to vga-helpers.h vga: Remove some "should be done in BIOS" comments cirrus: Remove non-32bpp cursor drawing vga: Simplify vga_draw_blank() a bit vga: Remove rgb_to_pixel indirection vga: Separate LE and BE conversion functions vga: Remove remainder of old conversion cruft vga: Start cutting out non-32bpp conversion support Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | vga: Add endian to vmstateBenjamin Herrenschmidt2014-09-302-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include the endian state in the migration stream as an optional subsection which we only include when the endian isn't the default, thus enabling backward compatibility of the common case. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Changes by kraxel: * Remove bochs dispi interface changes. We'll do that in a different way to make sure we don't conflict with possible future bochs dispi interface changes. * keep live migration bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Make fb endian a common state variableBenjamin Herrenschmidt2014-09-302-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | And initialize it based on target endian Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Rename vga_template.h to vga-helpers.hBenjamin Herrenschmidt2014-09-302-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's no longer a template, we only instanciate the file once. Keep it a #included file so the functions remain static. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Remove some "should be done in BIOS" commentsBenjamin Herrenschmidt2014-09-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not all platforms have a VGA BIOS, powerpc typically relies on using the DISPI interface to initialize the card. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | cirrus: Remove non-32bpp cursor drawingBenjamin Herrenschmidt2014-09-302-130/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | We only draw cursor on non-shared surfaces (so it seems...) and these are always 32bpp Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Simplify vga_draw_blank() a bitBenjamin Herrenschmidt2014-09-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The test for surface_bits_per_pixel() isn't necessary anymore, the 8bpp case never happens. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Remove rgb_to_pixel indirectionBenjamin Herrenschmidt2014-09-303-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | We always use rgb_to_pixel32 nowadays. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Separate LE and BE conversion functionsBenjamin Herrenschmidt2014-09-302-40/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide different functions for converting from an LE vs a BE framebuffer. We cannot rely on the simple cases always being shared surfaces since cirrus will need to always shadow for cursor emulation, so we need the full set of functions to be able to later handle runtime switching. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\ Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Remove remainder of old conversion cruftBenjamin Herrenschmidt2014-09-302-178/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the macros used to generate different versions of vga_template.h are now unnecessary, take them all out and remove the _32 suffix from most functions. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| * | vga: Start cutting out non-32bpp conversion supportBenjamin Herrenschmidt2014-09-301-236/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Nowadays, we either share a surface with the host, or we create a 32bpp ARGB console surface. So we only need to draw/convert to 32bpp, enabling us to remove all but one instance of vga_template.h inclusion (to be further cleaned up), rgb_to_pixel_* etc... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
* | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2014-09-3017-294/+755
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update brings dataplane to virtio-scsi (NOT yet 100% thread-safe, though, which makes it really, really experimental. It also brings asynchronous cancellation to the SCSI subsystem and implements it in virtio-scsi. This is a pretty important feature. Almost all the work here was done by Fam Zheng. I also included the virtio refcount fixes from Gonglei, because they had a small conflict with virtio-scsi dataplane. This pull request is using the new subkey 4E6B09D7. # gpg: Signature made Tue 30 Sep 2014 12:31:02 BST using RSA key ID 4E6B09D7 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: (39 commits) block/iscsi: handle failure on malloc of the allocationmap util: introduce bitmap_try_new virtio-scsi: Handle TMF request cancellation asynchronously scsi: Introduce scsi_req_cancel_async scsi: Introduce scsi_req_cancel_complete scsi: Drop SCSIReqOps.cancel_io scsi: Unify request unref in scsi_req_cancel scsi-generic: Handle canceled request in scsi_command_complete scsi: Drop scsi_req_abort virtio-scsi: Process ".iothread" property virtio-scsi: Call bdrv_io_plug/bdrv_io_unplug in cmd request handling virtio-scsi: Batched prepare for cmd reqs virtio-scsi: Two stages processing of cmd request virtio-scsi: Add migration state notifier for dataplane code virtio-scsi: Hook up with dataplane virtio-scsi-dataplane: Code to run virtio-scsi on iothread virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq virtio-scsi: Add 'iothread' property to virtio-scsi virtio: add a wrapper for virtio-backend initialization virtio-9p: fix virtio-9p child refcount in transports ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | block/iscsi: handle failure on malloc of the allocationmapPeter Lieven2014-09-301-7/+12
| | | | | | | | | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | util: introduce bitmap_try_newPeter Lieven2014-09-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | regular bitmap_new simply aborts if the memory allocation fails. bitmap_try_new returns NULL on failure and allows for proper error handling. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: Handle TMF request cancellation asynchronouslyFam Zheng2014-09-302-9/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET, use scsi_req_cancel_async to start the cancellation. Because each tmf command may cancel multiple requests, we need to use a counter to track the number of remaining requests we still need to wait for. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: Introduce scsi_req_cancel_asyncFam Zheng2014-09-302-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices will call this function to start an asynchronous cancellation. The bus->info->cancel will be called after the request is canceled. Devices will probably need to track a separate TMF request that triggers this cancellation, and wait until the cancellation is done before completing it. So we store a notifier list in SCSIRequest and in scsi_req_cancel_complete we notify them. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud