summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-06-25Revert "xen: start PCI hole at 0xe0000000 (same as pc_init1 and ↵Stefano Stabellini3-12/+9
qemu-xen-traditional)" This reverts commit 9f24a8030a70ea4954b5b8c48f606012f086f65f. The start of the PCI hole is actually set to 0xf0000000 by hvmloader. In order to retain ABI compatibility with Xen we leave the start of the PCI hole at 0xf0000000 in QEMU (for Xen) too. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-06-24Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori10-726/+892
# By Kevin Wolf (22) and Fam Zheng (1) # Via Stefan Hajnoczi * stefanha/block: (23 commits) vmdk: refuse to open higher version than supported block: Always enable discard on the protocol level qcow2: Batch discards qcow2: Options to enable discard for freed clusters qcow2: Add refcount update reason to all callers Revert "block: Disable driver-specific options for 1.5" ide: Clean up ide_exec_cmd() ide: Convert SMART commands to ide_cmd_table handler ide: Convert CF-ATA commands to ide_cmd_table handler ide: Convert ATAPI commands to ide_cmd_table handler ide: Convert SEEK to ide_cmd_table handler ide: Convert FLUSH CACHE to ide_cmd_table handler ide: Convert SET FEATURES to ide_cmd_table handler ide: Convert CHECK POWER MDOE to ide_cmd_table handler ide: Convert READ NATIVE MAX ADDRESS to ide_cmd_table handler ide: Convert DMA read/write commands to ide_cmd_table handler ide: Convert PIO read/write commands to ide_cmd_table handler ide: Convert read/write multiple commands to ide_cmd_table handler ide: Convert verify commands to ide_cmd_table handler ide: Convert cmd_nop commands to ide_cmd_table handler ... Message-id: 1372065035-19601-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-24Merge remote-tracking branch 'spice/spice.v71' into stagingAnthony Liguori3-3/+19
# By Gerd Hoffmann (1) and Hans de Goede (1) # Via Gerd Hoffmann * spice/spice.v71: spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850) qxl: fix Coverity scan SIGN_EXTENSION error Message-id: 1372060666-18182-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-24Merge remote-tracking branch 'kraxel/usb.84' into stagingAnthony Liguori11-51/+212
# By Andreas Färber (3) and others # Via Gerd Hoffmann * kraxel/usb.84: usb: fix serial number for hid devices usb: add serial bus property usb-host-libusb: set USB_DEV_FLAG_IS_HOST usb/host-libusb: Fix building with libusb git master code usb/hcd-ehci: Add Faraday FUSBH200 support usb/hcd-ehci: Replace PORTSC macros with variables usb/hcd-ehci: Add Tegra2 SysBus EHCI device usb/hcd-ehci: Split off instance_init from realize usb/hcd-ehci-sysbus: Convert to QOM realize
2013-06-24Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori23-103/+66
# By Stefan Weil (5) and others # Via Michael Tokarev * mjt/trivial-patches: configure: Add signed*signed check to [u]int128_t test Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGS qapi: lack of two commas in dict sd: pass bool parameter for sd_init qemu-char: use bool in qemu_chr_open_socket and simplify code a bit vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_client block/nand: Formatting sweep qxl: Fix QXLRam initialisation. acl: acl_add can't insert before last list element, fix configure: Fix "ERROR: ERROR: " for missing/incompatible DTC audio: Replace static functions in header file by macros, remove GCC_ATTR libcacard: Fix cppcheck warning and remove unneeded code savevm: Fix potential memory leak kvm: Fix potential resource leak (missing fclose) qemu-img: Add missing GCC_FMT_ATTR qemu-options: trivial fix for -mon args help vl: reformat SDL ifdeffery a bit Message-id: 1371893076-9643-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-24cadence_uart: Handle backend tx errorsEdgar E. Iglesias1-3/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-06-24vmdk: refuse to open higher version than supportedFam Zheng1-0/+9
Refuse to open higher version for safety. Although we try to be compatible with published VMDK spec, VMware has newer version from ESXi 5.1 exported OVF/OVA, which we have no knowledge what's changed in it. And it is very likely to have more new versions in the future, so it's not safe to open them blindly. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24block: Always enable discard on the protocol levelKevin Wolf1-1/+1
Turning on discard options in qcow2 doesn't help a lot when the discard requests that it issues are thrown away by the raw-posix layer. This patch always enables discard functionality on the protocol level so that it's the image format's responsibility to send (or not) discard requests. Requests sent by the guest will be allowed or ignored by the top level BlockDriverState, which depends on the discard=... option like before. In particular, this means that even without specifying options, the qcow2 default of discarding deleted snapshots actually takes effect now, both for qemu and qemu-img. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24qcow2: Batch discardsKevin Wolf4-7/+109
This optimises the discard operation for freed clusters by batching discard requests (both snapshot deletion and bdrv_discard end up updating the refcounts cluster by cluster). Note that we don't discard asynchronously, but keep s->lock held. This is to avoid that a freed cluster is reallocated and written to while the discard is still in flight. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24qcow2: Options to enable discard for freed clustersKevin Wolf3-0/+36
Deleted snapshots are discarded in the image file by default, discard requests take their default from the -drive discard=... option and other places that free clusters must always be enabled explicitly. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24qcow2: Add refcount update reason to all callersKevin Wolf5-33/+66
This adds a refcount update reason to all callers of update_refcounts(), so that a follow-up patch can use this information to decide whether clusters that reach a refcount of 0 should be discarded in the image file. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24Revert "block: Disable driver-specific options for 1.5"Kevin Wolf2-115/+5
This reverts commit 8ec7d390b0d50b5e5b4b1d8dba7ba40d64a70875. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Clean up ide_exec_cmd()Kevin Wolf1-24/+12
All commands are now converted to ide_cmd_table handlers, so it can be unconditional now and the old switch block can go. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert SMART commands to ide_cmd_table handlerKevin Wolf1-151/+174
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert CF-ATA commands to ide_cmd_table handlerKevin Wolf1-75/+95
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert ATAPI commands to ide_cmd_table handlerKevin Wolf1-39/+61
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert SEEK to ide_cmd_table handlerKevin Wolf1-6/+7
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert FLUSH CACHE to ide_cmd_table handlerKevin Wolf1-6/+8
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert SET FEATURES to ide_cmd_table handlerKevin Wolf1-72/+75
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert CHECK POWER MDOE to ide_cmd_table handlerKevin Wolf1-9/+8
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert READ NATIVE MAX ADDRESS to ide_cmd_table handlerKevin Wolf1-17/+18
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert DMA read/write commands to ide_cmd_table handlerKevin Wolf1-31/+38
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert PIO read/write commands to ide_cmd_table handlerKevin Wolf1-43/+50
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert read/write multiple commands to ide_cmd_table handlerKevin Wolf1-59/+60
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert verify commands to ide_cmd_table handlerKevin Wolf1-14/+13
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert cmd_nop commands to ide_cmd_table handlerKevin Wolf1-31/+17
cmd_nop handles all commands that don't really do anything in our implementation except setting status register flags. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert WIN_IDENTIFY to ide_cmd_table handlerKevin Wolf1-17/+23
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Convert WIN_DSM to ide_cmd_table handlerKevin Wolf1-13/+16
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24ide: Add handler to ide_cmd_tableKevin Wolf1-58/+86
As a preparation for moving all IDE commands into their own function like in the ATAPI code, introduce a 'handler' callback to ide_cmd_table. Commands using this new infrastructure get some things handled automatically: * The BSY flag is set before calling the handler (in order to avoid bugs like the one fixed in f68ec837) and reset on completion. * The (obsolete) DSC flag in the status register is set on completion if the command is flagged with SET_DSC in the command table * An IRQ is triggered on completion. * The error register and the ERR flag in the status register are cleared before calling the handler and on completion it is asserted that either none or both of them are set. No commands are converted at this point. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-24usb: fix serial number for hid devicesGerd Hoffmann1-0/+12
commit 7b074a22dab4bdda9864b933f1bc811a3db42845 changed the serial number of hid devices. Add compat properties to keep the old serial number for qemu 0.12 and older. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb: add serial bus propertyGerd Hoffmann5-10/+14
This patch adds a serial property for all usb devices, which can be used to set the serial number of a usb device (as listed by lsusb -v) to a specific value. Applies to emulated devices only. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb-host-libusb: set USB_DEV_FLAG_IS_HOSTGerd Hoffmann1-0/+1
... like host-{linux,bsd}.c do. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/host-libusb: Fix building with libusb git master codeHans de Goede1-0/+4
The next libusb release will deprecate libusb_get_port_path, and since we compile with -Werror, this breaks the build. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/hcd-ehci: Add Faraday FUSBH200 supportKuo-Jung Su2-0/+87
Add Faraday FUSBH200 support, which is slightly different from EHCI spec. (Or maybe simply a bad/wrong implementation...) Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/hcd-ehci: Replace PORTSC macros with variablesKuo-Jung Su4-14/+28
Replace PORTSC macros with variables which could then be configured in ehci_xxxx_class_init(...) Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/hcd-ehci: Add Tegra2 SysBus EHCI deviceAndreas Färber2-0/+16
This prepares an EHCI device for the Nvidia Tegra2 SoC family. Values based on patch by Vincent Palatin and verified against TRM v01p. Cc: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/hcd-ehci: Split off instance_init from realizeAndreas Färber4-20/+44
This makes the mem MemoryRegion available to derived instance_inits. Keep the bus in realize for now since naming breaks in instance_init. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24usb/hcd-ehci-sysbus: Convert to QOM realizeAndreas Färber4-10/+9
The SysBus qdev initfn merely calls SysBusDeviceClass::init, so we can replace it with a realizefn already. This avoids getting into any initfn ambiguity with the upcoming Faraday EHCI implementation. Rename internal usb_ehci_initfn() to usb_ehci_realize() to allow to return Errors from common initialization code as well. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)Hans de Goede2-2/+18
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-24qxl: fix Coverity scan SIGN_EXTENSION errorGerd Hoffmann1-1/+1
Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-21configure: Add signed*signed check to [u]int128_t testPeter Maydell1-0/+1
clang 3.3 with -fsanitize=undefined will fail to link code containing an int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404) so add this to our configure test for whether [u]int128_t are usable. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGSPeter Maydell1-2/+3
The dtc submodule's makefile expects -I include directives to be in CPPFLAGS, not CFLAGS. Getting this wrong meant that the include directive would not be applied when generating the dependency .d files. This in turn meant that we couldn't build libfdt when doing an out of tree build with clang. (gcc's dependency output is slightly different from clang in this situation so it happened to work.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21qapi: lack of two commas in dictAmos Kong1-2/+2
Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21sd: pass bool parameter for sd_initliguang6-7/+7
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21qemu-char: use bool in qemu_chr_open_socket and simplify code a bitliguang1-13/+6
Local variables is_* should be bool by usage. While at it, simplify the logic/code a bit. Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_clientMichael Tokarev2-8/+9
Some arguments to these functions are booleans - either by declaration, or by actual usage, but sometimes value of 0 or 1 is passed for a bool, and sometimes it is declared as int but a bool value, or true/false, is passed to it instead. Clean it up a bit. Cc: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21block/nand: Formatting sweepPeter Crosthwaite1-15/+18
Make this code closer to passing checkpatch. Mostly missing braces, but a few rogue tabs in there as well. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21qxl: Fix QXLRam initialisation.Anthony PERARD1-0/+1
The qxl driver expect NULL for QXLRam.memory_configs, but this is never initialized. If memory is set to 0xc2c2.., it leads to a spice-critical error when trying to start qxl. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21acl: acl_add can't insert before last list element, fixMarkus Armbruster1-2/+2
Watch this: $ upstream-qemu -nodefaults -S -vnc :0,acl,sasl -monitor stdio QEMU 1.5.50 monitor - type 'help' for more information (qemu) acl_add vnc.username drei allow acl: added rule at position 1 (qemu) acl_show vnc.username policy: deny 1: allow drei (qemu) acl_add vnc.username zwei allow 1 acl: added rule at position 2 (qemu) acl_show vnc.username policy: deny 1: allow drei 2: allow zwei (qemu) acl_add vnc.username eins allow 1 acl: added rule at position 1 (qemu) acl_show vnc.username policy: deny 1: allow eins 2: allow drei 3: allow zwei The second acl_add inserts at position 2 instead of 1. Root cause is an off-by-one in qemu_acl_insert(): when index == acl->nentries, it appends instead of inserting before the last list element. Cc: qemu-stable@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21configure: Fix "ERROR: ERROR: " for missing/incompatible DTCAndreas Färber1-1/+1
error_exit already prepends "ERROR: ", so no need to print it manually. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>