add copyright to spiceaudio
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: malc <av1474@comtv.ru>
spice: add audio
Add support for the spice audio interface. With this patch appliedaudio can be forwarded over the network from/to the spice client. Bothrecording and playback is supported.
The driver is first in the driver list, but the can_be_default flag is...
intel-hda: fix codec addressing.
The HDA bus supports up to 15 codecs, with addresses 0 ... 14.We get that wrong in two places:
Revert "intel-hda: fix codec addressing."
Misses braces
This reverts commit acc086837e49b44f15eff6007bb1726844df7aec.
hda-audio: exit cleanup
Add exit callback to the driver. Unregister the sound card properlyon exit.
[ v2: codestyle: add braces ]
intel-hda: Honor WAKEEN bits.
HDA: Honor WAKEEN bits when deciding to raise an interrupt on codecstatus change. This prevents an interrupt storm with the Haiku HDAdriver which does not handle codec status changes in the irq handler.
Signed-off-by: François Revol <revol@free.fr>...
intel-hda: update irq status on WAKEEN changes.
When the guest updates the WAKEEN register wemust re-calculate the IRQ status.
intel-hda: add msi support
This patch adds MSI support to the intel hda audio driver. It isenabled by default, use '-device intel-hda,msi=0' to disable it.
intel-hda: exit cleanup
Add pci exit callback for the intel-hda device and cleanup properly.Also add an exit callback to the HDA bus implementation and make sureit is called on qdev_free().
Fix win32 build
Fix a return value change missed by205ef7961f781496366e0a93a4ec621ad3724bd7.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qcow2: Invalidate cache after failed read
The cache content may be destroyed after a failed read, better not use it anymore.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
block: avoid a warning on 64 bit hosts with long as int64_t
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...
ide: Handle immediate bdrv_aio_flush failure
If bdrv_aio_flush returns NULL, this should be treated as an error.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-blk: Handle immediate flush failure properly
Fix virtio-blk to use the usual completion path that involves werror handlinginstead of directly completing the request in cases where bdrv_aio_flushreturns NULL.
scsi-disk: Fix immediate failure of bdrv_aio_*
Fix scsi-disk to use the usual completion paths that involve rerror/werrorhandling instead of directly completing the requests in cases wherebdrv_aio_readv/writev returns NULL.
scsi-disk: Implement rerror option
This implements the rerror option for SCSI disks.
It also includes minor changes to the write path where the same code is usedthat was criticized in the review for the changes to the read path required forrerror support....
block: Allow bdrv_flush to return errors
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.
scsi-disk: Complete failed requests in scsi_disk_emulate_command
This pulls the request completion for error cases from the caller toscsi_disk_emulate_command. This should not change semantics, but allows toreuse scsi_handle_write_error() for flushes in the next patch....
scsi-disk: Implement werror for flushes
vpc: Implement bdrv_flush
Introduce strtosz() library function to convert a string to a byte count.
strtosz() returns -1 on error. It now supports human unit formats ineg. 1.0G, with better error handling.
The following suffixes are supported:B/b = bytesK/k = KBM/m = MBG/g = GB...
Add support for 'o' octet (bytes) format as monitor parameter.
Octet format relies on strtosz which supports K/k, M/m, G/g, T/tsuffixes 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>
Switch migrate_set_speed() to take an 'o' argument rather than a float.
Clarify default value of MB in migration speed argument in monitor, ifno suffix is specified. This differ from previous default of bytes,but is consistent with the rest of the places where we accept a size...
Remove obsolete 'f' double parameter type
'f' double is no longer used, and we should be using floating pointvariables to store byte sizes. Remove it.
Fold send_all() wrapper unix_write() into one function
The current send_all() wrapper for POSIX calls does nothing but callunix_write(). Merge them to simplify the code.
intel-hda: documentation update
Fix out of tree build
df2943ba3c73ca21dbda063f15fa3e80064af864 broke out of tree build.
Fix breakage by adding $(SRC_PATH).
Merge remote branch 'spice/config.2' into staging
Merge remote branch 'mst/for_anthony' into staging
hda-audio: Zap tabs
Signed-off-by: malc <av1474@comtv.ru>
Add Intel HD Audio support to qemu.
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,...
add VMSTATE_BOOL
Remove trailing whitespace
sparc32: convert debug printf statements to tracepoints
Replace debug printf statements with tracepoints.
Remove unncessary includes
No need to include stdlib.h for BSD as it is included byqemu-common.h, windows.h is handled by sysemu.h and osdep.c no longerneeds malloc.h
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Separate qemu_pidfile() into OS specific versions
Consolidate oom_check() functions
This consolidates the duplicated oom_check() functions, as well assplitting them into OS dependant versions to avoid the #ifdefgrossness that was present in the old osdep.c version.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
Move qemu_gettimeofday() to OS specific files
Do not redefine reserved key-words TRUE/FALSE
TRUE/FALSE are generally reserved keywords and shouldn't be defined ina driver like this. Rename the macros to SDP_TRUE and SDP_FALSErespectively.
qemu_pipe() is used only by POSIX code, so move to oslib-posix.c
We only support eventfd under POSIX, move qemu_eventfd() to os-posix.c
Move QEMU OS dependant library functions to OS specific files
This moves library functions used by both QEMU and the QEMU tools,such as qemu-img, qemu-nbd etc. from osdep.c to oslib-{posix,win32}.c
In addition it introduces oslib-obj.y to the Makefile set to be...
Move osdep socket code to oslib-{posix,win32}.c
exec: Use fprintf_function for dump_exec_info (format checking)
fprintf_function uses format checking with GCC_FMT_ATTR.
It is declared in qemu-common.h and used in cpu-all.h(which is included from cpu.h), so qemu-common.h mustbe included earlier. Some redundant include statements...
target-xxx: Use fprintf_function (format checking)
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
tcg: Use fprintf_function (format checking)
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add fprintf_function for function pointers to fprintf-like functions
This kind of function pointers is used very often in qemu.
The new data type uses format checking with GCC_FMT_ATTRand will be used in later patches.
Cc: Blue Swirl <blauwirbel@gmail.com>...
Mov muldiv64 to qemu-common.h (Thus unbreaking gus)
Merge branch 'pci' into for_anthony
Introduce range.h
Extract range functions from pci.h. These will be used by later patchesby non-PCI devices. Adjust current users.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>(cherry picked from commit bf1b00712375bea65f2254dea8281fa646eebbd5)
pcie: simplify range check
Simplify code slighly by reversing the polarityfor the range check
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
pcie: clean up hot plug notification
Simplify logic for hotplug notification, by tracking state of thelogical interrupt condition. We then simply use this variable to makethe interrupt decision, according to spec.
API is made cleaner as we no longer force users to pass in...
pci: improve w1c mask handling
- save/restore must not check w1c bits since they are in fact guest controlled- clear w1c bits on reset
Note: for express there are different kinds ofreset, some leave part of config space alone.We will likely need a sticky bit mask to implement this....
msi: simplify range checks
config write handlers should be idempotent.So no need for complex range checks: a simpleone checking that we are touching the relevant capabilitywill do.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
msi: minor cleanups
Comment fixup (tell what it does not what it does not do),typo fix, whitespace fix.
pcie: update satus on reset
Reset never triggers a new event, so it's enough toupdate status.
migration: don't segfault on invalid input
host_from_stream_offset returns NULL on error,return error instead of trying to use that address,to avoid segfault on invalid stream.
virtio: sanity-check available index
Checking available index upon load instead ofonly when vm is running makes is easier todebug failures.
net: properly handle illegal fd/vhostfd from command line
When hanlding fd/vhostfd form command line through net_handle_fd_param(),we need to check mon and return value of strtol() otherwise we couldget segmentation fault or invalid fd when user type an illegal fd/vhostfd....
qemu-options.def: add to generated header list
All files include qemu-options.h which pulls in qemu-options.def fromthe root directory. Thus generating qemu-options.def from Makefile.objsunder the target directory is not effective.
Further, people expect .def file to get cleaned with make clean:...
Merge remote branch 'qmp/for-anthony' into staging
Merge remote branch 'kwolf/for-anthony' into staging
seabios: Update to 0.6.1
- 0ff9051 Update version to 0.6.1 - 9c000e6 Support Samsung SE-S084 USB DVD drive (and probably many others) - eebe949 pciinit: remove unused variable, old_addr, in pci_set_io_region_addr(). - 06644f4 Minor - indentation change to jpeg.c....
qemu-timer: move commonly used timer code to qemu-timer-common
Move timer init functions to a new file, qemu-timer-common.c. Make othercritical timer functions inlined to preserve performance inqemu-timer.c, also move muldiv64() (used by the inline functions)...
rewrite i386 tests Makefile
1) compute path to i386 compiler from configure. If it is found, runthe i386 tests. I use macros so that this approach could be appliedfor other arches as well.
2) provide an easily extensible way to add tests
Most tests fail, but at least "make test" does something meaningful....
fix test_path
path.c grew quite a few new dependencies (mostly via cutils.c),include them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
make runcom compile on recent distributions
disable test_enter on i386, it is broken
Many other tests fail, but this has an infinite loop with bothqemu-i386 and native execution (albeit on x86_64), so there issomething more going on. I'm not going to debug it now, so justdisable the test.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
unbreak "make" from vpath-built tests directory
unbreak "make" from tests directory
mips_fulong2e: fix ram allocation
RAM registration used incorrect offset.
Fix by using the offset obtained previously for this purpose.
Spotted by GCC 4.6.0 20100925 warning, which is also avoided.
Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking)
Replace the remaining format attribute printf by macroGCC_FMT_ATTR which uses gnu_printf (if supported).
Remove special handling of system include files (no longer needed)
The formerly used dyngen code did not work withsystem include files like stdio.h.
Tests with Linux, OSX and Win32 show that thisrestriction is no longer needed.
So we hopefully can remove that special piece of code....
Merge remote branch 'qemu-kvm/uq/master' into staging
qcow2: Support exact L1 table growth
The L1 table grow operation includes a size calculation that bumps upthe new L1 table size in order to anticipate the size needs of vmstatedata. This helps reduce the number of times that the L1 table has to begrown when vmstate data is appended....
qcow2: Simplify image creation
Instead of doing lots of magic for setting up initial refcount blocks and stuffcreate a minimal (inconsistent) image, open it and initialize the rest withregular qcow2 functions.
This is a complete rewrite of the image creation function. The old...
qcow2: Remove old image creation function
They have been #ifdef'd out by the previous patch.
ide: set WCACHE supported in IDENTIFY data
ATA does not only have the WCACHE enabled bit in identify word 85, but alsoa WCACHE supported bit in word 82. While the Linux kernel is fine with thelatter at least hdparm also needs the former before correctly displaying...
Copy snapshots out of QCOW2 disk
In order to backup snapshots, created from QCOW2 iamge, we want to copy snapshots out of QCOW2 disk to a seperate storage.The following patch adds a new option in "qemu-img": qemu-img convert -f qcow2 -O qcow2 -s snapshot_name src_img bck_img....
qemu-io: New command map
The new map command in qemu-io lists all allocated/unallocated areas in animage file.
block: Use GCC_FMT_ATTR and fix a format error
Adding the gcc format attribute detects a format bugwhich is fixed here.
v2:Don't use type cast. BDRV_SECTOR_SIZE is unsigned long long,so %lld should be the correct format specifier.
qemu-img: Fix qemu-img convert -obacking_file
The old -B option caused a backing file to be used for the converted image andto avoid copying clusters from the old backing file. When replaced with-obacking_file, qemu-img convert does assign the backing file to the new image,...
ide: Factor ide_flush_cache out
The next patch reuses this code, so put it in its own function.
ide: Handle flush failure
Instead of always assuming success for bdrv_aio_flush, actually do somethingwith the error. This respects the werror option and accordingly ignores theerror, reports it to the guest or stops the VM and retries after cont.
Ignoring the error is trivial, obviously. For stopping the VM and retrying...
virtio-blk: Respect werror option for flushes
The werror option now affects not only write requests, but also flush requests.Previously, it was not possible to stop a VM on a failed flush.
monitor: Ignore "." and ".." when completing file name.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Trivial fix for QMP/qmp-events.txt
Fix example of STOP event that was just copy-and-pasted.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Silence compiler warning in json test case
This avoids
error: zero-length gnu_printf format string
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Fix test suite build with tracing enabled
qemu_malloc instrumentations require linking against the trace objects.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
curses: Fix control-{@[\]^_} and ESC
control-{@[\]^_} shouldn't get the 'a' - 'A' offset for correcttranslation. ESC is better simulated as escape key.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>Signed-off-by: Andrew Zaborowski <balrogg@gmail.com>
kvm: save/restore x86-64 MSRs on x86-64 kernels
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm: writeback SMP TSCs on migration only
commit 6389c45441269baa2873e6feafebd17105ddeaf6Author: Jan Kiszka <jan.kiszka@siemens.com>Date: Mon Mar 1 18:17:26 2010 +0100
qemu-kvm: Cleanup/fix TSC and PV clock writeback
kvm: factor out kvm_has_msr_star
And add kvm_has_msr_hsave_pa(), to avoid warnings on olderkernels without support.
kvm: add save/restore of MSR_VM_HSAVE_PA
commit 2bba4446746add456ceeb0e8359a43032a2ea333Author: Alexander Graf <agraf@suse.de>Date: Thu Dec 18 15:38:32 2008 +0100
Enable nested SVM support in userspace
Fix build on !KVM_CAP_MCE
This patch removes following warnings:
target-i386/kvm.c: In function 'kvm_put_msrs':target-i386/kvm.c:782: error: unused variable 'i'target-i386/kvm.c: In function 'kvm_get_msrs':target-i386/kvm.c:1083: error: label at end of compound statement...
x86, mce: broadcast mce depending on the cpu version
There is no reason why SRAO event received by the main threadis the only one that being broadcasted.
According to the x86 ASDM vol.3A 15.10.4.1,MCE signal is broadcast on processor version 06H_EH or later....
x86, mce: ignore SRAO only when MCG_SER_P is available
And restruct this block to call kvm_mce_in_exception() only when it isrequired.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Use defines instead of numbers for pci hotplug sts bit
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix pci hotplug to generate level triggered interrupt.
SCI is level triggered. pci hotplug should behave appropriately.