Makefile: Fix check dependency breakage
Commit b152aa84d52882bb1846485a89baf13aa07c86bc broke the unit-testsbuild, fix it.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
optionrom: fix bugs in signrom.sh
signrom.sh has multiple bugs:
- the last byte is considered when calculating the existing checksum, but not when computing the correction- apprently the 'expr' expression overflows and produces incorrect results with...
pc: disable the BOCHS BIOS panic port
We have an OS which writes to port 0x400 when probing for special hardware.This causes an exit of the VM. With SeaBIOS this port isn't used anyway.
Signed-off-by: Alexander Graf <agraf@suse.de>Reviewed-By: Paolo Bonzini <pbonzini@redhat.com>...
slirp: Remove unused code for bad sprintf
Neither DECLARE_SPRINTF nor BAD_SPRINTF are needed for QEMU.
QEMU won't support systems with missing or bad declarationsfor sprintf. The unused code was detected while looking forfunctions with missing format checking. Instead of adding...
trace: Use fprintf_function (format checking)
fprintf_function adds format checking with GCC_FMT_ATTR.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: add 0.13 pc machine type
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtfs: enable MSI-X
This patch enables MSI-X for virtfs-9p-pci. It also adds acompat property to pc-0.13 which turns it of there to staycompatible to 0.13-stable.
trace: Trace vm_start()/vm_stop()
VM state change notifications are invoked from vm_start()/vm_stop().Trace these state changes so we can reason about the state of the VMfrom trace output.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Type-safe ioport callbacks
The current ioport callbacks are not type-safe, in that they accept an "opaque" pointer as an argument whose type must match the argument to the registrationfunction; this is not checked by the compiler.
This patch adds an alternative that is type-safe. Instead of an opaque...
piix4 acpi: convert io BAR to type-safe ioport callbacks
Acked-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pcnet: Do not receive external frames in loopback mode
While not explicitly stated in the spec, it was observed on real systemsthat enabling loopback testing on the pcnet controller disablesreception of external frames. And some legacy software relies on it, so...
Revert "Add support for generating a systemtap tapset static probes"
This reverts commit 2834c3e0140c3b0ed4422909dfa0607b7213d95d.
Conflicts:
Makefile.target
Revert "Add a DTrace tracing backend targetted for SystemTAP compatability"
This reverts commit 4addb1127f6327c7ebcbd150a6b589e7677adc92.
Add a DTrace tracing backend targetted for SystemTAP compatability
This introduces a new tracing backend that targets the SystemTAPimplementation of DTrace userspace tracing. The core functionalityshould be applicable and standard across any DTrace implementation...
Add support for generating a systemtap tapset static probes
This introduces generation of a qemu.stp/qemu-system-XXX.stpfiles which provides tapsets with friendly names for staticprobes & their arguments. Instead of
probe process("qemu").mark("qemu_malloc") {...
block: fix shift in dirty bitmap calculation
Otherwise upper 32 bits of bitmap entries are not correctly calculated.
Reviewed-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: set sector dirty on AIO write completion
Sectors are marked dirty in the bitmap on AIO submission. This is wrongsince data has not reached storage.
Set a given sector as dirty in the dirty bitmap on AIO completion, so thatreading a sector marked as dirty is guaranteed to return uptodate data....
block migration: do not submit multiple AIOs for same sector
Block migration can submit multiple AIO reads for the same sector/chunk, butcompletion of such reads can happen out of order:
migration guest- get_dirty(N)- aio_read(N)- clear_dirty(N)...
audio: Only use audio timer when necessary
Originally proposed by Gerd Hoffmann.
Signed-off-by: malc <av1474@comtv.ru>Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Out off array access in usb-net
Properly check array bounds before accessing array element.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add missing braces
This patch adds missing braces around if/else statements that callmacros which are likely to result in errors if the macro ischanged. It also makes the code comply better with CODING_STYLE.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
usb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS
This allows us to recreate the sysfspath used during scanning later(which will be used in a later patch in this series).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-linux: introduce a usb_linux_get_configuration function
The next patch in this series introduces multiple ways to get theconfiguration dependent upon usb_fs_type, it is cleaner to put thisinto its own function.
usb-linux: Get the active configuration from sysfs rather then asking the dev
Some devices seem to choke on receiving a USB_REQ_GET_CONFIGURATION ctrl msg(witnessed with a digital picture frame usb id 1908:1320).When usb_fs_type == USB_FS_SYS, the active configuration can be read directly...
Delete IOHandlers after potentially running them
Since commit 4bed9837309e58d208183f81d8344996744292cf an .fd_read()handler that deletes its IOHandler is exposed to .fd_write() beingcalled on the deleted IOHandler.
This patch fixes deletion so that .fd_read() and .fd_write() are never...
Fix compilation failure with simple trace when srcdir==objdir
Fix a makefile error that meant that qemu would not compile ifthe source and object directories were the same.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: e820 qemu_cfg tables need to be packed
We can't let the compiler define the alignment for qemu_cfg data.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Fix e820 fw_cfg for big endian
Merge remote branch 'spice/bugfix.2' into staging
apic: Don't iterate past last used apic
local_apics are allocated sequentially and never removed, sowe can stop any iterations that go to MAX_APICS as soon as wehit the first NULL. Looking at a small guest running a virtio-networkload with oprofile, this drops apic_get_delivery_bitmask()...
multiboot: Prevent loading of x86_64 images
A via -kernel supplied x86_64 ELF image is being started in 32bit mode.Detect and exit if a 64bit image has been supplied.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Acked-by: Alexander Graf <agraf@suse.de>...
e1000: Fix TCP checksum overflow with TSO
When adding the length to the pseudo header, we're not properlyaccounting for overflow.
From: Mark Wu <dwu@redhat.com>Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
PCI: Bus number from the bridge, not the device
pcibus_dev_print() was erroneously retrieving the device busnumber from the secondary bus number offset of the deviceinstead of the bridge above the device. This ends of landingin the 2nd byte of the 3rd BAR for devices, which thankfully...
pci: allow hotplug removal of cold-plugged devices
This patch fixes hot unplug of cold plugged devices(those present at system start), which got broken by5beb8ad503c88a76f2b8106c3b74b4ce485a60e1 .
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
switch stdvga to pci vgabios
Make stdvga provide the new vgabios binary (with pcibios support)using the PCI option rom bar. Seabios will happily load it fromthere. The new vga bios will also lookup the framebuffer addressin pci config space, so the magic bochs lfb @ 0xe0000000 is not...
switch vmware_vga to pci vgabios
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
more stdvga cleanups.
video.x is gone now. It was the only user of thevga bios_offset + bios_size logic. Zap it.
tap: clear vhost_net backend on cleanup
Frontends calling tap_get_vhost_net get an invalid pointer after thepeer backend has been deleted. Jason Wang <jasowang@redhat.com> reportsthis leading to a crash in ack_features when we remove the vhost-netbakend of a virtio nic....
Add support for async page fault to qemu
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>
tap: make set_offload a nop after netdev cleanup
virtio-net expects set_offload to succeed afterpeer 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>...
Add new vgabios binaries to blobs list.
aliguori: update VGA BIOS
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.
spice-display: replace private lock with qemu mutex.
qemu_spice_create_update() must aquire the global qemu mutex tomake sure DisplayState doesn't change while we are accessing it.
Once this is in place the private lock is pretty pointless aseverything it protects is covered by the global qemu mutex now....
spice-core: fix warning when building with spice < 0.6.0
spice-core: fix watching for write events
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.
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
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.