History | View | Annotate | Download (13.3 kB)
Merge remote-tracking branch 'kraxel/pixman.v3' into staging
Merge remote-tracking branch 'bonzini/threadpool' into staging
console: remove DisplayAllocator
Causes [temporary] preformance regression with 24bpp vga modes @ sdl.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: s/TextConsole/QemuConsole/
cpus: Pass CPUState to qemu_cpu_kick()
CPUArchState is no longer needed there.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to qemu_cpu_is_self()
Change return type to bool, move to include/qemu/cpu.h andadd documentation.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Igor Mammedov <imammedo@redhat.com>[AF: Updated new caller qemu_in_vcpu_thread()]
aio: clean up now-unused functions
Some cleanups can now be made, now that the main loop does not anymore needhooks into the bottom half code.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
aio: introduce AioContext, move bottom halves there
Start introducing AioContext, which will let us remove globals fromaio.c/async.c, and introduce multiple I/O threads.
The bottom half functions now take an additional AioContext argument.A bottom half is created with a specific AioContext that remains the...
fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-sockets: Fix compiler warning (regression for MinGW)
setsockopt needs a type cast for MinGW. That type cast is missing ina recent commit which results in a compiler warning.
Like for other socket related functions which have the same problem,we add a 'qemu_setsockopt' macro which provides that type cast where...
net/socket: Fix compiler warning (regression for MinGW)
Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type castwhich is needed for MinGW:
net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness/usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note:...
block: Enable qemu_open/close to work with fd sets
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching accessmode flags will be searched for within the specified monitorfd set. If the fd is found, a dup of the fd will be returned...
block: Convert close calls to qemu_close
This patch converts all block layer close calls, that correspondto qemu_open calls, to qemu_close.
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge remote-tracking branch 'quintela/migration-next-20120808' into staging
iscsi: Pick default initiator-name based on the name of the VM
This patch updates the iscsi layer to automatically pick a 'unique'initiator-name based on the name of the vm in case the user has not setan explicit iqn-name to use.
Create a new function qemu_get_vm_name() that returns the name of the VM,...
Add cache handling functions
Add MRU page cache mechanism.The page are accessed by their address.
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>...
Add uleb encoding/decoding functions
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
Merge remote-tracking branch 'stefanha/net' into staging
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list thepermitted values', add support for 'help' as a synonym, by abstractingthe check out into a helper function.
This change means that in some cases where we were being lazy in...
net: Rename VLANClientState to NetClientState
The vlan feature is no longer part of net core. Rename VLANClientStateto NetClientState because net clients are not explicitly associated witha vlan at all, instead they have a peer net client to which they are...
net: Remove VLANState
VLANState is no longer used and can be removed.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>
cutils: add strpadcpy()
Signed-off-by: Yan Vugenfirer <yan@ravellosystems.com>Signed-off-by: Dmitry Fleytman <dmitry.fleytman@ravellosystems.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpus.c: Make all_cpu_threads_idle() static
Commit 946fb27c1 moved all the uses of all_cpu_threads_idle()into cpus.c. This means we can mark the function 'static'(again), if we shuffle it a bit earlier in the source file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
Merge remote-tracking branch 'mjt/mjt-iov2' into staging
Add MigrationParams structure
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
qdev-properties: Introduce pci-host-devaddr.
This new property will be used to specify a host pci device address.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Un-inline fdctrl_init_isa()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
allow qemu_iovec_from_buffer() to specify offset from which to start copying
Similar to qemu_iovec_memset(QEMUIOVector *qiov, size_t offset, int c, size_t bytes);the new prototype is: qemu_iovec_from_buf(QEMUIOVector *qiov, size_t offset,...
consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent
qemu_iovec_concat() is currently a wrapper forqemu_iovec_copy(), use the former (with extra"0" arg) in a few places where it is used.
Change skip argument of qemu_iovec_copy() from...
change qemu_iovec_to_buf() to match other to,from_buf functions
It now allows specifying offset within qiov to start from andamount of bytes to copy. Actual implementation is just a callto iov_to_buf().
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
rename qemu_sendv to iov_send, change proto and move declarations to iov.h
Rename arguments and use size_t for sizes instead of int,from int qemu_sendv(int sockfd, struct iovec *iov, int len, int iov_offset)to ssize_t iov_send(int sockfd, struct iovec *iov,...
cleanup qemu_co_sendv(), qemu_co_recvv() and friends
The same as for non-coroutine versions in previouspatches: rename arguments to be more obvious, changetype of arguments from int to size_t where appropriate,and use common code for send and receive paths (with...
consolidate qemu_iovec_memset{,_skip}() into single function and use existing iov_memset()
This patch combines two functions into one, and replacesthe implementation with already existing iov_memset() fromiov.c.
The new prototype of qemu_iovec_memset():...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Introduce MSIMessage structure
Will be used for generating and distributing MSI messages, both inemulation mode and under KVM.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
declare ECANCELED on all machines
This is needed in particular on Win32.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge commit 'ff71f2e8cacefae99179993204172bc65e4303df' into staging
qtest: add C version of test infrastructure
This also includes a qtest wrapper script to make it easier to launch qtesttests directly.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cleanup obsolete typedef
There are no users of i2c_slave.
Signed-off-by: Joshua Housh <joshua.housh@calxeda.com>Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
shpc: standard hot plug controller
This adds support for SHPC interface, as defined by PCI StandardHot-Plug Controller and Subsystem Specification, Rev 1.0http://www.pcisig.com/specifications/conventional/pci_hot_plug/SHPC_10
Only SHPC intergrated with a PCI-to-PCI bridge is supported,...
w64: Don't redefine lseek, ftruncate
MinGW-w64 already defines lseek and ftruncate (and uses the 64 bitvariants). The conditional compilation avoids redefinitions(which would be wrong) and compiler warnings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
Move definition of HOST_LONG_BITS to qemu-common.h
Like the related macro TCG_TARGET_LONG, HOST_LONG_BITS can be determinedby the C preprocessor. It is also not used in Makefiles.
So there is no need to calculate it in configure, and it can be definedin qemu-common.h....
cutils: extract buffer_is_zero() from qemu-img.c
The qemu-img.c:is_not_zero() function checks if a buffer contains allzeroes. This function will come in handy for zero-detection in theblock layer, so clean it up and move it to cutils.c.
Note that the function now returns true if the buffer is all zeroes....
qdev: remove print/parse methods from LostTickPolicy properties
Also generalize the code so that we can have more enum propertiesin the future.
qdev: Introduce lost tick policy property
Potentially tick-generating timer devices will gain a common property:lock_tick_policy. It allows to encode 4 different ways how to deal withtick events the guest did not process in time:
discard - ignore lost ticks (e.g. if the guest compensates for them...
sheepdog: move coroutine send/recv function to generic code
Outside coroutines, avoid busy waiting on EAGAIN by temporarilymaking the socket blocking.
The API of qemu_recvv/qemu_sendv is slightly different fromdo_readv/do_writev because they do not handle coroutines. It...
add qemu_send_full and qemu_recv_full
isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions
NULL is a valid bus/device, so there is no change in behaviour.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macros
Add macros for aligning a number to a multiple, for example:
QEMU_ALIGN_DOWN(500, 2000) = 0QEMU_ALIGN_UP(500, 2000) = 2000
Since ALIGN_UP() is a common macro name use the QEMU_* namespace prefix....
Move filedescriptor parsing code from net.c into qemu_parse_fd()
Move the parsing of a filedescriptor into a common functionqemu_parse_fd() so others can use it as well. Have net.c call thisfunction.
v2: - moving qemu_parse_fd into cutils.c
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>...
qemu-timer: move icount to cpus.c
None of this is needed by tools, and most of it can even be made staticinside cpus.c.
main-loop: create main-loop.h
main-loop: create main-loop.c
core: remove qemu_service_io
qemu_service_io was mainly an alias to qemu_notify_event,currently used only by PPC for timer hack, so callqemu_notify_event directly.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove qemu_malloc/qemu_free
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make glib mandatory and fixup utils appropriately
Avoid allocating TCG resources in non-TCG mode
Do not allocate TCG-only resources like the translation buffer whenrunning over KVM or XEN. Saves a "few" bytes in the qemu address spaceand is also conceptually cleaner.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
qemu: Add strtosz_suffix_unit function
This function does the same as the strtosz_suffix functionexcept that it allows to specify the unit to which thek/M/B/T suffixes apply. This function will be used later toparse the tsc-frequency from the command-line....
Merge remote-tracking branch 'kraxel/usb.22' into staging
move QEMUSGList typedef
Move the QEMUSGList typedef to qemu-common so it can easily be used.The actual struct definition stays in dma.h.
async: Remove AsyncContext
The purpose of AsyncContexts was to protect qcow and qcow2 against reentrancyduring an emulated bdrv_read/write (which includes a qemu_aio_wait() call andcan run AIO callbacks of different requests if it weren't for AsyncContexts)....
move WORDS_ALIGNED to qemu-common.h
This is not a CPU interface, and a configure test would not be tooprecise. So just add it to qemu-common.h.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Wrap recv to avoid warnings
Avoid warnings like these by wrapping recv(): CC slirp/ip_icmp.o/src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':/src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]...
Introduce compiler.h header file
This moves compiler related macros from qemu-common.h to compiler.h.
The reason for this change is that there are simple header files thatdepend only on the compiler macros, so including qemu-common.h is overkill.
Besides, qemu-common.h is bloated and will benefit from some splitting....
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
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.
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.
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....