summaryrefslogtreecommitdiff
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* qemu-kvm: fix crash on reboot with vhost-netqemu-kvm-0.12.4-gentoo-2qemu-kvm-0.12.4-gentooMichael S. Tsirkin2010-07-203-0/+139
| | | | | | | | | | | | | | | | | | | | When vhost-net is disabled on reboot, we set msix mask notifier to NULL to disable further mask/unmask notifications. Code currently tries to pass this NULL to notifier, leading to a crash. The right thing to do is to add explicit APIs to enable/disable notifications. Now when disabling notifications: - if vector is masked, we don't need to notify backend, just disable future notifications - if vector is unmasked, invoke callback to unassign backend, then disable future notifications This patch also polls notifier before closing it, to make sure we don't lose events if poll callback didn't have time to run. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* arm_timer: fix oneshot modeRabin Vincent2010-07-201-1/+1
| | | | | | | | | In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9)
* arm_timer: reload timer when enabledRabin Vincent2010-07-201-1/+1
| | | | | | | | | | | | | | | | | Reload the timer when TimerControl is written, if the timer is to be enabled. Otherwise, if an earlier write to TimerLoad was done while periodic mode was not set, s->delta may incorrectly still have the value of the maximum limit instead of the value written to TimerLoad. This problem is evident on versatileap on current linux-next, which enables TIMER_CTRL_32BIT before writing to TimerLoad and then enabling periodic mode and starting the timer. This causes the first periodic tick to be scheduled to occur after 0xffffffff periods, leading to a perceived hang while the kernel waits for the first timer tick. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit d6759902cb467c002086853d2eb38fb969c29f7f)
* Correct definitions for FD_CMD_SAVE and FD_CMD_RESTOREJes Sorensen2010-07-201-2/+2
| | | | | | | | | | | | | Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE in hw/fdc.c Per https://bugs.launchpad.net/qemu/+bug/424453 the correct values for FD_CMD_SAVE is 0x2e and FD_CMD_RESTORE is 0x4e. Verified against the Intel 82078 manual which can be found at: http://wiki.qemu.org/Documentation/HardwareManuals page 22. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit bb350a5e9b961a8c3940b3451c329ff07c027aa1)
* ide: Fix ide_dma_cancelKevin Wolf2010-07-201-4/+4
| | | | | | | | | | When cancelling a request, bdrv_aio_cancel may decide that it waits for completion of a request rather than for cancellation. IDE therefore can't abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback of a completed request would use invalid data. Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 38d8dfa193e9a45f0f08b06aab2ba2a94f40a041)
* usb-bus: fix no paramsLuiz Capitulino2010-07-201-1/+1
| | | | | | | | | | | After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is nerver NULL. It should check *params instead of params to determine whether the params is empty. Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> (cherry picked from commit 98f22dc172e1ebd5341da3de0d67666442566f72)
* Avoid crash on '-usbdevice <device>' without parametersJan Kiszka2010-07-201-1/+3
| | | | | | | | Many usbdevice_init implementors assume params is non-NULL. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 702f3e0fb52c124c07f215426eeadb70a716643f)
* Fix -usbdevice crashPaul Brook2010-07-204-0/+12
| | | | | | | | | If -usbdevice is used on a machine with no USB busses, usb_create will fail and return NULL. Patch below handles this failure gracefully rather than crashing when we try to init the device. Signed-off-by: Paul Brook <paul@codesourcery.com> (cherry picked from commit d44168fffa07fc57e61a37da65e9348661dec887)
* virtio-blk: fix barrier supportChristoph Hellwig2010-07-201-2/+13
| | | | | | | | | Before issuing the barrier to the block driver we need to flush our oustanding queue of write requests, as the flush is supposed to be issued after them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 618fbb84299780af96e3d4c4b6f2148656fe3708)
* pci: irq_state vmstate breakageMichael S. Tsirkin2010-07-201-2/+2
| | | | | | | | | | | | | | | | Code for saving irq_state got vm_state macros wrong, passing in the wrong parameter. As a result, we both saved a wrong value and restored it to a wrong offset. This leads to device and bus irq counts getting out of sync, which in turn leads to interrupts getting lost or never cleared, such as https://bugzilla.redhat.com/show_bug.cgi?id=588133 Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> (cherry picked from commit c3f8f61157625d0bb5bfc135047573de48fdc675)
* Merge commit 'v0.12.4' into stable-0.12qemu-kvm-0.12.4Avi Kivity2010-05-0910-205/+131
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'v0.12.4': (49 commits) Update for 0.12.4 release Workaround for broken OSS_GETVERSION on FreeBSD, part two oss: fix fragment setting oss: issue OSS_GETVERSION ioctl only when needed oss: refactor code around policy setting oss: workaround for cases when OSS_GETVERSION is not defined block: Free iovec arrays allocated by multiwrite_merge() lsi: fix segfault in lsi_command_complete lsi: pass lsi_request to lsi_reselect lsi: move dma_len+dma_buf into lsi_request lsi: move current_dev into lsi_request lsi: have lsi_request for the whole life time of the request. lsi: use QTAILQ for lsi_queue tcp/mips: Change TCG_AREG0 (fp -> s0) sh_pci: fix memory and I/O access Fix incoming migration with iothread Fix SIGFPE for vnc display of width/height = 1 net: remove broken net_set_boot_mask() boot device validation qcow2: Remove request from in-flight list after error qcow2: Don't ignore immediate read/write failures ... Signed-off-by: Avi Kivity <avi@redhat.com>
| * lsi: fix segfault in lsi_command_completeGerd Hoffmann2010-04-181-1/+1
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 6ac08101f9de84be1fb7b45f87caed8ba8f3eb5a)
| * lsi: pass lsi_request to lsi_reselectGerd Hoffmann2010-04-181-16/+7
| | | | | | | | | | | | | | | | | | | | All callers of lsi_reselect have a lsi_request struct at hand anyway. So just pass it directly instead of having lsi_reselect search for it using the tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit aa4d32c4742e62e09786bd1067a5b98239867e93)
| * lsi: move dma_len+dma_buf into lsi_requestGerd Hoffmann2010-04-181-22/+23
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit b96a0da06bd782ef290445479a6d4d0de00c2c23)
| * lsi: move current_dev into lsi_requestGerd Hoffmann2010-04-181-11/+12
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit daa70311e0f7b37cd0ea3c4de0d163ccf1a36abe)
| * lsi: have lsi_request for the whole life time of the request.Gerd Hoffmann2010-04-181-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Right now lsi_request is allocated when a request is queued and released when a request is unqueued. With this patch applied the lsi_request is kept for the whole lifetime of the scsi request. Rationale: We can use it for per-request data then. The patch does that already for the request tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit af12ac9880eacdd79d49a11d5672df7170afb38f)
| * lsi: use QTAILQ for lsi_queueGerd Hoffmann2010-04-181-40/+28
| | | | | | | | | | | | | | | | | | Replace the funky array logic for queued commands with standard qemu list functions. Also rename lsi_queue to lsi_request. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 042ec49dc52e54153942a089a46ae584152998fb)
| * sh_pci: fix memory and I/O accessAurelien Jarno2010-04-141-96/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8da3ff180974732fc4272cb4433fef85c1822961 ("MMIO callback interface changes"), the addresses passed to the I/O functions are an offset to the start of the area. As a consequence, there is no need to correct the address using the value of IOBR. This make possible the use of the default MMIO functions. Moreover the addresses are now remaped when the value if IOBR change. The memory area corresponds to the devices behing the PCI bus, it should not be mapped by the PCI controller. Remove the corresponding code. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry-picked from commit 5ba9e9522cf572715ca1966b292f64fb78342e22)
| * scsi-disk: fix buffer overflowGerd Hoffmann2010-04-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | In case s->version is shorter than 4 bytes we overflow the memcpy src buffer. Fix it by clearing the target buffer, then copy only the amount of bytes we actually have. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from 314b1811c15f4e982e4667d9b845aee4b5a63d91) Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * sh7750: handle MMUCR TI bitAurelien Jarno2010-04-091-2/+5
| | | | | | | | | | | | | | | | When the MMUCR TI bit is set, all the UTLB and ITLB entries should be flushed. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit e781d1285fc3b81d689ba25360c6c272116387fa)
| * UHCI spurious interrut fixPaul Brook2010-04-061-3/+4
| | | | | | | | | | | | Only raise an interrupt if the TD has actually completed. Signed-off-by: Paul Brook <paul@codesourcery.com>
| * workaround for cmd646 bmdma register access while no dma is activeIgor V. Kovalenko2010-03-193-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround only, and is a partial revert of a few changes to BMDMAState which removed pci_dev field on the way. - cmd646 pci_from_bm() expects bm->unit value to correspond with bm data being passed to callback as opaque pointer. This breaks when write to dma control register of second channel happens when no dma operation is in progress, so bm->unit is zero for second channel, and pci_from_bm() returns garbage pointer. Crash happens shortly after that while dereferencing that pointer. v0->v1: cleaned up dead code from pci_from_bm. Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit 90228ee395b71cdd64e6bc844e3d553eb9ef643f)
| * spelling typo (compatibilty) in hw/fw_cfg.cVagrant Cascadian2010-03-141-1/+1
| | | | | | | | | | | | | | | | here's a trivial patch to fix the spelling of "compatibility": Signed-off-by: Vagrant Cascadian <vagrant@freegeek.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit 66c80e75752e87a9479577fda1446a7623884f01)
| * fdc: fix drive property handling.Gerd Hoffmann2010-03-131-5/+15
| | | | | | | | | | | | | | | | | | | | Fix the floppy controller init wrappers to set the drive properties only in case the DriveInfo pointers passed in are non NULL. This allows to set the properties using -global. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 995bf0ca57e52f4991d7f90c7eb2bbf7bc3f3c44)
* | pci passthrough: zap option rom scanning.Gerd Hoffmann2010-03-251-75/+0
| | | | | | | | | | | | | | | | | | | | Nowdays (qemu 0.12) seabios loads option roms from pci rom bars. So there is no need any more to scan for option roms and have qemu load them. Zap the code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> (cherry picked from commit 51c0dad5ce383be94ca7c46e491ada17cc9ec416)
* | Merge commit '6173d56bdcb53389c54e803873e6bf8f87836a4f' into stable-0.12-mergeMarcelo Tosatti2010-02-255-45/+150
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6173d56bdcb53389c54e803873e6bf8f87836a4f': (27 commits) Update version and change for 0.12.3 release qcow2: Fix access after end of array ide save/restore pio/atapi cmd transfer fields and io buffer net: Monitor command set_link finds only VLAN clients, fix net: info network shows only VLAN clients, fix net: net_check_clients() checks only VLAN clients, fix net: Fix bogus "Warning: vlan 0 with no nics" with -device net: net_check_clients() runs too early to see -device, fix net: Remove unused net_client_uninit() don't dereference NULL after failed strdup virtio-net: fix network stall under load json: fix PRId64 on Win32 fix inet_parse typo iothread: fix vcpu stop with smp tcg segfault due to buffer overrun in usb-serial qcow2: Fix signedness bugs Do not ignore error, if open file failed (-serial /dev/tty) pc-bios: update to newer version of (stable) seabios kvm: Fix eflags corruption in kvm mode target-mips: fix ROTR and DROTR by zero ... Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> modified: net/slirp.c
| * ide save/restore pio/atapi cmd transfer fields and io bufferMarcelo Tosatti2010-02-232-2/+62
| | | | | | | | | | | | | | | | | | | | | | Save/restore information necessary to continue in progress PIO/ATAPI CMD transfers. This includes the IO buffer. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6)
| * virtio-net: fix network stall under loadTom Lendacky2010-02-231-1/+9
| | | | | | | | | | | | | | | | | | | | Fix a race condition where qemu finds that there are not enough virtio ring buffers available and the guest make more buffers available before qemu can enable notifications. Signed-off-by: Tom Lendacky <toml@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 06b1297017415ae6a07a0e97ad7d8e90b2d95823)
| * segfault due to buffer overrun in usb-serialDavid S. Ahern2010-02-231-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a segfault due to buffer overrun in the usb-serial device. The memcpy was incrementing the start location by recv_used yet, the computation of first_size (how much to write at the end of the buffer before wrapping to the front) was not accounting for it. This causes the next element after the receive buffer (recv_ptr) to get overwritten with random data. Signed-off-by: David Ahern <daahern@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4ab4183d766f10f9fc35cd9ef4acee39f241986f)
| * virtio-blk: Fix error cases which ignored rerror/werrorKevin Wolf2010-01-291-2/+2
| | | | | | | | | | | | | | | | | | If an I/O request fails right away instead of getting an error only in the callback, we still need to consider rerror/werror. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6c510fbf601fd8c6891b2f1d7165ceb82308a16f)
| * virtio-blk: Fix restart after read errorKevin Wolf2010-01-291-2/+9
| | | | | | | | | | | | | | | | | | | | Current code assumes that only write requests are ever going to be restarted. This is wrong since rerror=stop exists. Instead of directly starting writes, use the same request processing as used for new requests. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f1b5286803ee66f73034f1f5e0e1cf14f4415f94)
| * virtio_blk: Factor virtio_blk_handle_request outKevin Wolf2010-01-291-32/+46
| | | | | | | | | | | | | | | | | | We need a function that handles a single request. Create one by splitting out code from virtio_blk_handle_output. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit bc6694d43a68baa864dba7742354a379a3347f33)
* | Merge commit '299e0bc52a5d56ff89ad8d7d09c82233cd8ccb6a' into stable-0.12-mergeMarcelo Tosatti2010-02-254-9/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '299e0bc52a5d56ff89ad8d7d09c82233cd8ccb6a': cirrus: Properly re-register cirrus_linear_io_addr on vram unmap qcow2: Don't ignore qcow2_alloc_clusters return value qcow2: Don't ignore update_refcount return value qcow2: Allow updating no refcounts qcow2: Improve error handling in update_refcount qcow2: Fix error handling in grow_refcount_table block: Return original error codes in bdrv_pread/write qcow2: Return 0/-errno in qcow2_alloc_cluster_offset qcow2: Return 0/-errno in get_cluster_table qcow2: Fix error handling in qcow_save_vmstate qcow2: Fix error handling in qcow2_grow_l1_table win32/sdl: Fix toggle full screen win32: pair qemu_memalign() with qemu_vfree() vnc_refresh: calling vnc_update_client might free vs Musicpal: Fix descriptor walk in eth_send Musicpal: Fix wm8750 I2C address fix savevm command without id or tag reduce number of reinjects on ACK QMP: Fix asynchronous events delivery Conflicts: hw/cirrus_vga.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * cirrus: Properly re-register cirrus_linear_io_addr on vram unmapJan Kiszka2010-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more: When switching away from linearly mapped vram, we also have to restore the I/O handlers for the LFB. This regression was once introduced by commit 2bec46dc97. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4516e45f82b7ee0cedce875477e785989a719b67)
| * win32: pair qemu_memalign() with qemu_vfree()Herve Poussineau2010-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | Win32 suffers from a very big memory leak when dealing with SCSI devices. Each read/write request allocates memory with qemu_memalign (ie VirtualAlloc) but frees it with qemu_free (ie free). Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks. Signed-off-by: Herve Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f8a83245d9ec685bc6aa6173d6765fe03e20688f)
| * Musicpal: Fix descriptor walk in eth_sendJan Kiszka2010-01-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 930c86820e introduced a regression to eth_send: eth_tx_desc_put manipulates the host's tx descriptor copy before writing it back, but two lines down the descriptor is evaluated again, leaving us with an invalid next address if host and guest endianness differ. So this was the actual issue commit 2e87c5b937 tried to paper over. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru> (cherry picked from commit 07b064e9de65a26a4cb36dfb37c7506ef17407fd) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * Musicpal: Fix wm8750 I2C addressJan Kiszka2010-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit b3a219883e uncovered that we attached the Wolfson with an I2C address shifted left by one. Fixing this makes sound work again for the Musicpal. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru> (cherry picked from commit 642582296479eabded45f262acbfea5121d2fbf8) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * reduce number of reinjects on ACKGleb Natapov2010-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error. It happens here: hal!HalpRtcUnmaskClock: 8281b93a 8bff mov edi,edi 8281b93c 56 push esi 8281b93d 33f6 xor esi,esi 8281b93f 6a0c push 0Ch 8281b941 e8b2ffffff call hal!CMOS_READ (8281b8f8) 8281b946 84c0 test al,al 8281b948 7920 jns hal!HalpRtcUnmaskClock+0x30 (8281b96a) 8281b94a 6a0a push 0Ah 8281b94c 46 inc esi 8281b94d e854c8ffff call hal!KeStallExecutionProcessor (828181a6) 8281b952 83fe64 cmp esi,64h 8281b955 72e8 jb hal!HalpRtcUnmaskClock+0x5 (8281b93f) 8281b957 6a00 push 0 8281b959 6a00 push 0 8281b95b 6a00 push 0 8281b95d 680a010000 push 10Ah 8281b962 6a5c push 5Ch 8281b964 ff1500c38082 call dword ptr [hal!_imp__KeBugCheckEx (8280c300)] 8281b96a 5e pop esi 8281b96b c3 ret So it loops for 100(64h) times reading register C before BSOD. Lets reduce number of immediate reinjection well under this limit. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit dd17765b5f77ca02b4aeaf9e42de8dd7513a0611)
* | Merge commit 'c502715a74675b3554cf7bcd684b82c9733ecfae' into stable-0.12-mergeMarcelo Tosatti2010-02-257-13/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c502715a74675b3554cf7bcd684b82c9733ecfae': Documentation: Add missing documentation for qdev related command line options pc: add driver version compat properties scsi: device version property ide: device version property QMP: Emit asynchronous events on all QMP monitors Fix QEMU_WARN_UNUSED_RESULT Conflicts: qemu-options.hx Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * pc: add driver version compat propertiesGerd Hoffmann2010-01-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | This patch adds compat property entries for ide-disk.ver and scsi-disk.ver to pc-0.10 and pc-0.11. With this patch applied the scsi and ide disks report "0.10" and "0.11" as version when you start qemu with "-M pc-0.10" or "-M pc-0.11". Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 374ef70452452fb729c45dcf1a73a1bd1396cfda)
| * scsi: device version propertyGerd Hoffmann2010-01-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new property named 'ver' to scsi-disk which allows to specify the version which the virtual disk/cdrom should report to the guest. By default this is the qemu version (i.e. 0.12). usage: -drive if=none,id=disk,file=... -device lsi -device scsi-disk,drive=disk,bus=scsi.0,unit=0,ver=42 You can also switch the version for all scsi drives using: -global scsi-disk.ver=42 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 383b4d9b79e3a71b1d5cadd34989b1c0e2a05832)
| * ide: device version propertyGerd Hoffmann2010-01-193-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new property named 'ver' to ide-drive which allows to specify the version which the virtual disk/cdrom should report to the guest. By default this is the qemu version (i.e. 0.12). usage: -drive if=none,id=disk,file=... -device ide-drive,bus=ide.0,unit=0,drive=disk,ver=42 You can also switch the version for all ide drives using: -global ide-drive.ver=42 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 47c063403065793ad6e1d2fdde27d69a00880752)
| * Fix QEMU_WARN_UNUSED_RESULTKevin Wolf2010-01-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it is conditional on a define from config-host.h which is included only later. Include that file earlier to get the warnings back. Reactivating it unfortunately leads to some warnings about unused qdev_init results. These calls are changed to qdev_init_nofail to avoid build failures. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit beb6f0de7aa19ce62fdd21a876b8c171ac7fde2e)
* | device assignment: default requires IOMMUChris Wright2010-01-181-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default mode for device assignment is to rely on an IOMMU for proper translations and a functioning device in the guest. The current logic makes this requirement advisory, and simply disables the request for IOMMU if one is not found on the host. This makes for a confused user when the device assignment appears to work, but the device in the guest is not functioning (I've seen about a half-dozen reports with this failure mode). Change the logic such that the default requires the IOMMU. Period. If the host does not have an IOMMU, device assignment will fail. This is a user visible change, however I think the current situation is simply broken. And, of course, disabling the IOMMU requirement using the old: -pcidevice host=[addr],dma=none or the newer: -device pci-assign,host=[addr],iommu=0 will do what it always did (not require an IOMMU, and fail to work properly). Cc: Alexander Graf <agraf@suse.de> Cc: Dmitri Seletski <drjoms@gmail.com> Cc: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge remote branch 'upstream/stable-0.12' into stable-0.12Avi Kivity2010-01-178-37/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/stable-0.12: (27 commits) Update version and changelog for release Update SeaBIOS to 0.5.1 Qemu's internal TFTP server breaks lock-step-iness of TFTP osdep.c: Fix accept4 fallback pc: add rombar to compat properties for pc-0.10 and pc-0.11 pci: allow loading roms via fw_cfg. roms: rework rom loading via fw fw_cfg: rom loader tweaks. roms: minor fixes and cleanups. pc: add machine type for 0.12 loader: more ignores for rom intended to be loaded by the bios vnc_refresh: return if vd->timer is NULL QMP: Don't free async event's 'data' Handle TFTP ERROR from client dmg: fix ->open failure virtio-pci: thinko fix pc-bios: Update README (SeaBIOS) vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow remove pending exception on vcpu reset. Fix CPU topology initialization ... Conflicts: hw/pc.c hw/pci.h qemu-options.hx Signed-off-by: Avi Kivity <avi@redhat.com>
| * pc: add rombar to compat properties for pc-0.10 and pc-0.11Gerd Hoffmann2010-01-121-0/+8
| | | | | | | | | | | | | | | | | | So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load method by default. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 20a86364c9e421c4f9ce457251fa8df031cd5078)
| * pci: allow loading roms via fw_cfg.Gerd Hoffmann2010-01-122-0/+16
| | | | | | | | | | | | | | | | | | | | | | This patch adds a pci bus property 'rombar' which specifies whenever the pci rom should be loaded via pci rom bar (default) or via fw_cfg. The later can be used for compatibility with older qemu versions where no pci rom bar is present. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 88169ddf82853ca892ce7bee279579c8a0ac03e5)
| * roms: rework rom loading via fwGerd Hoffmann2010-01-123-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way rom loading via fw_cfg is handled. Instead of having pc_init1() call a function which passed all roms to the firmware config we simply pass a pointer to fw_cfg to the rom loader. Advantage: loading roms via firmware works also for devices which are initialized after pc_init1(), i.e. everyting added via -device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 8832cb805dcb65009b979cd8e17d75ac4b03c7e4)
| * fw_cfg: rom loader tweaks.Gerd Hoffmann2010-01-121-7/+11
| | | | | | | | | | | | | | | | | | | | | | Changes: - make dir argument mandatory, we allways have one anyway (vgaroms or genroms). - check for duplicates, skip loading if found. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit de9352bcaed2452af1d2b06b829748676c691794)
| * roms: minor fixes and cleanups.Gerd Hoffmann2010-01-122-17/+26
| | | | | | | | | | | | | | | | | | | | | | Changes: - Drop extra file argument from rom_add_file(). - Drop fw_dir check in do_info_roms, we allways have a dir name. - code style fixes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit bdb5ee3064d5ae786b0bcb6cf6ff4e3554a72990)