History | View | Annotate | Download (7.6 kB)
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.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
BCD cleanup
Combine multiple BCD implementations.
Signed-off-by: Paul Brook <paul@codesourcery.com>
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
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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
Make struct iovec universally available
Vectored IO APIs will require some sort of vector argument. It makes sense touse struct iovec and just define it globally for Windows.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5889 c046a42c-6fe2-441c-8c8c-71466251a162
Introduce fls() helper
This is needed for virtio. The implementation is originally fromMarcelo Tosatti.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5868 c046a42c-6fe2-441c-8c8c-71466251a162
Attached patch fixes a series of this warningwhen compiling on NetBSD:
warning: array subscript has type 'char'
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162
Include <strings.h> for ffs().
ffs() is in <strings.h> although bsd compatible systems have it in<string.h> already. ffs() is used in omap1.c, omap2.c, omap_i2c.c,bt-sdp.c. These uses can be replaced with clz32() but ffs is moreavailable. Problem was spotted by malc....
sockets: helper functions for qemu (Gerd Hoffman)
This patch creates a new source file qemu-sockets.c with a bunch ofhelper functions to create listening and connected sockets.
New features of this code are (a) support for searching for a freeport in a given range and (b) support for IPv6....
Add qemu_strndup: qemu_strdup with length limit.
Also optimise qemu_strdup by using memcpy - using pstrcpy is usuallysuboptimal.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
Revert r5532, r5536 and a piece of r5531.
The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't.I'll try to restore building on non-gnu OSes in a later commit.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162
Clarify qemu_bh_schedule_idle() usage
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5576 c046a42c-6fe2-441c-8c8c-71466251a162
Make bottom halves more robust
Bottom halves are supposed to not complete until the next iteration of the mainloop. This is very important to ensure that guests can not cause stackoverflows in the block driver code. Right now, if you attempt to schedule a...
Replace uses of strndup (a GNU extension) with Qemu pstrdup
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532 c046a42c-6fe2-441c-8c8c-71466251a162
Fix IO performance regression in sparc
Replace signalfd with signal handler/pipe. There is no way to interruptthe CPU execution loop when a file descriptor becomes readable. Thisresults in a large performance regression in sparc emulation duringbootup....
Add a "null" bluetooth HCI and a header file for bluetooth.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5342 c046a42c-6fe2-441c-8c8c-71466251a162
Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
Implement resolution switching in common console code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4812 c046a42c-6fe2-441c-8c8c-71466251a162
Move CPU save/load registration to common code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4808 c046a42c-6fe2-441c-8c8c-71466251a162
Remove osdep.c/qemu-img code duplication
(Kevin Wolf)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4191 c046a42c-6fe2-441c-8c8c-71466251a162
Unify RTCs that use host time, fix M48t59 alarm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3984 c046a42c-6fe2-441c-8c8c-71466251a162
Use WIN32_LEAN_AND_MEAN, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3832 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid duplicated definitions: move common definitions from exec-all.h and qemu-common.h to osdep.h.Include this header in translate-op.c.Make sure it's included first in darwin-user/qemu.h.To avoid discarded inlining bug, define inline as always_inline and...
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
Split block API from vl.h.Remove QEMU_TOOL. Replace with QEMU_IMG and NEED_CPU_H.Avoid linking qemu-img against whole system emulatior.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3578 c046a42c-6fe2-441c-8c8c-71466251a162