History | View | Annotate | Download (11.2 kB)
Remove unneeded setjmp.h (fix compilation on Debian "lenny")
Some versions of png.h cannot be included after setjmp.h,even when PNG_SKIP_SETJMP_CHECK was defined.
setjmp.h was included from qemu-common.h and is not needed there.Removing the include statement fixes compilation of ui/vnc-enc-tight.c...
w32: Remove redundant definitions of PRI*64
The PRI*64 macros are defined in MinGW's inttypes.h since 2002,so they are not needed in qemu-common.h (which includes inttypes.h).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cocoa: Provide central qemu_main() prototype
This fixes a missing prototype warning in vl.c and obsoletesthe prototype in cocoa.m. Adjust callers in cocoa.m to supplythird argument, which is currently only used on Linux/ppc.
The prototype is designed so that it could be shared with SDL...
Fix compilation warning due to missing header for sigaction
Fix the following warning by including signal.h directly in qemu-common.h----8<----iohandler.c: In function ‘qemu_init_child_watch’:iohandler.c:172: warning: implicit declaration of function ‘sigaction’...
Add documentation for qemu_progress_{init,print}()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
w32: Fix missing declaration of ffs()
target-ppc/cpu.h now needs ffs(), too, so ffs() must be declaredbefore this file is included.
Moving the declaration from qemu-common.h to qemu-os-win32.h(which is included in qemu-common.h early) fixes the compiler...
Move generic or OS function declarations to qemu-common.h
Move generic or OS related function declarations and macroTFR to qemu-common.h.
Move win32 include directives to qemu-os-win32.h. While moving,also add #include <winsock2.h> to fix a recent mingw32...
enable vm_clock to "warp" in the iothread+icount case
The previous patch however is not enough, because if the virtual CPUgoes to sleep waiting for a future timer interrupt to wake it up, qemudeadlocks. The timer interrupt never comes because time is driven by...
qemu-img: Initial progress printing support
This adds the basic infrastructure for supporting progress outputon the command line, as well as progress support for qemu-img commands'rebase' and 'convert'.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
add a service to reap zombies, use it in SLIRP
SLIRP -smb support wants to fork a process and forget about reaping it.To please it, add a generic service to register a process id and letQEMU reap it. In the future it could be enhanced to pass a status,...
extract I/O handler lists to iohandler.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
x86: Refine error reporting of MCE injection services
As this service is used by the human monitor, make sure that errors getreported to the right channel, and also raise the verbosity.
This requires to move Monitor typedef in qemu-common.h to resolve the...
Refactor thread retrieval and check
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving thecurrent thread, the former is checking for equality (using CPUState). Wealso have qemu_thread_equal which is only used like qemu_cpu_self.
This refactors the interfaces, creating qemu_cpu_is_self and...
WIN32: Add missing include for 'struct timeval', used in vnc.h
Signed-off-by: Herv Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge remote branch 'kwolf/for-anthony' into staging
Introduce VCPU self-signaling service
Introduce qemu_cpu_kick_self to send SIG_IPI to the calling VCPUcontext. First user will be kvm.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
QCOW2: bug fix - read base image beyond its size
This patch fixes the following bug in QCOW2. For a QCOW2 image that is largerthan its base image, when handling a read request straddling over the end of thebase image, the QCOW2 driver attempts to read beyond the end of the base image...
blockdev: Move BlockInterfaceType from qemu-common.h to blockdev.h
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Add documentation for STRTOSZ_DEFSUFFIX_ macros
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Acked-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Make strtosz() return int64_t instead of ssize_t
strtosz() needs to return a 64 bit type even on 32 bitarchitectures. Otherwise qemu-img will fail to create diskimages >= 2GB
Delete useless 'extern' qualifiers for functions
'extern' qualifier is useless for function declarations. Deletethem.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu
Introduce strtosz_suffix()
This introduces strtosz_suffix() which allows the caller to specify adefault suffix in case the non default of MB is wanted.
strtosz() is kept as a wrapper for strtosz_suffix() which keeps it'scurrent default of MB.
vnc: support password expire
This patch adds support for expiring passwords to vnc. It adds a newvnc_display_pw_expire() function which specifies the time when thepassword will expire.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pcie/aer: helper functions for pcie aer capability
This patch implements helper functions for pcie aer capabilitywhich will be used later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
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...
Merge remote branch 'mst/for_anthony' into staging
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
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>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)
Signed-off-by: malc <av1474@comtv.ru>
Merge branch 'pci' into for_anthony
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)...
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....
pcie port: define struct PCIEPort/PCIESlot and helper functions
define struct PCIEPort which represents common partof pci express port.(root, upstream and downstream.)add a helper function for pcie port which can be used commonly byroot/upstream/downstream port....
pcie: helper functions for pcie capability and extended capability
This patch implements helper functions for pci express capabilityand pci express extended capability allocation.NOTE: presence detection depends on pci_qdev_init() change.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking)
Since version 4.4.x, gcc supports additional format attributes. attribute ((format (gnu_printf, 1, 2)))should be used instead of attribute ((format (printf, 1, 2))...
Move macros GCC_ATTR and GCC_FMT_ATTR to common header file
By moving the definition of GCC_ATTR and GCC_FMT_ATTRfrom audio_int.h to qemu-common.h these macros arenow generally available for further patches which addthe gcc format attribute.
Newer gcc versions support format gnu_printf which is...
cutils: qemu_iovec_copy and qemu_iovec_memset
This adds two functions that work on QEMUIOVectors and will be used by the nextqcow2 patches.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
pci_bridge: introduce pci bridge library.
introduce pci bridge library.convert apb bridge and dec p2p bridge to use new pci bridge library.save/restore is supported as a side effect.This is also preparation for pci express root/upstream/downstream port....
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
apic: qdev conversion cleanup
Make APICState completely private to apic.c by using DeviceStatein external APIs.
Move apic_init() to pc.c.
cow: stop using mmap
We don't have an equivalent to mmap in the qemu block API, so read andwrite the bitmap directly. At least in the dumb implementation addedin this patch this is a lot less efficient, but it means cow can alsowork on windows, and over nbd or curl. And it fixes qemu-iotests testcase...
Move stdbool.h
Move inclusion of stdbool.h to common header files, instead of includingin an ad-hoc manner.
Signed-off-by: Paul Brook <paul@codesourcery.com>
port qemu-kvm's on_vcpu code
run_on_cpu allows to execute work on a given CPUState context.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
notifier: event notifier implementation
event notifiers are slightly generalized eventfd descriptors. Currentimplementation depends on eventfd because vhost is the only user, andvhost depends on eventfd anyway, but a stub is provided for non-eventfdcase....
virtio: move typedef to qemu-common
make it possible to use type without header include,simplifying header dependencies.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can accessthem, adjust users.
Move CPU specific code to cpus.c.
Move cpu_exec_init_all() declaration to qemu-common.h
Let cpu_exec_init_all() be called from non-CPU code.
rename IOCanRWHandler to IOCanReadHandler
It was always only used for reads
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
split out qemu-timer.c
Merge remote branch 'qemu-kvm/uq/master' into staging
get rid of hostregs_helper.h
Since b567b38 (target-arm: remove T0 and T1, 2009-10-16) the only globalregister that is used is AREG0, so the complexity of hostregs_helper.his unused. Use regular assignments and a compiler optimization barrier.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
use eventfd for iothread
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
pci: move pcibus_t to qemu-common
move pcibus_t to qemu-common.h to simplify header dependencies.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
block: avoid creating too large iovecs in multiwrite_merge
If we go over the maximum number of iovecs support by syscall we getback EINVAL from the kernel which translate to I/O errors for the guest.
Add a MAX_IOV defintion for platforms that don't have it. For now we use...
Introduce qemu_write_full()
A variant of write(2) which handles partial write.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
force to test result for qemu_write_full()
Fix QEMU_WARN_UNUSED_RESULT
Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it isconditional 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...
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on filedescriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: move typedef, PCIHostState, PCIExpressHost to qemu-common.h.
This patch moves two typedefs, PCIHostState and PCIExpressHost toqemu-common.h for consistency as PCIBus and PCIDevice are typedefedin qemu-common.h.
BCD cleanup
Combine multiple BCD implementations.
Split out bottom halves
Instead of putting more and more stuff into vl.c, let's have the genericfunctions that deal with asynchronous callbacks in their own file.
Introduce contexts for asynchronous callbacks
Add the possibility to use AIO and BHs without allowing foreign callbacks to berun. Basically, you put your own AIOs and BHs in a separate context. Fordetails see the comments in the source.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
net: add macaddr type.
Add new type for mac addresses.
Add function which sets the qemu default mac address if it finds the macaddress uninitialized (i.e. all zeros).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Suppress warnings about 'warn_unused_result' attribute directive
net: refactor packet queueing code
The packet queue code is fairly standalone, has some complex details andeasily reusable. It makes sense to split it out on its own. This patchdoesn't contain any functional changes.
Patchworks-ID: 35511Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
unlock iothread mutex before running kvm ioctl
Without this, kvm will hold the mutex while it issues its run ioctl,and never be able to step out of it, causing a deadlock.
Patchworks-ID: 35359Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: use fdatasync instead of fsync if possible
If we are flushing the caches for our image files we only care about thedata (including the metadata required for accessing it) but not thingslike timestamp updates. So try to use fdatasync instead of fsync to...
Add bdrv_aio_multiwrite
One performance problem of qcow2 during the initial image growth aresequential writes that are not cluster aligned. In this case, when a firstrequests requires to allocate a new cluster but writes only to the firstcouple of sectors in that cluster, the rest of the cluster is zeroed - just...
user: compile path.c only once
Also merge bsd-user/path.c and linux-user/path.c.
Define ENOTSUP anywhere it isn't defined
I confused ENOTSUP with ENOTSUPP. Juan's original patch was correct.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
define ENOTSUP the same that the other errors
aliguori: ENOTSUP is not 4096 universally, only on OpenBSD
define MAP_ANONYMOUS if it is not defined in qemu-common.h
rename HAVE_IOVEC to CONFIG_IOVEC
Revert "support colon in filenames"
This reverts commit 707c0dbc97cddfe8d2441b8259c6c526d99f2dd8.
Fix missing strnlen problems
Fix missing strnlen (a GNU extension) problems by using qemu_strnlenused for user emulators also for system emulators.
support colon in filenames
Problem: It is impossible to feed filenames with the character colon becauseqemu interprets such names as a protocol. For example filename scsi:0, isinterpreted as a protocol by name "scsi".
This patch allows user to espace colon characters. For example the above...
SSP bus framework
Basic qdev infrastructure.
Constructor support
Allow devices/drivers to register themselves via constructors.Destructors are not needed (can be registered from a constructor)and "priority" has been renamed and changed to an enum for clarity.
Signed-off-by: Paul Brook <paul@codesourcery.com>...
Include assert.h from qemu-common.h
Include assert.h from qemu-common.h and remove other direct uses.cpu-all.h still need to include it because of the dyngen-exec.h hacks
Follow coding conventions
Remove explicit struct qualifiers and rename structure types.
qemu: introduce qemu_cpu_kick (Marcelo Tosatti)
To notify cpu of pending interrupt.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7243 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: create helper for event notification (Marcelo Tosatti)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7236 c046a42c-6fe2-441c-8c8c-71466251a162
add qemu_iovec_init_external (Christoph Hellwig)
Allow to initialize a QEMUIOVector from an externally allocated iovec.qiov->nalloc is initialized to 1 to indicate external storage for qiov>iovand all functions dealing with memory management assert on the iovec beeing...
DisplayAllocator interface (Stefano Stabellini)
Hi all,this patch adds a DisplayAllocator interface that allows displayfrontends (sdl in particular) to provide a preallocated display bufferfor the graphical backend to use.
Whenever a graphical backend cannot use...
Fix windows build and clean up use of <windows.h>
We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values solet's do it in OS_CFLAGS.
Then, we can pepper in windows.h includes where using #includes that require it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
Add qemu_iovec_reset() (Avi Kivity)
Add a helper to zero out an existing iovec. Removes the need to deallocateand reallocate it.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6523 c046a42c-6fe2-441c-8c8c-71466251a162
Replace noreturn with QEMU_NORETURN
Thanks to Robert Riebisch for analysis [1]
[1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162
qemu iovec: keep track of total size, allow partial copies (Gerd Hoffman)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6448 c046a42c-6fe2-441c-8c8c-71466251a162
I/O vector helpers (Avi Kivity)
In general, it is not possible to predict the size of of an I/O vector sincea contiguous guest region may map to a disconiguous host region. Add somehelpers to manage I/O vector growth.
Signed-off-by: Avi Kivity <avi@redhat.com>...
DisplayState interface change (Stefano Stabellini)
This patch changes the DisplayState interface adding support formultiple frontends at the same time (sdl and vnc) and implements mostof the benefit of the shared_buf patch without the added complexity....
Fix Windows build (Hervé Poussineau)
r6303 broke Windows build, where "noreturn" is a keyword used with __declspec.Attached patch fixes Windows build, by moving windows.h header inclusion before Qemu noreturn define.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
Add noreturn function attribute
Introduce noreturn attribute and attach it to cpu_loop_exit as well asinterrupt/exception helpers for i386. This avoids a bunch of gcc4warnings.
[ Note that this patch comes with a workaround to include qemu-common.heven in cases where is currently causes conflicts with dyngen-exec.h....
Rename fls to qemu_fls
Fix compiler warning on OSX, reported by Andreas Faerber.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5982 c046a42c-6fe2-441c-8c8c-71466251a162
The configure test for struct iovec #includes <sys/uio.h> but qemu-common.h did not.
This fixes compilation of hw/virtio.h on Mac OS X.
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5894 c046a42c-6fe2-441c-8c8c-71466251a162