summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17spice: fix multihead supportGerd Hoffmann5-13/+46
This patch fixes spice display initialization to handle multihead properly. spice-core now keeps track of which QemuConsole has a spice display channel attached to it and which has not. It also manages display channel ids. spice-display looks at all QemuConsoles and will pick up any graphic console not yet bound to a spice channel (which in practice are all non-qxl graphic devices). Result is that (a) you'll get a spice client window for each graphical device now (first only without this patch), and (b) mixing qxl and non-qxl vga cards works properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-10-17spice-display: add display channel id to the debug messages.Gerd Hoffmann1-13/+14
And s/__FUNCTION__/__func__/ while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-10-17Fix VNC SASL authentication when using a QXL deviceChristophe Fergeau1-0/+1
ui/vnc.c:vnc_display_open() and spice-server/server/reds.c:do_spice_init() are both calling sasl_server_init(). If spice_server_set_sasl_appname() hasn't been called, spice-server will call it with "spice" as an appname, causing cyrus-sasl to try to use a /etc/sasl2/spice.conf config file rather than the /etc/sasl2/qemu.conf file that QEMU uses. When using -spice sasl on the command line, QEMU properly calls spice_server_set_sasl_appname() to set the SASL appname as "qemu", but when using a QXL device without using SPICE, spice_server_init() is called from qemu_spice_add_interface() without setting the appname to "qemu", which then causes the VNC code to try to use spice.conf instead of qemu.conf. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-10-17spice: replace use of deprecated APIMarc-André Lureau3-21/+20
hose API are deprecated since 0.11, and qemu depends on 0.12 already. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-10-14Merge remote-tracking branch 'rth/tcg-ldst-6' into stagingAnthony Liguori10-901/+722
# By Richard Henderson # Via Richard Henderson * rth/tcg-ldst-6: target-alpha: Convert to new ldst opcodes tcg-ppc64: Support new ldst opcodes tcg-ppc: Support new ldst opcodes tcg-ppc64: Convert to le/be ldst helpers tcg-ppc: Convert to le/be ldst helpers tcg-ppc64: Use TCGMemOp within qemu_ldst routines tcg-ppc: Use TCGMemOp within qemu_ldst routines tcg-arm: Improve GUEST_BASE qemu_ld/st tcg-arm: Convert to new ldst opcodes tcg-arm: Tidy variable naming convention in qemu_ld/st tcg-arm: Convert to le/be ldst helpers tcg-arm: Use TCGMemOp within qemu_ldst routines tcg-i386: Support new ldst opcodes tcg-i386: Remove "cb" output restriction from qemu_st8 for i386 tcg-i386: Tidy softmmu routines tcg-i386: Use TCGMemOp within qemu_ldst routines tcg: Use TCGMemOp for TCGLabelQemuLdst.opc Message-id: 1381620683-4568-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-14Merge remote-tracking branch 'jliu/or32' into stagingAnthony Liguori1-8/+1
# By Sebastian Macke # Via Jia Liu * jliu/or32: target-openrisc: Removes a non-conforming behavior for the first page of the memory target-openrisc: Correct handling of page faults. Message-id: 1380789702-18935-1-git-send-email-proljc@gmail.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-14Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20131010.0' ↵Anthony Liguori1-109/+518
into staging vfio-pci updates include: - Forgotten MSI affinity patch posted several months ago - Lazy option ROM loading to delay load until after device/bus resets - Error reporting cleanups - PCI hot reset support introduced with Linux v3.12 development kernels - Debug build fix for int128 The lazy ROM loading and hot reset should help VGA assignment as we can now do a bus reset when there are multiple devices on the bus, ex. multi-function graphics and audio cards. # gpg: Signature made Thu 10 Oct 2013 11:26:39 AM PDT using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found # By Alex Williamson (7) and Alexey Kardashevskiy (1) # Via Alex Williamson * awilliam/tags/vfio-pci-for-qemu-20131010.0: vfio-pci: Fix endian issues in vfio_pci_size_rom() vfio-pci: Add dummy PCI ROM write accessor vfio: Fix debug output for int128 values vfio-pci: Implement PCI hot reset vfio-pci: Cleanup error_reports vfio-pci: Lazy PCI option ROM loading vfio-pci: Test device reset capabilities vfio-pci: Add support for MSI affinity Message-id: 20131010184122.31667.28382.stgit@bling.home Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-14exec: Fix prototype of phys_mem_set_alloc and related functionsStefan Weil3-5/+5
phys_mem_alloc and its assigned values qemu_anon_ram_alloc and legacy_s390_alloc must have identical argument lists. legacy_s390_alloc uses the size parameter to call mmap, so size_t is good enough for all of them. This patch fixes compiler errors on i686 Linux hosts: CC alpha-softmmu/exec.o exec.c:752:51: error: initialization from incompatible pointer type [-Werror] exec.c: In function 'qemu_ram_alloc_from_ptr': exec.c:1139:32: error: comparison of distinct pointer types lacks a cast [-Werror] exec.c: In function 'qemu_ram_remap': exec.c:1283:21: error: comparison of distinct pointer types lacks a cast [-Werror] Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1380481005-32399-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-12target-alpha: Convert to new ldst opcodesRichard Henderson1-34/+15
Or, partially. The fundamental primitives for the port are gen_load_mem and gen_store_mem, which take a callback to emit the memory operation. For that, we continue to use the original inline functions that forward to the new ops, rather than replicate the same thing privately. That said, all free-standing calls to tcg_gen_qemu_* have been converted. The 32-bit floating-point references now use _i32 opcodes, eliminating a truncate or extension. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc64: Support new ldst opcodesRichard Henderson2-62/+17
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc: Support new ldst opcodesRichard Henderson2-66/+33
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc64: Convert to le/be ldst helpersRichard Henderson1-16/+22
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc: Convert to le/be ldst helpersRichard Henderson1-24/+33
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc64: Use TCGMemOp within qemu_ldst routinesRichard Henderson1-39/+45
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-ppc: Use TCGMemOp within qemu_ldst routinesRichard Henderson1-56/+48
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-arm: Improve GUEST_BASE qemu_ld/stRichard Henderson1-104/+116
If we pull the code to emit the actual load/store into a subroutine, we can share the reg+reg addressing mode code between softmmu and usermode. This lets us load GUEST_BASE into a temporary register rather than attempting to add it piece-wise to the address. Which lets us use movw+movt for armv7, rather than (up to) 4 adds. Code size for pre-armv7 stays the same. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-arm: Convert to new ldst opcodesRichard Henderson2-71/+38
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-arm: Tidy variable naming convention in qemu_ld/stRichard Henderson1-115/+115
s/addr_reg2/addrhi/ s/addr_reg/addrlo/ s/data_reg2/datahi/ s/data_reg/datalo/ Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-arm: Convert to le/be ldst helpersRichard Henderson1-21/+29
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-arm: Use TCGMemOp within qemu_ldst routinesRichard Henderson1-64/+61
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-i386: Support new ldst opcodesRichard Henderson2-90/+51
No support for helpers with non-default endianness yet, but good enough to test the opcodes. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-i386: Remove "cb" output restriction from qemu_st8 for i386Richard Henderson1-2/+8
Once we form a combined qemu_st_i32 opcode, we won't be able to have separate constraints based on size. This one is fairly easy to work around, since eax is available as a scratch register. When storing variable data, this tends to merely exchange one mov for another. E.g. -: mov %esi,%ecx ... -: mov %cl,(%edx) +: mov %esi,%eax +: mov %al,(%edx) Where we do have a regression is when storing constant data, in which we may load the constant into edi, when only ecx/ebx ought to be used. The proper way to recover this regression is to allow constants as arguments to qemu_st_i32, so that we never load the constant data into a register at all, must less the wrong register. TBD. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-i386: Tidy softmmu routinesRichard Henderson1-249/+208
Pass two TCGReg to tcg_out_tlb_load, rather than idx+args. Move ldst_optimization routines just below tcg_out_tlb_load to avoid the need for forward declarations. Use TCGReg enum in preference to int where apprpriate. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg-i386: Use TCGMemOp within qemu_ldst routinesRichard Henderson1-64/+59
Step one in the transition, with constants passed down from tcg_out_op. Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-12tcg: Use TCGMemOp for TCGLabelQemuLdst.opcRichard Henderson1-1/+1
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-10-11Merge remote-tracking branch 'mdroth/qga-pull-2013-10-10' into stagingAnthony Liguori6-94/+69
# By Mark Wu (2) and Tomoki Sekiyama (1) # Via Michael Roth * mdroth/qga-pull-2013-10-10: qemu-ga: Extend 'guest-info' command to expose flag 'success-response' qemu-ga: Add interface to traverse the qmp command list by QmpCommand qemu-ga: execute fsfreeze-freeze in reverse order of mounts Message-id: 1381435782-25524-1-git-send-email-mdroth@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11Merge remote-tracking branch 'rth/tcg-pull' into stagingAnthony Liguori58-2629/+992
# By Richard Henderson # Via Richard Henderson * rth/tcg-pull: exec: Add both big- and little-endian memory helpers tcg: Add qemu_ld_st_i32/64 tcg: Add TCGMemOp configure: Remove CONFIG_QEMU_LDST_OPTIMIZATION tcg: Add tcg-be-ldst.h tcg: Add tcg-be-null.h exec: Delete is_tcg_gen_code and GETRA_EXT tcg-aarch64: Update to helper_ret_*_mmu routines tcg: Merge tcg_register_helper into tcg_context_init tcg: Add tcg-runtime.c helpers to all_helpers tcg: Put target helper data into an array. tcg: Remove stray semi-colons from target-*/helper.h tcg: Move helper registration into tcg_context_init target-m68k: Rename helpers.h to helper.h tcg: Use a GHashTable for tcg_find_helper tcg: Delete tcg_helper_get_name declaration tcg-hppa: Remove tcg backend Message-id: 1381440525-6666-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11qdev-monitor: Group "device_add help" and "info qdm" by categoryMarkus Armbruster1-14/+53
Output is a long, unsorted list. Not very helpful. Print one list per device category instead, with a header line identifying the category, plus a list of uncategorized devices. Print each list in case-insenitive alphabetical order. Devices with multiple categories are listed multiple times. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1381410021-1538-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11Mostly revert "qemu-help: Sort devices by logical functionality"Markus Armbruster2-55/+9
This reverts most of commit 3d1237fb2ab4edb926c717767bb5e31d6053a7c5. The commit claims to sort the output of "-device help" "by functionality rather than alphabetical". Issues: * The output was unsorted before, not alphabetically sorted. Misleading, but harmless enough. * The commit doesn't just sort the output of "-device help" as it claims, it adds categories to each line of "-device help", and it prints devices once per category. In particular, devices without a category aren't shown anymore. Maybe such devices should not exist, but they do. Regression. * Categories are also added to the output of "info qdm". Silent change, not nice. Output remains unsorted, unlike "-device help". I'm going to reimplement the feature we actually want, without the warts. Reverting the flawed commit first should make it easier to review. However, I can't revert it completely, since DeviceClass member categories has been put to use. So leave that part in. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1381410021-1538-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11Use qemu-project.org domain nameStefan Hajnoczi11-20/+20
qemu.org is held by a third-party and no core community contributor has access to the DNS configuration. This leaves the website exposed to outages due to DNS issues or IP address changes. For example, if the web server IP address needs to change we cannot guarantee qemu.org will point to it! The newer qemu-project.org domain name is owned by Anthony Liguori <anthony@codemonkey.ws>. You can confirm this by querying the whois information. Also note that the #qemu IRC channel topic already references qemu-project.org. Short of having a dedicated legal entity to hold the domain name on behalf of the community, qemu-project.org seems like the safest bet. Let's replace references to qemu.org with qemu-project.org. Note that git-submodule(1) does not detect URL changes. The following commands clear out and re-initialize all submodules to ensure you are using the latest URLs: $ git submodule deinit . # you'll be warned if you have local changes $ rm -rf .git/modules # also clear cached .git/ directories $ git submodule update --init Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1381495958-8306-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori66-516/+2109
# By Max Reitz (30) and others # Via Kevin Wolf * kwolf/for-anthony: (61 commits) qemu-iotests: Add test for inactive L2 overlap qemu-io: Let "open" pass options to block driver vmdk: Fix vmdk_parse_extents blockdev: blockdev_init() error conversion blockdev: Don't disable COR automatically with blockdev-add blockdev: Remove 'media' parameter from blockdev_init() qemu-iotests: Check autodel behaviour for device_del blockdev: Remove IF_* check for read-only blockdev_init blockdev: Move virtio-blk device creation to drive_init blockdev: Move bus/unit/index processing to drive_init blockdev: Move parsing of 'boot' option to drive_init blockdev: Moving parsing of geometry options to drive_init blockdev: Move parsing of 'if' option to drive_init blockdev: Move parsing of 'media' option to drive_init blockdev: Pass QDict to blockdev_init() blockdev: Separate ID generation from DriveInfo creation blockdev: 'blockdev-add' QMP command blockdev: Introduce DriveInfo.enable_auto_del qapi-types/visit.py: Inheritance for structs qapi-types/visit.py: Pass whole expr dict for structs ... Message-id: 1381503951-27985-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-10-11qemu-iotests: Add test for inactive L2 overlapMax Reitz2-8/+79
Extend 060 by a test which creates a corrupted image with an active L2 entry pointing to an inactive L2 table and writes to the corresponding guest offset. Also, use overlap-check=all for all tests in 060. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11qemu-io: Let "open" pass options to block driverMax Reitz1-8/+31
Add an option to the open command to specify runtime options for the block driver used. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11vmdk: Fix vmdk_parse_extentsFam Zheng1-2/+5
An extra 'p++' after while loop when *p == '\n' will move p to unknown data position, risking parsing junk data or memory access violation. Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11blockdev: blockdev_init() error conversionKevin Wolf1-25/+31
This gives us meaningful error messages for the blockdev-add QMP command. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Don't disable COR automatically with blockdev-addKevin Wolf2-6/+34
If a read-only device is configured with copy-on-read=on, the old code only prints a warning and automatically disables copy on read. Make it a real error for blockdev-add. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Remove 'media' parameter from blockdev_init()Kevin Wolf1-25/+15
The remaining users shouldn't be there with blockdev-add and are easy to move to drive_init(). Bonus bug fix: As a side effect, CD-ROM drives can now use block drivers on the read-only whitelist without explicitly specifying read-only=on, even if a format is explicitly specified. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11qemu-iotests: Check autodel behaviour for device_delKevin Wolf4-0/+222
Block devices creates with -drive and drive_add should automatically disappear if the guest device is unplugged. blockdev-add ones shouldn't. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Remove IF_* check for read-only blockdev_initKevin Wolf11-7/+42
IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless. Instead, make sure that all devices for which the check would have errored out check in their init function that they don't get a read-only BlockDriverState. This catches even cases where IF_NONE and -device is used. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Move virtio-blk device creation to drive_initKevin Wolf1-27/+27
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Move bus/unit/index processing to drive_initKevin Wolf1-84/+73
This requires moving the automatic ID generation at the same time, so let's do that as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Move parsing of 'boot' option to drive_initKevin Wolf1-10/+11
It's already ignored and only prints a deprecation message. No use in making it available in new interfaces. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Moving parsing of geometry options to drive_initKevin Wolf1-67/+69
This moves all of the geometry options (cyls/heads/secs/trans) to drive_init so that they can only be accessed using legacy functions, but never with anything blockdev-add related. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Move parsing of 'if' option to drive_initKevin Wolf1-18/+22
It's always IF_NONE for blockdev-add. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Move parsing of 'media' option to drive_initKevin Wolf1-23/+50
This moves as much as possible of the processing of the 'media' option to drive_init so that it can only be accessed using legacy functions, but never with anything blockdev-add related. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Pass QDict to blockdev_init()Kevin Wolf1-17/+17
Working on a QDict instead of a QemuOpts that accepts anything is more in line with bdrv_open(). A QDict is what qmp_blockdev_add() already has anyway, so this saves additional conversions. And last, but not least, it allows later patches to easily extract legacy options into a separate, typed QemuOpts for drive_init() (the untyped QemuOpts that drive_init already has doesn't allow access to numbers, only strings, and is therefore useless without conversion). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: Separate ID generation from DriveInfo creationKevin Wolf3-15/+24
blockdev-add shouldn't automatically generate IDs, but will keep most of the DriveInfo creation code. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-10-11blockdev: 'blockdev-add' QMP commandKevin Wolf3-0/+348
For examples see the changes to qmp-commands.hx. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11blockdev: Introduce DriveInfo.enable_auto_delKevin Wolf2-1/+17
BlockDriverStates shouldn't be affected by an unplugged guest device, except if created with the legacy -drive command line option or the drive_add HMP command. Make the automatic deletion as well as cancelling of jobs conditional on an enable_auto_del boolean that is only set in drive_init(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
2013-10-11qapi-types/visit.py: Inheritance for structsKevin Wolf3-2/+37
This introduces a new 'base' key for struct definitions that refers to another struct type. On the JSON level, the fields of the base type are included directly into the same namespace as the fields of the defined type, like with unions. On the C level, a pointer to a struct of the base type is included. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>