summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-09-09Fix include statements for qemu-common.hStefan Weil5-6/+5
* qemu-common.h is not a system include file, so it should be included with "" instead of <>. Otherwise incremental builds might fail because only local include files are checked for changes. * linux-user/syscall.c included the file twice. Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09virtio-9p: Fix syntax error in debug codeStefan Weil1-1/+1
This error was reported by cppcheck: qemu/hw/9pfs/virtio-9p-debug.c:342: error: Invalid number of character ({) when these macros are defined: 'DEBUG_DATA'. Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09SPARC: Trivial patch to clean up npc monitor outputNathan Kunkee1-1/+1
This patch fixes the spacing of the PC output from 'info cpus' for SPARC. Signed-off-by: Nathan Kunkee <nkunkee42@hotmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09configure: Avoid duplicate flags when calling compile_progStefan Weil1-1/+1
This patch removes redundant shell code and cleans it a little bit. Shell macro compile_prog takes two arguments: local_cflags and local ldflags. $QEMU_CFLAGS is added automatically to the cflags, so there is no need to pass it as an argument. It is also unnecessary to pass -Werror twice. $flag is a compiler warning option, so it should be in local_cflags instead of local_ldflags. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09qemu-options: Improve help texts for options which depend on configureStefan Weil1-5/+5
* Replace "available only" by the more common "only available". * Tracing options depend on the configuration of the QEMU executable, so clarify the help text for both options. Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09docs: Fix qdev-device-use.txt typo in -chardev serial, path=COM<NUM>Markus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09configure: Remove relicts from --enable-io-threadStefan Weil1-1/+0
Commit 12d4536f7d911b6d87a766ad7300482ea663cea2 removed configure option --enable-io-thread. Remove help message which is now no longer valid. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-09Fix comment (install patch -> install path)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-08Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori1-29/+43
2011-09-08target-i386: Compute all flag data inside %cl != 0 test.Richard Henderson1-29/+43
The (x << (cl - 1)) quantity is only used if CL != 0. Move the computation of that quantity nearer its use. This avoids the creation of undefined TCG operations when the constant propagation optimization proves that CL == 0, and thus CL-1 is outside the range [0-wordsize). Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: malc <av1474@comtv.ru>
2011-09-08Merge remote-tracking branch 'spice/spice.v42' into stagingAnthony Liguori5-14/+44
2011-09-08Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2-2/+3
2011-09-08Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori27-384/+652
2011-09-08Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori47-594/+551
2011-09-08Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori3-8/+9
2011-09-08Merge remote-tracking branch 'kraxel/usb.26' into stagingAnthony Liguori13-457/+562
2011-09-08Merge remote-tracking branch 'aneesh/for-upstream-3' into stagingAnthony Liguori6-103/+445
2011-09-08iohandlers: fix issue with qemu_set_fd_handler()Anthony Liguori1-5/+2
As spotted by Aneesh, some users pass a NULL opaque so we need to be more aggressive in checking whether a user means to unregister. Also fix a double free caused by tag not being reset to zero after delete. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-09-07usb-musb: Add reset functionJuha Riihimäki3-6/+20
Add a separate reset function musb_reset() to the usb-musb interface, so that users who implement a reset function can also reset usb-musb. Use this in tusb6010. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-musb: Take a DeviceState* in init functionPeter Maydell3-12/+8
Initialise usb-musb by passing it a DeviceState* and the offset of the IRQs in its gpio array, rather than a plain pointer to an irq array. This is simpler for callers and also allows us to pass in a valid parent to usb_bus_new(), so the USB bus actually appears in the qdev tree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb: Remove leading underscores from __musb_irq_maxPeter Maydell2-4/+5
Identifiers with double leading underscore are reserved, so rename __musb_irq_max so we don't encroach on reserved namespace. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: tag as unmigratableGerd Hoffmann1-0/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb: claim port at device initialization time.Gerd Hoffmann8-95/+110
This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from the host. They have a fixed port assigned all the time now instead of getting grabbing one on attach and releasing it at detach, i.e. they stop floating around at the usb bus. The change also allows to simplify usb-hub. It doesn't need the handle_attach() callback any more to configure the downstream ports. This can be done at device initialitation time now. The changed initialization order (first grab upstream port, then register downstream ports) also fixes some icky corner cases. For example it is not possible any more to plug the hub into one of its own downstream ports. The usb host adapters must care too. USBPort->dev being non-NULL doesn't imply any more the device is in attached state. The host adapters must additionally check the USBPort->dev->attached flag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-ccid: remote wakeup supportGerd Hoffmann1-1/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-ccid: switch to USBDesc*Gerd Hoffmann2-165/+84
Switch the smard card emulation to use the USBDesc* structs for the usb descriptors. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb: fix use after freeGerd Hoffmann1-1/+1
The ->complete() callback might have released the USBPacket (uhci actually does), so we must not touch it after the callback returns. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: parse port in /proc/bus/usb/devices scanGerd Hoffmann1-3/+13
Unfortunaly this is limited to root ports. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: constify portGerd Hoffmann1-5/+8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-ehci: handle siTDsGerd Hoffmann2-1/+43
This patch adds code to do minimal siTD handling, which is basically just following the next pointer. This is good enougth to handle the inactive siTDs used by FreeBSD. Active siTDs are skipped too as we don't have split transfer support in qemu, additionally a warning is printed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: endpoint table fixupGerd Hoffmann1-78/+101
USB Devices can have up to 15 IN and 15 OUT endpoints, not 15 endpoints total. Move from one array to two arrays (one IN, one OUT) to maintain the endpoint state.
2011-09-07usb-host: claim portGerd Hoffmann2-0/+58
When configured to pass through a specific host port (using hostbus and hostport properties), try to claim the port if supported by the kernel. That will avoid any kernel drivers binding to devices plugged into that port. It will not stop any userspace apps (such as usb_modeswitch) access the device via usbfs though. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: fix configuration tracking.Gerd Hoffmann1-63/+19
It is perfectly fine to leave the usb device in unconfigured state (USBHostDevice->configuration == 0). Just do that and wait for the guest to explicitly set a configuration. This is closer to what real hardware does and it also simplifies the device initialization. There is no need to figure how the device is configured on the host. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: limit open retriesGerd Hoffmann1-1/+12
Limit the number of times qemu tries to open host devices to three. Reset error counter when the device goes away, after un-plugging and re-plugging the device qemu will try again three times. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: fix halted endpointsGerd Hoffmann1-3/+4
Two fixes for the price of one ;) First, reinitialize the endpoint table after device reset. This is needed anyway as the reset might have switched interfaces. It also clears the endpoint halted state. Second the CLEAR_HALT ioctl wants a unsigned int passed in as argument, not uint8_t. This gets my usb sd card reader (sandisk micromate) going. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07usb-host: reapurb error report fixGerd Hoffmann1-3/+5
Don't report errors on devices which are in disconnected and closing state.
2011-09-07usb-host: start tracing supportGerd Hoffmann2-25/+72
Add a bunch of trace points to usb-linux.c Drop a bunch of DPRINTK's in favor of the trace points. Also cleanup error reporting a bit while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07spice: workaround a spice server bug.Gerd Hoffmann1-1/+24
spice server might call the channel_event callback from spice server thread context. Detect that and aquire iothread lock if needed,
2011-09-07spice: set qxl->ssd.running=true before telling spice to start, RHBZ #733993Yonit Halperin1-1/+2
If qxl->ssd.running=true is set after telling spice to start, the spice server thread can call qxl_send_events while qxl->ssd.running is still false. This leads to assert(d->ssd.running). Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07qxl: s/qxl_set_irq/qxl_update_irq/Yonit Halperin1-6/+6
Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07qxl: send interrupt after migration in case ram->int_pending != 0, RHBZ #732949Yonit Halperin1-2/+8
if qxl_send_events was called from spice server context, and then migration had completed before a call to pipe_read, the target guest qxl driver didn't get the interrupt. In addition, qxl_send_events ignored further interrupts of the same kind, since ram->int_pending was set. As a result, the guest driver was stacked or very slow (when the waiting for the interrupt was with timeout). Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07hw/qxl: Fix format string errorsPeter Maydell2-5/+5
Fix format string errors causing compile failure on 32 bit hosts when spice is enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-07spice-qemu-char.c: Use correct printf format char for ssize_tPeter Maydell1-1/+1
Use the correct printf format string character (%z) for ssize_t. This fixes a compile failure on 32 bit Linux with spice enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-09-06scsi: improve MODE SENSE emulationPaolo Bonzini1-43/+53
- do not return extra pages when requesting all pages (PAGE CODE = 0x3f) - return correct sense code for PC = 3 (saved parameters not supported) - do not return geometry pages for CD devices Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-09-06scsi: fill in additional sense length correctlyPaolo Bonzini1-1/+2
Even though we do not use them, we should include the last three bytes of sense data in the additional sense length. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-09-06Fix qjson test of solidus encodingJan Kiszka1-1/+2
"\/" is supposed to be decoded as "/", but there is no need to encode "/" via escape. Fix the existing test and add a second one expressing this. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-09-06configure: Copy test data to build directoryLuiz Capitulino1-1/+1
The QDict unit-tests (check-qdict) will fail when ran on a different build directory. That's, it only works when ran on the source dir. This happens because its data file (qdict-test-data.txt) is not copied to the build dir. Fix it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-09-06scsi: refine constants for READ CAPACITY 16Paolo Bonzini3-5/+12
Rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to distinguish from the 12-byte CDB variant, and add a constant for the subcommand. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-09-06scsi: fix accounting of writesPaolo Bonzini1-6/+8
Writes go through scsi_write_complete at least twice, the first time to get some data without having actually written anything. Because of this, the first time scsi_write_complete is called it will call bdrv_acct_done and account a read incorrectly. Fix this by looking at the aiocb. I am doing the same in scsi_read_complete for symmetry, but it is only needed in the (bogus) case of bdrv_aio_readv returning NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-09-06scsi: execute SYNCHRONIZE_CACHE asynchronouslyPaolo Bonzini1-16/+25
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-09-06VMDK: bugfix, opening vSphere 4 exported imageFam Zheng1-2/+7
The vSphere 4 exported image is streamOptimized extent, which is not quite correctly handled. Ignore rdgOffset when RGD flag bit not set. Signed-off-by: Fam Zheng <famcool@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>