summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-11-16tap: make set_offload a nop after netdev cleanupMichael S. Tsirkin1-1/+5
virtio-net expects set_offload to succeed after peer cleanup. Since we don't have an open fd anymore, make it so. Fixes warning about the failure of offload setting. Reported-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-11-16Add support for async page fault to qemuGleb Natapov4-1/+42
Add save/restore of MSR for migration and cpuid bit. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-11-16tap: clear vhost_net backend on cleanupMichael S. Tsirkin1-0/+1
Frontends calling tap_get_vhost_net get an invalid pointer after the peer backend has been deleted. Jason Wang <jasowang@redhat.com> reports this leading to a crash in ack_features when we remove the vhost-net bakend of a virtio nic. The fix is simply to clear the backend pointer. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-11-16more stdvga cleanups.Gerd Hoffmann10-46/+15
video.x is gone now. It was the only user of the vga bios_offset + bios_size logic. Zap it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-16switch vmware_vga to pci vgabiosGerd Hoffmann1-6/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-16switch stdvga to pci vgabiosGerd Hoffmann1-4/+3
Make stdvga provide the new vgabios binary (with pcibios support) using the PCI option rom bar. Seabios will happily load it from there. The new vga bios will also lookup the framebuffer address in pci config space, so the magic bochs lfb @ 0xe0000000 is not needed any more -> zap it. Without the patch: # dmesg | grep framebuffer vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k # lspci -vs2 00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Physical Slot: 2 Flags: fast devsel Memory at f0000000 (32-bit, prefetchable) [size=8M] Expansion ROM at <unassigned> [disabled] With patch applied: # dmesg | grep framebuffer vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k # lspci -vs2 00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Physical Slot: 2 Flags: fast devsel Memory at f0000000 (32-bit, prefetchable) [size=8M] Expansion ROM at f0800000 [disabled] [size=64K] cheers, Gerd Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-16Add new vgabios binaries to blobs list.Gerd Hoffmann6-2/+3
aliguori: update VGA BIOS Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-11add copyright to spiceaudioGerd Hoffmann1-0/+19
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09spice: add audioGerd Hoffmann6-0/+334
Add support for the spice audio interface. With this patch applied audio can be forwarded over the network from/to the spice client. Both recording and playback is supported. The driver is first in the driver list, but the can_be_default flag is set only in case spice is active. So if you have the spice protocol enabled the spice audio driver is the default one, otherwise whatever comes first after spice in the list. Overriding the default using QEMU_AUDIO_DRV works in any case. [ v2: audio codestyle: add spaces before open parenthesis ] [ v2: add const to silence array ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: malc <av1474@comtv.ru> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09intel-hda: fix codec addressing.Gerd Hoffmann1-4/+5
The HDA bus supports up to 15 codecs, with addresses 0 ... 14. We get that wrong in two places: * When handing out addresses we accept address 15 as valid. * The bitmasks for two registers (WAKEEN and STATESTS) don't have bit 14 set. This patch fixes it. [ v2: codestyle: add braces ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09Revert "intel-hda: fix codec addressing."malc1-4/+4
Misses braces This reverts commit acc086837e49b44f15eff6007bb1726844df7aec.
2010-11-09intel-hda: fix codec addressing.Gerd Hoffmann1-4/+4
The HDA bus supports up to 15 codecs, with addresses 0 ... 14. We get that wrong in two places: * When handing out addresses we accept address 15 as valid. * The bitmasks for two registers (WAKEEN and STATESTS) don't have bit 14 set. This patch fixes it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09intel-hda: add msi supportGerd Hoffmann1-2/+31
This patch adds MSI support to the intel hda audio driver. It is enabled by default, use '-device intel-hda,msi=0' to disable it. [ v2: codestyle: add braces ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09intel-hda: update irq status on WAKEEN changes.Gerd Hoffmann1-0/+6
When the guest updates the WAKEEN register we must re-calculate the IRQ status. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09intel-hda: Honor WAKEEN bits.François Revol1-1/+2
HDA: Honor WAKEEN bits when deciding to raise an interrupt on codec status change. This prevents an interrupt storm with the Haiku HDA driver which does not handle codec status changes in the irq handler. Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09hda-audio: exit cleanupGerd Hoffmann1-0/+24
Add exit callback to the driver. Unregister the sound card properly on exit. [ v2: codestyle: add braces ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-09intel-hda: exit cleanupGerd Hoffmann2-0/+21
Add pci exit callback for the intel-hda device and cleanup properly. Also add an exit callback to the HDA bus implementation and make sure it is called on qdev_free(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-07Fix win32 buildBlue Swirl1-1/+1
Fix a return value change missed by 205ef7961f781496366e0a93a4ec621ad3724bd7. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-11-04scsi-disk: Fix immediate failure of bdrv_aio_*Kevin Wolf1-5/+6
Fix scsi-disk to use the usual completion paths that involve rerror/werror handling instead of directly completing the requests in cases where bdrv_aio_readv/writev returns NULL. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-04virtio-blk: Handle immediate flush failure properlyKevin Wolf1-1/+1
Fix virtio-blk to use the usual completion path that involves werror handling instead of directly completing the request in cases where bdrv_aio_flush returns NULL. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-04ide: Handle immediate bdrv_aio_flush failureKevin Wolf1-3/+9
If bdrv_aio_flush returns NULL, this should be treated as an error. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-04block: avoid a warning on 64 bit hosts with long as int64_tBlue Swirl1-2/+2
When building on a 64 bit host which uses 'long' for int64_t, GCC emits a warning: CC block/blkverify.o /src/qemu/block/blkverify.c: In function `blkverify_verify_readv': /src/qemu/block/blkverify.c:304: warning: long long int format, long unsigned int arg (arg 3) Rework a77cffe7e916f4dd28f2048982ea2e0d98143b11 to avoid the warning. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-04qcow2: Invalidate cache after failed readKevin Wolf2-0/+2
The cache content may be destroyed after a failed read, better not use it any more. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-11-04vpc: Implement bdrv_flushKevin Wolf1-8/+13
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-04scsi-disk: Implement werror for flushesKevin Wolf1-1/+16
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-11-04scsi-disk: Complete failed requests in scsi_disk_emulate_commandKevin Wolf1-11/+10
This pulls the request completion for error cases from the caller to scsi_disk_emulate_command. This should not change semantics, but allows to reuse scsi_handle_write_error() for flushes in the next patch. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-11-04block: Allow bdrv_flush to return errorsKevin Wolf13-25/+45
This changes bdrv_flush to return 0 on success and -errno in case of failure. It's a requirement for implementing proper error handle in users of bdrv_flush. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-11-04scsi-disk: Implement rerror optionKevin Wolf2-37/+69
This implements the rerror option for SCSI disks. It also includes minor changes to the write path where the same code is used that was criticized in the review for the changes to the read path required for rerror support. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-11-03Fold send_all() wrapper unix_write() into one functionJes Sorensen1-6/+2
The current send_all() wrapper for POSIX calls does nothing but call unix_write(). Merge them to simplify the code. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-03Remove obsolete 'f' double parameter typeJes Sorensen1-17/+1
'f' double is no longer used, and we should be using floating point variables to store byte sizes. Remove it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-03Switch migrate_set_speed() to take an 'o' argument rather than a float.Jes Sorensen2-4/+5
Clarify default value of MB in migration speed argument in monitor, if no suffix is specified. This differ from previous default of bytes, but is consistent with the rest of the places where we accept a size argument. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-03Add support for 'o' octet (bytes) format as monitor parameter.Jes Sorensen1-0/+29
Octet format relies on strtosz which supports K/k, M/m, G/g, T/t suffixes and unit support for humans, like 1.3G Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-03Introduce strtosz() library function to convert a string to a byte count.Jes Sorensen3-20/+98
strtosz() returns -1 on error. It now supports human unit formats in eg. 1.0G, with better error handling. The following suffixes are supported: B/b = bytes K/k = KB M/m = MB G/g = GB T/t = TB This patch changes -numa and -m input to use strtosz(). Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-02spice-display: replace private lock with qemu mutex.Gerd Hoffmann2-14/+14
qemu_spice_create_update() must aquire the global qemu mutex to make sure DisplayState doesn't change while we are accessing it. Once this is in place the private lock is pretty pointless as everything it protects is covered by the global qemu mutex now. Drop it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-02spice-core: fix warning when building with spice < 0.6.0Gerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-02spice-core: fix watching for write eventsHans de Goede1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-11-02intel-hda: documentation updateGerd Hoffmann2-0/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-01Fix out of tree buildBlue Swirl1-1/+1
df2943ba3c73ca21dbda063f15fa3e80064af864 broke out of tree build. Fix breakage by adding $(SRC_PATH). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-11-01Merge remote branch 'spice/config.2' into stagingAnthony Liguori3-7/+309
2010-11-01Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori30-291/+2637
2010-11-01hda-audio: Zap tabsmalc1-2/+2
Signed-off-by: malc <av1474@comtv.ru>
2010-11-01Add Intel HD Audio support to qemu.Gerd Hoffmann8-2/+2946
This patch adds three devices to qemu: intel-hda Intel HD Audio Controller, the PCI device. Provides a HDA bus. Emulates ICH6 at the moment. Adding a ICH9 PCIE variant shouldn't be hard. hda-duplex HDA Codec. Attaches to the HDA bus. Supports 16bit stereo, rates 16k -> 96k, playback, recording and volume control (with CONFIG_MIXEMU=y). hda-output HDA Codec without recording support. Subset of the hda-duplex codec. Use this if you don't want your guests access your mic. Usage: add '-device intel-hda -device hda-duplex' to your command line. Tested guests: * Linux works. * Win7 works. * DOS (mpxplay) works. * WinXP doesn't work. [ v2 changes ] * Fixed endianess, big endian hosts work now. * Fixed some emulation bugs. * Added immediate command emulation. * Added vmstate support. * Make it behave like all other sound card drivers: - can be configured via '--audio-card-list=hda' - can be added to a VM using '-soundhw hda' * Code style fixups. * Zapped guest-triggerable asserts. * Handle partial reads/writes of audio data correctly. Cc: malc <av1474@comtv.ru> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-01add VMSTATE_BOOLGerd Hoffmann2-0/+35
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-11-01Remove trailing whitespacemalc1-1/+1
Signed-off-by: malc <av1474@comtv.ru>
2010-10-31sparc32: convert debug printf statements to tracepointsBlue Swirl10-206/+213
Replace debug printf statements with tracepoints. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Remove unncessary includesJes Sorensen1-8/+0
No need to include stdlib.h for BSD as it is included by qemu-common.h, windows.h is handled by sysemu.h and osdep.c no longer needs malloc.h Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Consolidate oom_check() functionsJes Sorensen5-20/+11
This consolidates the duplicated oom_check() functions, as well as splitting them into OS dependant versions to avoid the #ifdef grossness that was present in the old osdep.c version. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Separate qemu_pidfile() into OS specific versionsJes Sorensen3-38/+45
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Do not redefine reserved key-words TRUE/FALSEJes Sorensen1-10/+10
TRUE/FALSE are generally reserved keywords and shouldn't be defined in a driver like this. Rename the macros to SDP_TRUE and SDP_FALSE respectively. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Move qemu_gettimeofday() to OS specific filesJes Sorensen10-47/+47
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>