summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2010-10-30We only support eventfd under POSIX, move qemu_eventfd() to os-posix.cJes Sorensen2-34/+32
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30qemu_pipe() is used only by POSIX code, so move to oslib-posix.cJes Sorensen2-22/+22
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Move osdep socket code to oslib-{posix,win32}.cJes Sorensen3-38/+36
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Move QEMU OS dependant library functions to OS specific filesJes Sorensen5-89/+158
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 included by the various targets, instead of relying on these library functions magically getting included via block-obj-y. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30target-xxx: Use fprintf_function (format checking)Stefan Weil26-67/+54
fprintf_function uses format checking with GCC_FMT_ATTR. Format errors were fixed in * target-i386/helper.c * target-mips/translate.c * target-ppc/translate.c Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30exec: Use fprintf_function for dump_exec_info (format checking)Stefan Weil2-14/+5
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 must be included earlier. Some redundant include statements for standard include files were removed. Fix also two format errors (ptrdiff_t needs %td). Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30tcg: Use fprintf_function (format checking)Stefan Weil2-6/+3
fprintf_function uses format checking with GCC_FMT_ATTR. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Add fprintf_function for function pointers to fprintf-like functionsStefan Weil1-0/+3
This kind of function pointers is used very often in qemu. The new data type uses format checking with GCC_FMT_ATTR and will be used in later patches. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30Mov muldiv64 to qemu-common.h (Thus unbreaking gus)malc3-25/+24
Signed-off-by: malc <av1474@comtv.ru>
2010-10-27Merge branch 'pci' into for_anthonyMichael S. Tsirkin26-277/+2607
2010-10-27pcie: update satus on resetMichael S. Tsirkin1-1/+1
Reset never triggers a new event, so it's enough to update status. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27msi: minor cleanupsMichael S. Tsirkin1-4/+3
Comment fixup (tell what it does not what it does not do), typo fix, whitespace fix. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27msi: simplify range checksMichael S. Tsirkin1-25/+20
config write handlers should be idempotent. So no need for complex range checks: a simple one checking that we are touching the relevant capability will do. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27pci: improve w1c mask handlingMichael S. Tsirkin1-2/+4
- 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 of reset, some leave part of config space alone. We will likely need a sticky bit mask to implement this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27pcie: clean up hot plug notificationMichael S. Tsirkin4-71/+62
Simplify logic for hotplug notification, by tracking state of the logical interrupt condition. We then simply use this variable to make the interrupt decision, according to spec. API is made cleaner as we no longer force users to pass in old slot control value. Includes fixes by Isaku Yamahata. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2010-10-27pcie: simplify range checkMichael S. Tsirkin1-49/+59
Simplify code slighly by reversing the polarity for the range check Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2010-10-27Introduce range.hBlue Swirl3-0/+3
Extract range functions from pci.h. These will be used by later patches by non-PCI devices. Adjust current users. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit bf1b00712375bea65f2254dea8281fa646eebbd5)
2010-10-27qemu-options.def: add to generated header listMichael S. Tsirkin2-9/+5
All files include qemu-options.h which pulls in qemu-options.def from the root directory. Thus generating qemu-options.def from Makefile.objs under the target directory is not effective. Further, people expect .def file to get cleaned with make clean: it does not have state so no reason to defer removing it until distclean. Also add a rule to remove old files that might be around. This fixes the error: ‘QEMU_OPTION_spice’ undeclared (first use in this function) error that some people reported which is really down to an out of date .def file. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27net: properly handle illegal fd/vhostfd from command lineJason Wang1-5/+11
When hanlding fd/vhostfd form command line through net_handle_fd_param(), we need to check mon and return value of strtol() otherwise we could get segmentation fault or invalid fd when user type an illegal fd/vhostfd. This patch is based on the suggestions from Luiz Capitulino <lcapitulino@redhat.com>. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27virtio: sanity-check available indexMichael S. Tsirkin1-0/+11
Checking available index upon load instead of only when vm is running makes is easier to debug failures. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27migration: don't segfault on invalid inputMichael S. Tsirkin1-0/+3
host_from_stream_offset returns NULL on error, return error instead of trying to use that address, to avoid segfault on invalid stream. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-26Merge remote branch 'qmp/for-anthony' into stagingAnthony Liguori4-8/+15
2010-10-26Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori15-212/+264
2010-10-25seabios: Update to 0.6.1Anthony Liguori2-0/+0
- 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. - 2dcd9fa Enhance tools/readserial.py to support reading from a pipe. - 7ce09ae Make tools/transdump.py more resilient to unknown input. - 6039fc5 Update qemu_cfg_read to use "rep insb". - 9a01a9c Only show bootsplash during boot menu. - 5feb83c add write support to virtio-blk - 22f6378 Don't try to talk to APIC on 486 - e2074bf Add ACPI SSDT/DSDT support for CPU hotplug. - eb6dc78 Add additional debug status messages to bootsplash code. - c8e4e88 Allow qemu to use bootsplash code via fwcfg interface. - 597040d Add tools/trandump.py tool for converting hexdump() output. - 48f5f8b Default bootsplash on (for coreboot users). - 8d85eb1 Autodetect video mode based on bootsplash jpeg dimensions. - b2b9d4a Rename "decdata" to "jpeg" in bootsplash - to be consistent with jpeg.c. - bbc4722 Breakup jpeg_decode into parsing and displaying phases. - 2976dd4 Avoid using BSS variables in jpeg.c. - cc9e1bf Add FUNC16() helper macro for converting a 16bit func to a segoff_s. - b4525a0 Handle unaligned sizes in iomemcpy(). - 0e27e19 Cleanup bootsplash vesa signature detection. - cadaf0e Be sure to disable bootsplash on all BIOS boot cases. - 2641186 Add call16_int10 helper to bootsplash.c. - 6dc76f4 Don't do "double buffering" in bootsplash code. - 227dc3e Check that malloc succeeds in bootsplash code. - a576c9c Bootsplash fixes and cleanups. - 9fd4851 Minor - clarify bit logic in mptable.c. - abf31d3 Fix integer truncating bug in calc_future_timer(). - 1d5c333 seabios: pciinit: fix 64bit bar initilization. - ae6924d Minor - introduce GDT_GRANLIMIT macro. - 0f78889 Avoid code addresses >64K in big real mode. - aec19c9 seabios: smm: move out piix4 specific smram logic to dev-i440fx.c - 08328e7 seabios: shadow: make device finding more generic. - 4c67f90 seabios: acpi: clean up of finding pm device. - fe54a53 seabios: acpi: split out piix4 pm logic. - d06afb4 seabios: acpi: move acpi definitions to acpi.h from acpi.c - 2f54bb4 seabios: acpi: move out endian conversion helper function. - 23173ac seabios: pci: introduce helper function to find device from table and initialize it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-10-23qemu-timer: move commonly used timer code to qemu-timer-commonBlue Swirl11-124/+150
Move timer init functions to a new file, qemu-timer-common.c. Make other critical timer functions inlined to preserve performance in qemu-timer.c, also move muldiv64() (used by the inline functions) to qemu-timer.h. Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly. Remove a similar/duplicate definition in qemu-tool.c. Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used there. After this change, tracing can be used also for user code and simpletrace on Win32. Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-23rewrite i386 tests MakefilePaolo Bonzini3-42/+91
1) compute path to i386 compiler from configure. If it is found, run the i386 tests. I use macros so that this approach could be applied for other arches as well. 2) provide an easily extensible way to add tests Most tests fail, but at least "make test" does something meaningful. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-23fix test_pathPaolo Bonzini2-3/+12
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>
2010-10-23make runcom compile on recent distributionsPaolo Bonzini1-7/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-23disable test_enter on i386, it is brokenPaolo Bonzini1-0/+5
Many other tests fail, but this has an infinite loop with both qemu-i386 and native execution (albeit on x86_64), so there is something more going on. I'm not going to debug it now, so just disable the test. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-23unbreak "make" from vpath-built tests directoryPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-23unbreak "make" from tests directoryPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-22mips_fulong2e: fix ram allocationBlue Swirl1-1/+1
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. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-22Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking)Stefan Weil2-3/+2
Replace the remaining format attribute printf by macro GCC_FMT_ATTR which uses gnu_printf (if supported). v2 * Removal of dyngen specific code is now done in a separate patch. * Handle attribute in new ui/spice-display.c, too. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-22Remove special handling of system include files (no longer needed)Stefan Weil4-35/+2
The formerly used dyngen code did not work with system include files like stdio.h. Tests with Linux, OSX and Win32 show that this restriction is no longer needed. So we hopefully can remove that special piece of code. This results in cleaner code and allows better use of the new GCC_FMT_ATTR macro. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-22Merge remote branch 'qemu-kvm/uq/master' into stagingAnthony Liguori1-33/+99
2010-10-22virtio-blk: Respect werror option for flushesKevin Wolf1-1/+7
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. Signed-off-by: Kevin Wolf <kwolf@redhat.com>