aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-09-06Merge branch 'master' of git://git.qemu.org/qemuHEADmasterNicholas Bellinger260-4646/+8503
2012-09-06hw/pl110: Fix spelling of 'palette'Peter Maydell2-26/+26
Fix the spelling of 'palette' used in various local variables, structure members and comments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-05target-xtensa: convert host errno values to guestMax Filippov1-8/+98
Guest errno values are taken from the newlib. Convert only those errno values that can be returned from used system calls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-05CHECKPATCH: Add warning for single else statement.Don Slutz1-6/+10
For an example: WARNING: braces {} are necessary even for single statement blocks + } else + return env->regs[R_EAX]; total: 0 errors, 1 warnings, 41 lines checked Signed-off-by: Don Slutz <Don@CloudSwitch.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-05CHECKPATCH: Add --debug adv_apwDon Slutz1-19/+32
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: Don Slutz <Don@CloudSwitch.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-05CHECKPATCH: Add --debug adv_checkingDon Slutz1-1/+3
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: Don Slutz <Don@CloudSwitch.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-05CHECKPATCH: Add --debug adv_dcsDon Slutz1-0/+3
Add debug options to find this issue. They were not listed in the help because the are not simple to understand the output of. Signed-off-by: Don Slutz <Don@CloudSwitch.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-05Open up 1.3 development treeAnthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-09-05Update version for 1.2.0v1.2.0Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-09-04console: bounds check whenever changing the cursor due to an escape codeIan Campbell1-29/+28
This is XSA-17 / CVE-2012-3515 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-09-04qemu-timer: properly arm alarm timer for timers set by device initializationPaolo Bonzini1-3/+0
QEMU will hang when fed the following command-line qemu-system-mips -kernel vmlinux-2.6.32-5-4kc-malta -append "console=ttyS0" -nographic -net none The -net none is important otherwise it seems some events are generated causing the things to work. When it doesn't work, the guest hangs when measuring the CPU frequency, after the following line: [ 0.000000] NR_IRQS:256 Pressing a key on the serial port unblocks it, hinting that the problem is due to the recent elimination of the 1 second timeout in the main loop. The problem is that because init_timer_alarm sets the timer's pending flag to true, the alarm timer is never armed until after the first time through the main loop. Thus the bug started when QEMU started testing the pending flag in qemu_mod_timer (commit 1828be3, more alarm timer cleanup, 2010-03-10). But actually, it isn't true at all that a timer is pending when the alarm timer is created, and the real bug has been latent forever: the fix is to remove the bogus setting of pending flag. Reported-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Tested-by: Aurelien Jarno <aurelien@aurel32.net> Tested-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-01target-xtensa: return ENOSYS for unimplemented simcallsMax Filippov1-0/+2
This prevents guest from proceeding with uninitialised garbage returned from unimplemented simcalls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-31Update version to 1.2.0-rc3v1.2.0-rc3Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-31console: Fix warning from clang (and potential crash)Stefan Weil1-1/+1
ccc-analyzer reports this warning: console.c:1090:29: warning: Dereference of null pointer if (active_console->cursor_timer) { ^ Function console_select allows active_console to be NULL, but would crash when accessing cursor_timer. Fix this. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-31Merge remote-tracking branch 'kraxel/usb.61' into stagingAnthony Liguori9-60/+138
* kraxel/usb.61: uas: move transfer kickoff ehci: Fix interrupt endpoints no longer working ehci: handle TD deactivation of inflight packets ehci: add ehci_cancel_queue() ehci: simplify ehci_state_executing ehci: Remove unnecessary ehci_flush_qh call ehci: Schedule async-bh when IAAD bit gets set ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active usb: unique packet ids usb: Halt ep queue en cancel pending packets on a packet error fix info qtree indention
2012-08-31Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori4-2/+52
* kwolf/for-anthony: qemu-iotests: add backing file smaller than image test case stream: complete early if end of backing file is reached qed: refuse unaligned zero writes with a backing file
2012-08-31uas: move transfer kickoffGerd Hoffmann1-2/+1
Kick next scsi transfer from request release callback instead of command completion callback, otherwise we might get stuck in case scsi_req_unref() doesn't release the request instantly due to someone else holding a reference too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Fix interrupt endpoints no longer workingHans de Goede1-2/+11
One of the recent changes (likely the addition of queuing support) has broken interrupt endpoints, this patch fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31ehci: handle TD deactivation of inflight packetsGerd Hoffmann1-15/+23
Check the TDs of inflight packets, cancel packets in case the guest clears the active bit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: add ehci_cancel_queue()Gerd Hoffmann1-10/+20
Factor out function to cancel all packets of a queue. No behavior change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: simplify ehci_state_executingHans de Goede1-12/+1
ehci_state_executing does not need to check for p->usb_status == USB_RET_ASYNC or USB_RET_PROCERR, since ehci_execute_complete already does a similar check and will trigger an assert if either value is encountered. USB_RET_ASYNC should never be the packet status when execute_complete runs for obvious reasons, and USB_RET_PROCERR is only used by ehci_state_execute / ehci_execute not by ehci_state_executing / ehci_execute_complete. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Remove unnecessary ehci_flush_qh callHans de Goede1-1/+0
ehci_qh_do_overlay() already calls ehci_flush_qh() before it returns, calling it twice is useless. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Schedule async-bh when IAAD bit gets setHans de Goede1-0/+9
After the "ehci: Print a warning when a queue unexpectedly contains packets on cancel" commit. Under certain reproducable conditions I was getting the following message: "EHCI: Warning queue not empty on queue reset". After aprox. 8 hours of debugging I've finally found the cause. The Linux EHCI driver has an IAAD watchdog, to work around certain EHCI hardware sometimes not acknowledging the doorbell at all. This watchdog has a timeout of 10 ms, which is less then the time between 2 runs through the async schedule when async_stepdown is at its highest value. Thus the watchdog can trigger, after which Linux clears the IAAD bit and re-uses the QH. IOW we were not properly detecting the unlink of the qh, due to us missing (ignoring for more then 10 ms) the IAAD command, which triggered the warning. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream activeHans de Goede1-1/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31usb: unique packet idsGerd Hoffmann7-12/+16
This patch adds IDs to usb packets. Those IDs are (a) supposed to be unique for the lifecycle of a packet (from packet setup until the packet is either completed or canceled) and (b) stable across migration. uhci, ohci, ehci and xhci use the guest physical address of the transfer descriptor for this. musb needs a different approach because there is no transfer descriptor. But musb also doesn't support pipelining, so we have never more than one packet per endpoint in flight. So we go create an ID based on endpoint and device address. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31usb: Halt ep queue en cancel pending packets on a packet errorHans de Goede4-7/+58
For controllers which queue up more then 1 packet at a time, we must halt the ep queue, and inside the controller code cancel all pending packets on an error. There are multiple reasons for this: 1) Guests expect the controllers to halt ep queues on error, so that they get the opportunity to cancel transfers which the scheduled after the failing one, before processing continues 2) Not cancelling queued up packets after a failed transfer also messes up the controller state machine, in the case of EHCI causing the following assert to trigger: "assert(p->qtdaddr == q->qtdaddr)" at hcd-ehci.c:2075 3) For bulk endpoints with pipelining enabled (redirection to a real USB device), we must cancel all the transfers after this a failed one so that: a) If they've completed already, they are not processed further causing more stalls to be reported, originating from the same failed transfer b) If still in flight, they are cancelled before the guest does a clear stall, otherwise the guest and device can loose sync! Note this patch only touches the ehci and uhci controller changes, since AFAIK no other controllers actually queue up multiple transfer. If I'm wrong on this other controllers need to be updated too! Also note that this patch was heavily tested with the ehci code, where I had a reproducer for a device causing a transfer to fail. The uhci code is not tested with actually failing transfers and could do with a thorough review! Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31fix info qtree indentionGerd Hoffmann1-1/+1
Without the patch bus properties are are not in line with the other properties: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] With the patch applied everything is lined up properly: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] Needed to make the autotest qtree parser happy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-30w32: Fix broken buildStefan Weil1-0/+2
Commit ef8621b1a3b199c348606c0a11a77d8e8bf135f1 added an include file which is not available for MinGW compilations. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-30Update version for 1.2.0-rc2v1.2.0-rc2Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29scsi-disk: Fix typo (uint32 -> uint32_t)Stefan Weil1-1/+1
Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29msix: make [un]use vectors on reset/load optionalMichael S. Tsirkin2-2/+13
The facility to use/unuse vectors dynamically is helpful for virtio but little else: everyone just seems to use vectors in their init function. Avoid clearing msix vector use info on reset and load. For virtio, clear it explicitly. This should fix regressions reported with ivshmem - though I didn't test this, I verified that virtio keeps working like it did. Tested-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29kvm: get/set PV EOI MSRMichael S. Tsirkin3-0/+35
Support get/set of new PV EOI MSR, for migration. Add an optional section for MSR value - send it out in case MSR was changed from the default value (0). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29linux-headers: update to 3.6-rc3Michael S. Tsirkin5-2/+13
Update linux-headers to version present in Linux 3.6-rc3. Header asm-x96_64/kvm_para.h update is needed for the new PV EOI feature. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29target-i386: disable pv eoi to fix migration across QEMU versionsAnthony Liguori1-1/+12
We have a problem with how we handle migration with KVM paravirt features. We unconditionally enable paravirt features regardless of whether we know how to migrate them. We also don't tie paravirt features to specific machine types so an old QEMU on a new kernel would expose features that never existed. The 1.2 cycle is over and as things stand, migration is broken. Michael has another series that adds support for migrating PV EOI and attempts to make it work correctly for different machine types. After speaking with Michael on IRC, we agreed to take this patch plus 1 & 4 from his series. This makes sure QEMU can migrate PV EOI if it's enabled, but does not enable it by default. This also means that we won't unconditionally enable new features for guests future proofing us from this happening again in the future. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29reset PMBA and PMREGMISC PIIX4 registers.Gleb Natapov1-2/+3
The bug causes Windows + OVMF hang after reboot since OVMF checks PMREGMISC to see if IO space is enabled and skip configuration if it is. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29qemu-ga: Fix null pointer passed to unlink in failure branchStefan Weil1-1/+3
Clang reports this warning: Null pointer passed as an argument to a 'nonnull' parameter Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29memory: Fix copy&paste mistake in memory_region_iorange_writeJan Kiszka1-1/+1
The last argument of find_portio is "write", so this must be true here. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29ivshmem: remove redundant ioeventfd configurationCam Macdonell1-15/+0
setup_ioeventfds() is unnecessary and actually causes a segfault when used ioeventfd=on is used on the command-line. Since ioeventfds are handled within the memory API, it can be removed. Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfoPeter Maydell1-0/+1
Add the missing .class_size definition to the arm_gic_info TypeInfo. This fixes the memory corruption and possible segfault that otherwise results when the class struct is allocated at too small a size and the class init function writes off the end of it. Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29qemu-iotests: add backing file smaller than image test caseStefan Hajnoczi2-2/+35
This new test case checks that streaming completes successfully when the backing file is smaller than the image file. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29stream: complete early if end of backing file is reachedStefan Hajnoczi1-0/+6
It is possible to create an image that is larger than its backing file. Reading beyond the end of the backing file produces zeroes if no writes have been made to those sectors in the image file. This patch finishes streaming early when the end of the backing file is reached. Without this patch the block job hangs and continually tries to stream the first sectors beyond the end of the backing file. To reproduce the hung block job bug: $ qemu-img create -f qcow2 backing.qcow2 128M $ qemu-img create -f qcow2 -o backing_file=backing.qcow2 image.qcow2 6G $ qemu -drive if=virtio,cache=none,file=image.qcow2 (qemu) block_stream virtio0 (qemu) info block-jobs The qemu-iotests 030 streaming test still passes. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29qed: refuse unaligned zero writes with a backing fileStefan Hajnoczi1-0/+11
Zero writes have cluster granularity in QED. Therefore they can only be used to zero entire clusters. If the zero write request leaves sectors untouched, zeroing the entire cluster would obscure the backing file. Instead return -ENOTSUP, which is handled by block.c:bdrv_co_do_write_zeroes() and falls back to a regular write. The qemu-iotests 034 test cases covers this scenario. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori5-9/+27
* bonzini/scsi-next: iscsi: Set number of blocks to 0 for blank CDROM devices scsi: more fixes to properties for passthrough devices esp: support 24-bit DMA megasas: Add 'hba_serial' property
2012-08-29Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori3-14/+16
* riku/linux-user-for-upstream: linux-user: Clarify "Unable to reserve guest address space" error linux-user: fix emulation of getdents linux-user: arg_table need not have global scope
2012-08-28tcg/mips: fix broken CONFIG_TCG_PASS_AREG0 codeAurelien Jarno1-59/+99
The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was broken in that it did not respect the ABI requirement that 64 bit values were passed in even-odd register pairs. The simplest way to fix this is to implement some new utility functions for marshalling function arguments into the correct registers and stack, so that the code which sets up the address and data arguments does not need to care whether there has been a preceding env argument. Based on commit 9716ef3b for ARM by Peter Maydell. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-28Update OpenBIOS PPC imageAurelien Jarno3-1/+1
Update OpenBIOS PPC image to SVN r1063 to fix issues introduced by commit 9e56edcf. The code change in this revision only affects PPC, so OpenBIOS SPARC images are not updated. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-28target-ppc: fix altivec instructionsAurelien Jarno1-1/+1
Altivec instructions are not working anymore in PowerPC emulation, following commit d15f74fb, which inverted two registers in the call to helper. Fix that. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-28audio/winwave: previous audio buffer should be flushedmunkyu.im1-9/+3
Winwave audio backend has problem with pausing and restart audio out. Unlike other backends, Winwave pausing API does not flush audio buffer. As a result, the previous audio data are played in front of user expected sound when user restart audio. So changes it to waveOutReset() Signed-off-by: Munkyu Im <munkyu.im@samsung.com> Signed-off-by: malc <av1474@comtv.ru>
2012-08-28iscsi: Set number of blocks to 0 for blank CDROM devicesRonnie Sahlberg1-1/+6
The number of blocks of the device is used to compute the device size in bdrv_getlength()/iscsi_getlength(). For MMC devices, the ReturnedLogicalBlockAddress in the READCAPACITY10 has a special meaning when it is 0. In this case it does not mean that LBA 0 is the last accessible LBA, and thus the device has 1 readable block, but instead it means that the disc is blank and there are no readable blocks. This change ensures that when the iSCSI LUN is loaded with a blank DVD-R disk or similar that bdrv_getlength() will return the correct size of the device as 0 bytes. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-28scsi: more fixes to properties for passthrough devicesPaolo Bonzini2-1/+3
Commit 0384783 (scsi-block: remove properties that are not relevant for passthrough, 2012-07-09) removed one property that should have been left there, "bootindex". It also did not touch scsi-generic, while it should have. Fix both problems. Reported-by: Alexandre DERUMIER <aderumier@odiso.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-28esp: support 24-bit DMAPaolo Bonzini1-5/+11
SeaBIOS will issue requests for more than 64k when loading a CD-ROM image into memory. Support the TCHI register from the AMD PCscsi spec. Acked-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-28megasas: Add 'hba_serial' propertyHannes Reinecke1-2/+7
Add a 'hba_serial' property to the megasas driver. Originally it would be using a pointer value which would break migration. Reported-by: Stefan Weil <sw@weilnetz.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-27target-mips: allow microMIPS SWP and SDP to have RD equal to BASEEric Johnson1-1/+9
The microMIPS SWP and SDP instructions do not modify GPRs. So their behavior is well defined when RD equals BASE. The MIPS Architecture Verification Programs (AVPs) check that they work as expected. This is required for AVPs to pass. Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27target-mips: add privilege level check to several Cop0 instructionsEric Johnson1-0/+9
The MIPS Architecture Verification Programs (AVPs) check privileged instructions for the required privilege level. These changes are needed to pass the AVP suite. Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27Revert "fix some debug printf format strings"malc4-10/+7
This reverts commit 145c7c880ff520a9348cc2401ba291330b9606fe. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "vl: fix -hdachs/-hda argument order parsing issues"malc1-18/+21
This reverts commit 7764ae9671f1cd74227cf4404431dd5213799ef0. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "qemu-options.hx: mention retrace= VGA option"malc1-7/+1
This reverts commit 39dda260628e5f2a3fd2ce2ec8a71f3d5ca309a9. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "vga: add some optional CGA compatibility hacks"malc4-74/+8
This reverts commit 482f7bf86b43af9f6903c52726fedf82b28bf953. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "i8259: add -no-spurious-interrupt-hack option"malc5-44/+5
This reverts commit f278d4947fff814dcde2ef2acad36d172ff8be35. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27mips-linux-user: Always support rdhwr.Richard Henderson1-0/+4
The kernel will emulate this instruction if it's not supported natively. This insn is used for TLS, among other things, and so is required by modern glibc. Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27target-mips: Streamline indexed cp1 memory addressing.Richard Henderson1-2/+1
We've already eliminated both base and index being zero. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27Fix order of CVT.PS.S operandsRichard Sandiford1-1/+1
The FS input to CVT.PS.S is the high half and FT is the low half. tcg_gen_concat_i32_i64 takes the low half first, so the operands were in the wrong order. Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27Fix operands of RECIP2.S and RECIP2.PSRichard Sandiford1-2/+2
Read the second input operand of RECIP2.S and RECIP2.PS from FT rather than FD. RECIP2.D is already correct. Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27linux-user: Clarify "Unable to reserve guest address space" errorPeter Maydell1-1/+4
Now that we default to reserving nearly 4GB of RAM for the guest address space when running a 32 bit linux-user guest on 64 bit hosts, users are much more likely to run into it. Reword the message to be more informative about what failed and provide suggestions for how to fix things. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-08-27linux-user: fix emulation of getdentsDmitry V. Levin2-10/+9
In case when TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64, the last byte of the target dirent structure (aka d_type byte) was never copied from the host dirent structure, thus breaking everything that relies on valid d_type value, e.g. glob(3). Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-08-27linux-user: arg_table need not have global scopeJim Meyering1-3/+3
Declare arg_table to be "static const", and adjust the two users to also be const. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-08-26tcg/ia64: fix and optimize ld/st slow pathAurelien Jarno1-15/+23
Store slow path has been broken in e141ab52d: - the arguments are shifted before the last one (mem_index) is written. - the shift is done for both slow and fast paths. Fix that. Also optimize a bit by bundling the move together. This still can be optimized, but it's better to wait for a decision to be taken on the arguments order. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-26tcg/ia64: fix prologue/epilogueAurelien Jarno1-10/+10
Prologue and epilogue code has been broken in cea5f9a28. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-26tcg/arm: Fix broken CONFIG_TCG_PASS_AREG0 codePeter Maydell1-93/+144
The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was broken in that it did not respect the ABI requirement that 64 bit values were passed in even-odd register pairs. The simplest way to fix this is to implement some new utility functions for marshalling function arguments into the correct registers and stack, so that the code which sets up the address and data arguments does not need to care whether there has been a preceding env argument. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-24i8259: add -no-spurious-interrupt-hack optionMatthew Ogilvie5-5/+44
This patch provides a way to optionally suppress spurious interrupts, as a workaround for systems described below: Some old operating systems do not handle spurious interrupts well, and qemu tends to generate them significantly more often than real hardware. Examples: - Microport UNIX System V/386 v 2.1 (ca 1987) (The main problem I'm fixing: Without this patch, it panics sporadically when accessing the hard disk.) - AT&T UNIX System V/386 Release 4.0 Version 2.1a (ca 1991) See screenshot in "QEMU Official OS Support List": http://www.claunia.com/qemu/objectManager.php?sClass=application&iId=9 (I don't have this system to test.) - A report about OS/2 boot lockup from 2004 by Hampa Hug: http://lists.nongnu.org/archive/html/qemu-devel/2004-09/msg00367.html (My patch was partially inspired by his.) Also: http://lists.nongnu.org/archive/html/qemu-devel/2005-06/msg00243.html (I don't have this system to test.) Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-24vga: add some optional CGA compatibility hacksMatthew Ogilvie4-8/+74
This patch adds some optional compatibility hacks (default disabled) to allow Microport UNIX to function under qemu. I've tried to structure it to be easy to add more hacks for other old CGA programs, if anyone ever needs them. Microport UNIX System V/386 v 2.1 (ca 1987) tries to program the CGA registers directly with neither the assistance of BIOS, nor with proper handling of EGA/VGA-only registers. Note that it didn't work on real VGA hardware, either (although in that case, the most obvious problems seemed to be out-of-range hsync and/or vsync signalling, rather than the issues in this patch). Eventually real MDA and/or CGA support might provide an alternative to this patch, although a hybrid approach like this patch might still be useful in marginal cases. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-24qemu-options.hx: mention retrace= VGA optionMatthew Ogilvie1-1/+7
The feature was added in commit cb5a7aa8c32141bb Sep 2008. My description is based on "Better VGA retrace emulation (needed for some DOS games/demos)" from http://www.boblycat.org/~malc/code/patches/qemu/index.html Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-24vl: fix -hdachs/-hda argument order parsing issuesMatthew Ogilvie1-21/+18
Without this patch, the -hdachs argument had to occur either BEFORE the corresponding "-hda" option, or AFTER the plain disk image name (if neither -hda nor -drive is used). Otherwise it would effectively be ignored. Option -hdachs still has no effect on -drive, but that seems best. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-24target-i386/translate.c: mov to/from crN/drN: ignore mod bitsMatthew Ogilvie1-4/+10
> This instruction is always treated as a register-to-register (MOD = 11) > instruction, regardless of the encoding of the MOD field in the MODR/M > byte. Also, Microport UNIX System V/386 v 2.1 (ca 1987) runs fine on real Intel 386 and 486 CPU's (at least), but does not run in qemu without this patch. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-24fix some debug printf format stringsMatthew Ogilvie4-7/+10
These are normally ifdefed out and don't matter. But if you enable them, they ought to be correct. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
2012-08-23ivshmem: fix memory_region_del_eventfd assertion failurePaolo Bonzini1-0/+4
We do not register ioeventfds unless the IVSHMEM_IOEVENTFD feature is set. The same feature must be checked before releasing the eventfds. Regression introduced by commit 563027c (ivshmem: use EventNotifier and memory API, 2012-07-05). Reported-by: Cam Macdonnell <cam@cs.ualberta.ca> Tested-by: Cam Macdonnell <cam@cs.ualberta.ca> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-23qom: object_delete should unparent the object firstPaolo Bonzini5-10/+2
object_deinit is only called when the reference count goes to zero, and yet tries to do an object_unparent. Now, object_unparent either does nothing or it will decrease the reference count. Because we know the reference count is zero, the object_unparent call in object_deinit is useless. Instead, we need to disconnect the object from its parent just before we remove the last reference apart from the parent's. This happens in object_delete. Once we do this, all calls to object_unparent peppered through QEMU can go away. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-23monitor: don't try to initialize json parser when monitor is HMPAnthony Liguori1-2/+2
Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-24target-mips: Fix some helper functions (VR54xx multiplication)Stefan Weil1-46/+29
Commits b5dc7732e1cc2fb549e48b7b5d664f2c79628e2e and be24bb4f3007c3e07cbf1934f7e781493d876ab7 optimized the code and removed the correct setting of t0. Fix this. gcc-4.7 detected this bug because parameter arg1 was unused but set in set_HIT0_LO and set_HI_LOT0. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-23target-mips: Enable access to required RDHWR hardware registersMeador Inge1-2/+3
While running in the usermode emulator all of the required* MIPS32r2 RDHWR hardware registers should be accessible (the Linux kernel enables access to these same registers). Note that these registers are still enabled when the MIPS ISA is not release 2. This is OK since the Linux kernel emulates access to them when they are not available in hardware. * There is also the ULR register which is only recommended for full release 2 compliance. Incidentally, accessing this register in the current implementation works fine without flipping its access bit. Signed-off-by: Meador Inge <meadori@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-23monitor: move json init from OPEN event to initAnthony Liguori1-1/+3
At some point in the past, the OPEN event was changed to be issued from a bottom half. This creates a small window whereas a data callback registered in init may be invoked before the OPEN event has been issued. This is reproducible with: echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp stdio We can fix this for the monitor by moving the parser initialization to init. The remaining state that is set in OPEN appears harmless. Reported-by: Daniel Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22boards: add a 'none' machine type to all platformsAnthony Liguori2-0/+42
This allows any QEMU binary to be executed with: $QEMU_BINARY -M none -qmp stdio Without errors from missing options that are required by various boards. This also provides a mode that we can use in the future to construct machines entirely through QMP commands. Cc: Daniel Berrange <berrange@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22Update version for 1.2.0-rc1 releasev1.2.0-rc1Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori6-17/+18
* qmp/queue/qmp: migration: move total_time from ram stats to migration info monitor: avoid declaring unused variables qapi: Fix memory leak
2012-08-22Merge remote-tracking branch 'sstabellini/xen-fixes-20120822' into stagingAnthony Liguori2-12/+21
* sstabellini/xen-fixes-20120822: xen-all.c: fix multiply issue for int and uint types Fix invalidate if memory requested was not bucket aligned
2012-08-22Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori4-67/+79
* bonzini/scsi-next: virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines iscsi: fix races between task completion and abort iscsi: simplify iscsi_schedule_bh iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb Revert "iscsi: Fix NULL dereferences / races between task completion and abort"
2012-08-22Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori4-1/+69
* kwolf/for-anthony: virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types Documentation: Warn against qemu-img on active image vmdk: Read footer for streamOptimized images vmdk: Fix header structure Conflicts: hw/virtio-blk.c
2012-08-22Merge remote-tracking branch 'kraxel/usb.59' into stagingAnthony Liguori4-10/+21
* kraxel/usb.59: ehci: Fix setting of halt bit from usbcmd register updates ehci: fix Interrupt Threshold Control implementation usb: update uas product id usb: async control xfer fixup
2012-08-22qapi: add 'query-target' command to return target archDaniel P. Berrange4-1/+61
Add a 'query-target' QAPI command to allow management applications to determine what target architecture a QEMU binary is emulating without having to parse the binary name or -help output $ qmp-shell -p /tmp/qemu (QEMU) query-target { u'return': { u'arch': u'x86_64' }} Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci: Tidy up PCI host bridgesAndreas Färber10-28/+42
Adopt the QOM parent field name and enforce QOM-style access via casts. Don't just typedef PCIHostState, either use it directly or embed it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGEAndreas Färber13-47/+45
Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci_host: Turn into SysBus-derived QOM typeAndreas Färber2-0/+17
The preceding commits fixed misuses of FROM_SYSBUS() that led people to add a bogus busdev field. For qdev the field order was less relevant but for QOM the PCIHostState field (including the SysBusDevice actually initialized with a value) must be placed first within the state struct. To facilitate accessing the PCIHostState fields, derive all PCI host bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE. We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22unin_pci: QOM'ify UniNorth PCI host bridgesAndreas Färber1-65/+72
Introduce type constants and cast macros. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22spapr_pci: QOM'ify sPAPR PCI host bridgeAndreas Färber3-46/+56
Introduce type constant. Introduce cast macro to drop bogus busdev field that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Free the identifier phb as acronym for PCI_HOST_BRIDGE. Updated against conflicting merge from branch 'agraf/ppc-for-upstream' (0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field differently, moved some code around and added new occurrences of 'phb'. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22prep_pci: QOM'ify Raven PCI host bridgeAndreas Färber1-5/+12
Introduce type constant and cast macro. Avoid accessing parent fields directly. Also add missing space and braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22ppce500_pci: QOM'ify e500 PCI host bridgeAndreas Färber1-5/+11
Introduce type constant and cast macro. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22ppc4xx_pci: QOM'ify ppc4xx PCI host bridgeAndreas Färber3-6/+12
Introduce type constant and cast macro. Avoid accessing its parent field directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22gt64xxx: QOM'ify GT64120 PCI host bridgeAndreas Färber1-15/+20
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() macro that would've broken SYS_BUS_DEVICE(). Avoid accessing DeviceState indirectly through PCIHostState. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22grackle_pci: QOM'ify Grackle PCI host bridgeAndreas Färber2-29/+29
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Drop no-op reset function. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22dec_pci: QOM'ify DEC 21154 PCI-PCI bridgeAndreas Färber2-10/+13
Introduce type constant. Introduce cast macro and drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22bonito: QOM'ify Bonito PCI host bridgeAndreas Färber1-56/+90
Introduce type constant. Avoid accessing DeviceState or SysBusDevice indirectly through PCIHostState field. Drop global state by passing BonitoState as opaque and adding the IRQs and a pointer to PCIBonitoState to its state. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22alpha_typhoon: QOM'ify Typhoon PCI host bridgeAndreas Färber1-7/+13
Introduce type constant and cast macro. Don't access DeviceState or PCIHostState indirectly through parent fields. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci: Make host bridge TypeInfos constAndreas Färber11-29/+29
During the QOM migration they were amended with further info but this is no longer the case. All static TypeInfos can be const these days. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine typesStefan Hajnoczi3-2/+6
QEMU has a policy of keeping a stable guest device ABI. When new guest device features are introduced they must not change hardware info seen by existing guests. This is important because operating systems or applications may "fingerprint" the hardware and refuse to run when the hardware changes. To always get the latest guest device ABI, run with x86 machine type "pc". This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from existing machine types. Only pc-1.2 and later will expose this feature by default. For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see: commit 13e3dce068773c971ff2f19d986378c55897c4a3 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Thu Aug 9 16:07:19 2012 +0200 virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Anthony Liguori <aliguori@us.ibm.com> reported: This broke qemu-test because it changed the pc-1.0 machine type: Setting guest RANDOM seed to 47167 *** Running tests *** Running test /tests/finger-print.sh... OK --- fingerprints/pc-1.0.x86_64 2011-12-18 13:08:40.000000000 -0600 +++ fingerprint.txt 2012-08-12 13:30:48.000000000 -0500 @@ -55,7 +55,7 @@ /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002 /sys/bus/pci/devices/0000:00:06.0/class=0x010000 /sys/bus/pci/devices/0000:00:06.0/revision=0x00 -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4 +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4 /sys/class/dmi/id/bios_vendor=Bochs /sys/class/dmi/id/bios_date=01/01/2007 /sys/class/dmi/id/bios_version=Bochs Guest fingerprint changed for pc-1.0! Reported-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22softmmu-semi: fix lock_user* functions not to deref NULL upon OOMJim Meyering1-1/+4
Return NULL upon malloc failure. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPENJim Meyering1-6/+7
Always call unlock_user before returning. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22sheepdog: don't leak socket file descriptor upon connection failureJim Meyering1-0/+1
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failureJim Meyering1-2/+2
Also, use g_malloc to avoid NULL-deref upon OOM. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22qemu-ga: don't leak a file descriptor upon failed lockfJim Meyering1-0/+3
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22xen-all.c: fix multiply issue for int and uint typesDongxiao Xu1-8/+16
If the two multiply operands are int and uint types separately, the int type will be transformed to uint firstly, which is not the intent in our code piece. The fix is to add (int64_t) transform for the uint type before the multiply. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-08-22Fix invalidate if memory requested was not bucket alignedFrediano Ziglio1-4/+5
When memory is mapped in qemu_map_cache with lock != 0 a reverse mapping is created pointing to the virtual address of location requested. The cached mapped entry is saved in last_address_vaddr with the memory location of the base virtual address (without bucket offset). However when this entry is invalidated the virtual address saved in the reverse mapping is used. This cause that the mapping is freed but the last_address_vaddr is not reset. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-08-21i82378: Remove bogus MMIO coalescingJan Kiszka1-1/+0
This MMIO area is an entry gate to legacy PC ISA devices, addressed via PIO over there. Quite a few of the PIO ports have side effects on access like starting/stopping timers that must be executed properly ordered /wrt the CPU. So we have to remove the coalescing mark. Acked-by: Hervé Poussineau <hpoussin@reactos.org> Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-21eventfd: making it thread safeAlexey Kardashevskiy1-0/+1
QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called when select() is not waiting. However IO handlers list can be changed in the thread other than the main one doing os_host_main_loop_wait(), for example, as a result of a hypercall which changes PCI config space (VFIO on POWER is the case) and enables/disabled MSI/MSIX which closes/creates eventfd handles. As the main loop should be waiting on the newly created eventfds, it has to be restarted. The patch adds the qemu_notify_event() call to interrupt select() to make main_loop() restart select() with the updated IO handlers list. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-21migration: move total_time from ram stats to migration infoJuan Quintela4-15/+16
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-20monitor: avoid declaring unused variablesBlue Swirl1-1/+1
Some variables are only used on !win32, declare them only when used. This avoids a warning in mingw32 build: CC i386-softmmu/monitor.o /src/qemu/monitor.c: In function 'monitor_fdset_get_fd': /src/qemu/monitor.c:2575: warning: unused variable 'mon_fd_flags' /src/qemu/monitor.c:2574: warning: unused variable 'mon_fdset_fd' /src/qemu/monitor.c:2573: warning: unused variable 'mon_fdset' Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-20qapi: Fix memory leakStefan Weil1-1/+1
valgrind report: ==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601 ==24534== at 0x4824F20: malloc (vg_replace_malloc.c:236) ==24534== by 0x293C88: malloc_and_trace (vl.c:2281) ==24534== by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1) ==24534== by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1) ==24534== by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376) ==24534== by 0x29DEA5: net_client_init (net.c:708) ==24534== by 0x29E6C7: net_init_client (net.c:966) ==24534== by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114) ==24534== by 0x29E85B: net_init_clients (net.c:1008) ==24534== by 0x296F40: main (vl.c:3463) Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-20virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machinesPaolo Bonzini3-8/+16
Hotplug and parameter change are new in 1.2, disable them via compat properties for pc-1.1 and earlier. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-20iscsi: fix races between task completion and abortPaolo Bonzini1-29/+30
This patch fixes two main issues with block/iscsi.c: 1) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which was also directly called in iscsi_aio_cancel 2) a race between task completion and task abortion could happen cause the scsi_free_scsi_task were done before iscsi_schedule_bh has finished. To fix this, all the freeing of IscsiTasks and releasing of the AIOCBs is centralized in iscsi_bh_cb, independent of whether the SCSI command has completed or was cancelled. 3) iscsi_aio_cancel was not synchronously waiting for the end of the command. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-20iscsi: simplify iscsi_schedule_bhPaolo Bonzini1-15/+9
It is always used with the same callback, remove the argument. And its return value is never used, assume allocation succeeds. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-20iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cbPaolo Bonzini1-28/+28
Put these functions at the beginning, to avoid forward references in the next patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-20Revert "iscsi: Fix NULL dereferences / races between task completion and abort"Paolo Bonzini1-23/+32
This reverts commit 64e69e80920d82df3fa679bc41b13770d2f99360. The commit returned immediately from iscsi_aio_cancel, risking corruption in case the following happens: guest qemu target ========================================================================= send write 1 --------> send write 1 --------> cancel write 1 ------> cancel write 1 ------> <------------------ cancellation processed send write 2 --------> send write 2 --------> <---------------- completed write 2 <------------------ completed write 2 <---------------- completed write 1 <---------------- cancellation not done Here, the guest would see write 2 superseding write 1, when in fact the outcome could have been the opposite. The right behavior is to return only after the target says whether the cancellation was done or not, and it will be implemented by the next three patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-19Update OpenBIOS imagesBlue Swirl4-1/+1
Update OpenBIOS images to SVN r1062. Build with GCC 4.6.0 in order to avoid boot problems introduced by GCC 4.7.[01]. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18pc: Fix RTC CMOS info on RAM for ram_size < 1MiBMarkus Armbruster1-13/+18
pc_cmos_init() always claims 640KiB base memory, and ram_size - 1MiB extended memory. The latter can underflow to "lots of extended memory". Fix both, and clean up some. Note: SeaBIOS currently requires 1MiB of RAM, and doesn't check whether it got enough. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18vl: Round argument of -m up to multiple of 8KiBMarkus Armbruster1-3/+4
Partial pages make little sense and don't work. Ensure the RAM size is a multiple of any possible target's page size. Fixes $ qemu-system-x86_64 -nodefaults -S -vnc :0 -m 0.8 qemu-system-x86_64: /work/armbru/qemu/exec.c:2255: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18scsi: fix warningGerd Hoffmann1-0/+2
hw/scsi-bus.c:758: warning: ‘xfer’ may be used uninitialized in this function Isn't true, but older gcc versions (for example 4.1 as shipped in rhel5) are not clever enougth to figure, so sprinkle in a default: line to make them happy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18Avoid asprintf() which is not available on mingwGerd Hoffmann1-6/+2
Use g_strdup_printf() instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-17virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine typesStefan Hajnoczi4-1/+9
QEMU has a policy of keeping a stable guest device ABI. When new guest device features are introduced they must not change hardware info seen by existing guests. This is important because operating systems or applications may "fingerprint" the hardware and refuse to run when the hardware changes. To always get the latest guest device ABI, run with x86 machine type "pc". This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from existing machine types. Only pc-1.2 and later will expose this feature by default. For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see: commit 13e3dce068773c971ff2f19d986378c55897c4a3 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Thu Aug 9 16:07:19 2012 +0200 virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Anthony Liguori <aliguori@us.ibm.com> reported: This broke qemu-test because it changed the pc-1.0 machine type: Setting guest RANDOM seed to 47167 *** Running tests *** Running test /tests/finger-print.sh... OK --- fingerprints/pc-1.0.x86_64 2011-12-18 13:08:40.000000000 -0600 +++ fingerprint.txt 2012-08-12 13:30:48.000000000 -0500 @@ -55,7 +55,7 @@ /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002 /sys/bus/pci/devices/0000:00:06.0/class=0x010000 /sys/bus/pci/devices/0000:00:06.0/revision=0x00 -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4 +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4 /sys/class/dmi/id/bios_vendor=Bochs /sys/class/dmi/id/bios_date=01/01/2007 /sys/class/dmi/id/bios_version=Bochs Guest fingerprint changed for pc-1.0! Reported-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-17Documentation: Warn against qemu-img on active imageKevin Wolf1-0/+10
People have repeatedly expected that you can do things like snapshotting an image with qemu-img while a qemu instance is running. Maybe we need to consider locking the files while they are in use, but having a warning in the qemu-img manpage is doable for 1.2 and can't hurt anyway. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-17vmdk: Read footer for streamOptimized imagesKevin Wolf1-0/+56
The footer takes precedence over the header when it exists. It contains the real grain directory offset that is missing in the header. Without this patch, streamOptimized images with a footer cannot be read. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Jeff Cody <jcody@redhat.com>
2012-08-17vmdk: Fix header structureKevin Wolf1-1/+1
Commit bb45ded9 swapped gd_offset and rgd_offset. This is wrong. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-16Update version to 1.2.0-rc0v1.2.0-rc0Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16qemu-char: (Re-)connect for tcp_chr_write() unconnected writingLei Li1-2/+5
tcp_chr_write() did not deal with writing to an unconnected connection and return the original length of the data, it's not right and would cause false writing. So (re-)connect it and return 0 for this situation. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16Allow QEMUMachine to override reset sequencingDavid Gibson3-1/+14
qemu_system_reset() function always performs the same basic actions on all machines. This includes running all the reset handler hooks, however the order in which these will run is not always easily predictable. This patch splits the core of qemu_system_reset() - the invocation of the reset handlers - out into a new qemu_devices_reset() function. qemu_system_reset() will usually call qemu_devices_reset(), but that can be now overriden by a new reset method in the QEMUMachine structure. Individual machines can use this reset method, if necessary, to perform any extra, machine specific initializations which have to occur before or after the bulk of the reset handlers. It's expected that the method will call qemu_devices_reset() at some point, but if the machine has really strange ordering requirements between devices resets it could even override that with it's own reset sequence (with great care, obviously). For a specific example of when this might be needed: a number of machines (but not PC) load images specified with -kernel or -initrd directly into the machine RAM before booting the guest. This mostly works at the moment, but to make this actually safe requires that this load occurs after peripheral devices are reset - otherwise they could have active DMAs in progress which would clobber the in memory images. Some machines (notably pseries) also have other entry conditions which need to be set up as the last thing before executing in guest space - some of this could be considered "emulated firmware" in the sense that the actions of the firmware are emulated directly by qemu rather than by executing a firmware image within the guest. When the platform's firmware to OS interface is sufficiently well specified, this saves time both in implementing the "firmware" and executing it. aliguori: don't unconditionally dereference current_machine Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16pseries: Instantiate USB interface when requiredDavid Gibson1-0/+10
The pseries machine already supports the -vga std option, creating a graphics adapter. However, this is not very useful without being able to add a keyboard and mouse as well. This patch addresses this by adding a USB interface when requested, and automatically adding a USB keyboard and mouse when VGA is enabled. This is a stop gap measure to get usable graphics mode on pseries while waiting for Li Zhang's rework of USB options to go in after 1.2. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16osdep: Fix compilation failure on BSD systemsPeter Maydell1-1/+7
Fix compilation failure on BSD systems (which don't have O_DIRECT or O_NOATIME: osdep.c:116: error: ‘O_DIRECT’ undeclared (first use in this function) osdep.c:116: error: (Each undeclared identifier is reported only once osdep.c:116: error: for each function it appears in.) osdep.c:116: error: ‘O_NOATIME’ undeclared (first use in this function) Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16Command line support for seccomp with -sandbox (v8)Eduardo Otubo4-8/+55
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v7 -> v8 - Parse options correctly (aliguori)
2012-08-16Adding seccomp calls to vl.c (v8)Eduardo Otubo1-0/+13
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1: - Full seccomp calls and data included in vl.c v1 -> v2: - Full seccomp calls and data removed from vl.c and put into separate qemu-seccomp.[ch] file.
2012-08-16Adding qemu-seccomp.[ch] (v8)Eduardo Otubo2-0/+163
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1: - I added a syscall struct using priority levels as described in the libseccomp man page. The priority numbers are based to the frequency they appear in a sample strace from a regular qemu guest run under libvirt. Libseccomp generates linear BPF code to filter system calls, those rules are read one after another. The priority system places the most common rules first in order to reduce the overhead when processing them. v1 -> v2: - Fixed some style issues - Removed code from vl.c and created qemu-seccomp.[ch] - Now using ARRAY_SIZE macro - Added more syscalls without priority/frequency set yet v2 -> v3: - Adding copyright and license information - Replacing seccomp_whitelist_count just by ARRAY_SIZE - Adding header protection to qemu-seccomp.h - Moving QemuSeccompSyscall definition to qemu-seccomp.c - Negative return from seccomp_start is fatal now. - Adding open() and execve() to the whitelis v3 -> v4: - Tests revealed a bigger set of syscalls. - seccomp_start() now has an argument to set the mode according to the configure option trap or kill. v4 -> v5: - Tests on x86_64 required a new specific set of system calls. - libseccomp release 1.0.0: part of the API have changed in this last release, had to adapt to the new function signatures.
2012-08-16Adding support for libseccomp in configure and Makefile (v8)Eduardo Otubo2-0/+32
Adding basic options to the configure script to use libseccomp or not. The default is set to 'no'. If the flag --enable-libseccomp is used, the script will check for its existence using pkg-config. Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2: - As I removed all the code related to seccomp from vl.c, I created qemu-seccomp.[ch]. - Also making the configure script to add the specific line to Makefile.obj in order to compile with appropriate support to seccomp. v2 -> v3: - Removing the line from Makefile.obj and adding it to Makefile.objs. - Marking libseccomp default option to 'yes' in the configure script. v3 -> v8: - fix configure probe if libseccomp isn't available (aliguori)
2012-08-16dma: Fix stupid typo/thinkoBenjamin Herrenschmidt1-2/+2
Hi hard a brain fart when coding that function, it will fail to "set" the memory beyond the first 512 bytes. This is in turn causing guest crashes in ibmveth (spapr_llan.c on the qemu side) due to the receive queue not being properly initialized. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16memory: add -machine dump-guest-core=on|offJason Baron4-1/+36
Add a new '[,dump-guest-core=on|off]' option to the '-machine' option. When 'dump-guest-core=off' is specified, guest memory is omitted from the core dump. The default behavior continues to be to include guest memory when a core dump is triggered. In my testing, this brought the core dump size down from 384MB to 6MB on a 2GB guest. Is anything additional required to preserve this setting for migration or savevm? I don't believe so. Changelog: v3: Eliminate globals as per Anthony's suggestion set no dump from qemu_ram_remap() as well v2: move the option from -m to -machine, rename option dump -> dump-guest-core Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16Support using a different compiler for Objective-C filesPeter Maydell2-1/+13
MacOSX 10.8 ("Mountain Lion") requires us to compile our one Objective-C source file with clang even if the rest of QEMU requires a real gcc, because the system headers we use make use of Apple's "Blocks" extension to C/ObjC, and mainline gcc doesn't support that. Since we only need to use a true gcc for the parts of QEMU that use the fixed-register env variable, we can simply use clang to build the ObjC file: it will link to the gcc-built objects with no problems. Add the necessary support for an OBJCC variable in the makefile and configure machinery; we default to clang if we have it, otherwise whatever CC is (since gcc might be the Apple gcc which does support Blocks). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16configure: Define OS_OBJECT_USE_OBJC=0 for MacOSX buildsPeter Maydell1-0/+3
MacOSX 10.8 ("Mountain Lion") defaults to trying to use automated reference counting on certain objects. This means that the system header files will use some Objective C syntax constructs even when compiling pure C, which confuses mainline gcc. Suppress this by setting OS_OBJECT_USE_OBJC=0. This avoids a compile error like this: In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:5:0, from /usr/include/os/object.h:74, from /usr/include/dispatch/dispatch.h:48, from /System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:56, from block/raw-posix.c:35: /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:409:1: error: stray ‘@’ in program [with a large number of further run-on errors] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16configure: Don't override user's --cpu on MacOS and SolarisPeter Maydell1-25/+35
Both MacOS and Solaris have special case handling for the CPU type, because the check_define probes will return i386 even if the hardware is 64 bit and x86_64 would be preferable. Move these checks earlier in the configure probing so that we can do them only if the user didn't specify a CPU with --cpu. This fixes a bug where the user's command line argument was being ignored. Reviewed-by: Andreas F=E4rber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16check-qjson: add test for large JSON objectsMichael Roth1-0/+53
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16json-parser: don't replicate tokens at each level of recursionMichael Roth1-88/+142
Currently, when parsing a stream of tokens we make a copy of the token list at the beginning of each level of recursion so that we do not modify the original list in cases where we need to fall back to an earlier state. In the worst case, we will only read 1 or 2 tokens off the list before recursing again, which means an upper bound of roughly N^2 token allocations. For a "reasonably" sized QMP request (in this a QMP representation of cirrus_vga's device state, generated via QIDL, being passed in via qom-set), this caused my 16GB's of memory to be exhausted before any noticeable progress was made by the parser. This patch works around the issue by using single copy of the token list in the form of an indexable array so that we can save/restore state by manipulating indices. A subsequent commit adds a "large_dict" test case which exhibits the same behavior as above. With this patch applied the test case successfully completes in under a second. Tested with valgrind, make check, and QMP. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16qlist: add qlist_size()Michael Roth2-0/+14
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16audio: Make pcspk card selectable againJan Kiszka1-0/+5
[ The following text is in the "ISO-8859-1" character set. ] [ Your display is set for the "KOI8-R" character set. ] [ Some special characters may be displayed incorrectly. ] Since we moved pcspk into hwlib, CONFIG_PCSPK is no longer defined per target. Therefore, statically built soundhw array in arch_init.c stopped including this card. Work around this by re-adding this define to config-target.mak. Long-term, a dynamic creation of this soundhw list will be necessary. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: malc <av1474@comtv.ru>
2012-08-16ehci: Fix setting of halt bit from usbcmd register updatesHans de Goede1-7/+8
This fixes linux guests started without any USB devices not seeing newly plugged devices until "lsusb" is done inside the guest. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-16ehci: fix Interrupt Threshold Control implementationGerd Hoffmann1-2/+10
First, not all interrupts are subject to Interrupt Threshold Control, some of them must be delivered without delay. Second, Interrupt Threshold Control state must be part of vmstate, otherwise we might loose IRQs on migration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-16usb: update uas product idGerd Hoffmann1-1/+1
Pick other product id to fix clash with audio. Current usage list (after applying this patch): 46f4:0001 -- usb-storage 46f4:0002 -- usb-audio 46f4:0003 -- usb-uas Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-16usb: async control xfer fixupGerd Hoffmann2-0/+2
Need to clear p->result after copying setup data using usb_packet_copy() because we'll reuse the USBPacket for the data transfer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-15Merge remote-tracking branch 'agraf/s390-for-upstream' into stagingAnthony Liguori5-27/+55
* agraf/s390-for-upstream: s390: provide interface for service interrupt/introduce interrupt.c s390: Fix error handling and condition code of service call
2012-08-15Merge remote-tracking branch 'agraf/ppc-for-upstream' into stagingAnthony Liguori34-209/+717
* agraf/ppc-for-upstream: (24 commits) openpic: Added BRR1 register pseries: Update SLOF firmware image pseries dma: DMA window params added to PHB and DT population changed pseries: Add PCI MSI/MSI-X support pseries: Add trace event for PCI irqs pseries: Export find_phb() utility function for PCI code pseries: added allocator for a block of IRQs pseries: Separate PCI RTAS setup from common from emulation specific PCI setup pseries: Rework irq assignment to avoid carrying qemu_irqs around pseries: Remove extraneous prints pseries: Update SLOF PPC: spapr: Remove global variable PPC: spapr: Rework VGA select logic xbzrle: fix compilation on ppc32 spapr: Add support for -vga option Add one new file vga-pci.h and cleanup on all platforms Revert "PPC: e500: Use new MPIC dt format" ppc: Fix bug in handling of PAPR hypercall exits PPC: e500: add generic e500 platform PPC: e500: split mpc8544ds machine from generic e500 code ...
2012-08-15win32: provide separate macros for weak decls and definitionsAnthony Liguori5-5/+21
mingw32 seems to want the declaration to also carry the weak attribute. Strangely, gcc on Linux absolutely does not want the declaration to be marked as weak. This may not be the right fix, but it seems to do the trick. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-15Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori10-13/+20
* stefanha/trivial-patches: ivshmem, qdev-monitor: fix order of qerror parameters iov_send_recv(): Handle zero bytes case even if OS does not framebuffer: Fix spelling in comment (leight -> height) Spelling fix in comment (peripherans -> peripherals) docs: Fix spelling (propery -> property) trace: Fix "Qemu" -> "QEMU" cputlb.c: Fix out of date comment ehci: fix assertion typo Makefile: Avoid explicit list of directories in clean target
2012-08-15Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori22-96/+776
* kwolf/for-anthony: qemu-iotests: Fix 030 after switch to GenericError block: Flush parent to OS with cache=unsafe iscsi: Fix NULL dereferences / races between task completion and abort monitor: Clean up fd sets on monitor disconnect block: Enable qemu_open/close to work with fd sets block: Convert close calls to qemu_close block: Convert open calls to qemu_open block: Prevent detection of /dev/fdset/ as floppy qapi: Introduce add-fd, remove-fd, query-fdsets qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg
2012-08-15openpic: Added BRR1 registerBharat Bhushan1-0/+17
Linux mpic driver uses (changes may be in pipeline to get upstreamed soon) BRR1. This patch adds the support to emulate readonly FSL BRR1 register. Currently QEMU does not fully emulate any version on MPIC, so the MPIC Major number and Minor number are set to 0. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Update SLOF firmware imageDavid Gibson3-1/+1
This updates SLOF to handle the necessary device tree properties for MSI and MSI-X. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries dma: DMA window params added to PHB and DT population changedAlexey Kardashevskiy5-28/+51
Previously the only PCI bus supported was the emulated PCI bus with fixed DMA window with start at 0 and size 1GB. As we are going to support PCI pass through which DMA window properties are set by the host kernel, we have to support DMA windows with parameters other than default. This patch adds: 1. DMA window properties to sPAPRPHBState: LIOBN (bus id), start, size of the window. 2. An additional function spapr_dma_dt() to populate DMA window properties in the device tree which simply accepts all the parameters and does not try to guess what kind of IOMMU is given to it. The original spapr_dma_dt() is renamed to spapr_tcet_dma_dt(). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Add PCI MSI/MSI-X supportAlexey Kardashevskiy4-4/+268
This patch implements MSI and MSI-X support for the pseries PCI host bridge. To do this it adds: * A "config_space_address to msi_table" map, since the MSI RTAS calls take a PCI config space address as an identifier. * A MSIX memory region to catch msi_notify()/msix_notiry() from virtio-pci and pass them to the guest via qemu_irq_pulse(). * RTAS call "ibm,change-msi" which sets up MSI vectors for a device. Note that this call may configure and return lesser number of vectors than requested. * RTAS call "ibm,query-interrupt-source-number" which translates MSI vector to interrupt controller (XICS) IRQ number. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix error case ndev < 0] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Add trace event for PCI irqsAlexey Kardashevskiy2-0/+5
This adds a trace event in the pseries PCI specific set_irq() function to assist in debugging. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: add trace.h include] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Export find_phb() utility function for PCI codeAlexey Kardashevskiy1-10/+21
The pseries PCI code makes use of an internal find_dev() function which locates a PCIDevice * given a (platform specific) bus ID and device address. Internally this needs to first locate the host bridge on which the device resides based on the bus ID. This patch exposes that host bridge lookup as a separate function, which we will need later in the MSI and VFIO code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: drop trace.h inclusion] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: added allocator for a block of IRQsAlexey Kardashevskiy2-0/+27
The patch adds a simple helper which allocates a consecutive sequence of IRQs calling spapr_allocate_irq for each and checks that allocated IRQs go consequently. The patch is required for upcoming support of MSI/MSIX on POWER. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Separate PCI RTAS setup from common from emulation specific PCI setupAlexey Kardashevskiy3-5/+12
Currently the RTAS functions for handling PCI are registered from the class init code for the PCI host bridge. That sort of makes sense now, but will break in the future when vfio gives us multiple types of host bridge for pseries (emulated and pass-through, at least). The RTAS functions will be common across all host bridge types (and will call out to different places internally depending on the type). So, this patch moves the RTAS registration into its own function called direct from the machine setup code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Rework irq assignment to avoid carrying qemu_irqs aroundAlexey Kardashevskiy10-42/+50
Currently, the interfaces in the pseries machine code for assignment and setup of interrupts pass around qemu_irq objects. That was done in an attempt not to be too closely linked to the specific XICS interrupt controller. However interactions with the device tree setup made that attempt rather futile, and XICS is part of the PAPR spec anyway, so this really just meant we had to carry both the qemu_irq pointers and the XICS irq numbers around. This mess will just get worse when we add upcoming PCI MSI support, since that will require tracking a bunch more interrupt. Therefore, this patch reworks the spapr code to just use XICS irq numbers (roughly equivalent to GSIs on x86) and only retrieve the qemu_irq pointers from the XICS code when we need them (a trivial lookup). This is a reworked and generalized version of an earlier spapr_pci specific patch from Alexey Kardashevskiy. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix checkpath warning] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Remove extraneous printsDavid Gibson1-18/+0
The pseries machine prints several messages to stderr whenever it starts up and another whenever the vm is reset. It's not normal for qemu machines to do this though, so this patch removes them. We can put them back conditional on a DEBUG symbol if we really need them in future. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Update SLOFBenjamin Herrenschmidt3-1/+1
This patch updates the SLOF version, introducing a number of fixes: * add proper graphics support * fix bugs with graphical terminal under grub2 * fix bugs in handling of 64-bit unit addresses * fix VSCSI representation to be closer to PowerVM * fix bugs which caused grub2 to crash Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: spapr: Remove global variableAlexander Graf2-3/+3
Global variables are bad. Let's move spapr_has_graphics into the machine state struct. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: spapr: Rework VGA select logicAlexander Graf1-4/+9
When selecting our VGA adapter, we want to: * fail completely when we can't satisfy the user's request * support -nographic where no VGA adapter should be spawned This patch reworks the logic so we fulfill the two conditions above. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15xbzrle: fix compilation on ppc32Alexander Graf1-1/+1
When compiling the xbzrle code on my ppc32 user space, I hit the following gcc compiler warning (treated as an error): cc1: warnings being treated as errors savevm.c: In function ‘xbzrle_encode_buffer’: savevm.c:2476: error: overflow in implicit constant conversion Fix this by making the cast explicit, rather than implicit. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15spapr: Add support for -vga optionzhlcindy@gmail.com1-1/+25
Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> [agraf: remove USB bits] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15Add one new file vga-pci.h and cleanup on all platformszhlcindy@gmail.com11-8/+21
Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all platforms. This patch also cleans up on all platforms. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15Revert "PPC: e500: Use new MPIC dt format"Alexander Graf1-17/+14
This reverts commit 518c7fb44f2182cde943dc64f88cb2fd4e4ff6b5. It breaks new Linux guests with SMP, because IPIs get mapped to large vectors which our MPIC emulation does not implement. Conflicts: hw/ppc/e500.c
2012-08-15ppc: Fix bug in handling of PAPR hypercall exitsDavid Gibson1-1/+1
Currently for powerpc, kvm_arch_handle_exit() always returns 1, meaning that its caller - kvm_cpu_exec() - will always exit immediately afterwards to the loop in qemu_kvm_cpu_thread_fn(). There's no need to do this. Once we've handled the hypercall there's no reason we can't go straight around and KVM_RUN again, which is what ret = 0 will signal. The only exception might be for hypercalls which affect the state of cpu_can_run(), however the only one that might do this is H_CEDE and for kvm that is always handled in the kernel, not qemu. Furtherm setting ret = 0 means that when exit_requested is set from a hypercall, we will enter KVM_RUN once more with a signal which lets the the kernel do its internal logic to complete the hypercall with out actually executing any more guest code. This is important if our hypercall also triggered a reset, which previously would re-initialize everything without completing the hypercall. This caused the kernel to get confused because it thought the guest was still in the middle of a hypercall when it has actually been reset. This patch therefore changes to ret = 0, which is both a bugfix and a small optimization. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: add generic e500 platformScott Wood2-1/+61
This gives the kernel a paravirtualized machine to target, without requiring both sides to pretend to be targeting a specific board that likely has little to do with the host in KVM scenarios. This avoids the need to add new boards to QEMU, just to be able to run KVM on new CPUs. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: split mpc8544ds machine from generic e500 codeScott Wood4-51/+114
Currently the only mpc8544ds-ism that is factored out is toplevel compatible and model. In the future the generic e500 code is expected to become more generic. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: change internal references away from mpc8544dsScott Wood1-13/+14
No functional changes -- machine is still outwardly mpc8544ds. The references that are not changed contain mpc8544 hardware details that need to be parameterized if/when a different e500 platform wants to change them. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: rename mpc8544ds into generic fileScott Wood2-9/+11
Rename the file (with no changes other than fixing up the header paths) in preparation for refactoring into a generic e500 platform. Also move it into the newly created ppc/ directory. Signed-off-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Andreas Färber <afaerber@suse.de> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dtAlexey Kardashevskiy3-7/+7
spapr_populate_pci_devices() populates the device tree only with bus properties and has nothing to do with the devices on it as PCI BAR allocation is done by the system firmware (SLOF). New name - spapr_populate_pci_dt() - describes the functionality better. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries pci: removed redundant busdevAlexey Kardashevskiy2-3/+2
The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori3-19/+42
* qemu-kvm/uq/master: update-linux-headers.sh: Pull in asm-generic/kvm_para.h kvmvapic: Disable if there is insufficient memory kvm: i8254: Finish time conversion fix kvm: i8254: Cache kernel clock offset in KVMPITState
2012-08-15Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori3-24/+14
* stefanha/tracing: trace/simple: Replace asprintf by g_strdup_printf trace/simple: Fix compiler warning for 32 bit hosts trace: avoid pointer aliasing in trace_record_finish() trace: drop unused TraceBufferRecord->next_tbuf_idx field trace: remove unnecessary write_to_buffer() typecasting trace: rename TraceRecordHeader to TraceLogHeader
2012-08-15s390: provide interface for service interrupt/introduce interrupt.cChristian Borntraeger4-16/+34
This patch creates interrupt.c. The first user is a callback for hw/* code to trigger an service interrupt for a given sccb value. Several interrupt types for s390 are floating (can be delivered to all CPUs). so this code does not belong to a specific CPU. Other interrupts (like the virtio one) are also floating and can be moved here later on. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15s390: Fix error handling and condition code of service callChristian Borntraeger2-11/+21
Invalid sccb addresses will cause specification or addressing exception. Lets add those checks. Furthermore, the good case (cc=0) was incorrect for KVM, we did not set the CC at all. We now use return codes < 0 as program checks and return codes > 0 as condition code values. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15ivshmem, qdev-monitor: fix order of qerror parametersAlberto Garcia2-2/+3
Now that the QERR_ macros no longer contain a json dictionary, the order of some parameters needs to be fixed for them to appear correctly. Signed-off-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15iov_send_recv(): Handle zero bytes case even if OS does notPeter Maydell1-0/+7
POSIX allows sendmsg() and recvmsg() to fail EMSGSIZE if passed a zero msg.msg_iovlen (in particular the MacOS X implementation will do this). Handle the case where iov_send_recv() is passed a zero byte count explicitly, to avoid accidentally depending on the OS to treat zero msg_iovlen as a no-op. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15framebuffer: Fix spelling in comment (leight -> height)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15Spelling fix in comment (peripherans -> peripherals)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15docs: Fix spelling (propery -> property)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15trace: Fix "Qemu" -> "QEMU"Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15cputlb.c: Fix out of date commentPeter Maydell1-1/+3
The comment about the return address from get_page_addr_code() was well out of date as phys_ram_base has not existed for some time. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15ehci: fix assertion typoAlejandro Martinez Ruiz1-1/+1
Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15Makefile: Avoid explicit list of directories in clean targetPeter Maydell1-5/+2
Avoid having an explicit list of directories in the 'clean' target by using 'find' to remove all .o and .d files instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15qemu-iotests: Fix 030 after switch to GenericErrorKevin Wolf1-4/+2
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15block: Flush parent to OS with cache=unsafeKevin Wolf1-1/+2
Commit 29cdb251 already added a comment that no unnecessary flushes to disk will occur, this patch makes the code even get to the point of the comment. This is mostly theoretical because in practice we only stack one format on top of one protocol, the former implementing flush_to_os and the latter only flush_to_disk. It starts to matter when drivers that are not on top implement flush_to_os. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15iscsi: Fix NULL dereferences / races between task completion and abortStefan Priebe1-32/+23
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag> Acked-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15monitor: Clean up fd sets on monitor disconnectCorey Bryant1-1/+22
Fd sets are shared by all monitor connections. Fd sets are considered to be in use while at least one monitor is connected. When the last monitor disconnects, all fds that are members of an fd set with no outstanding dup references are closed. This prevents any fd leakage associated with a client disconnect prior to using a passed fd. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Enable qemu_open/close to work with fd setsCorey Bryant9-5/+251
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is found, a dup of the fd will be returned from qemu_open. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Convert close calls to qemu_closeCorey Bryant8-24/+30
This patch converts all block layer close calls, that correspond to qemu_open calls, to qemu_close. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>