- 31 10月, 2016 1 次提交
-
-
由 Ashijeet Acharya 提交于
Make inet_connect_saddr() in util/qemu-sockets.c public in order to be able to use it with InetSocketAddress sockets outside of util/qemu-sockets.c independently. Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 28 10月, 2016 3 次提交
-
-
由 Anand J 提交于
Some files contain multiple #includes of the same header file. Removed most of those unnecessary duplicate entries using scripts/clean-includes. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NAnand J <anand.indukala@gmail.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Paolo Bonzini 提交于
It is simpler and a bit faster, and QEMU does not need the contention callbacks (and thus the fairness) anymore. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-21-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Paolo Bonzini 提交于
GRecMutex is new in glib 2.32, so we cannot use it. Introduce a recursive mutex in qemu-thread instead, which will be used instead of RFifoLock. Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-20-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
- 25 10月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
The QMP visitors have no direct dependency on QMP. It is valid to use them anywhere that one has a QObject. Rename them to better reflect their functionality as a generic QObject to QAPI converter. This is the first of three parts: rename the files. The next two parts will rename C identifiers. The split is necessary to make git rename detection work. Reviewed-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> [Split into file and identifier rename, two comments touched up] Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 24 10月, 2016 4 次提交
-
-
Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bitmap migration, restoring the bitmap in several steps is available. To save performance, every step writes only the last level of the bitmap. All other levels are restored by hbitmap_deserialize_finish() as a last step of restoring. So, HBitmap is inconsistent while restoring. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> [Fix left shift operand to 1UL; add "finish" parameter. - Fam] Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1476395910-8697-8-git-send-email-jsnow@redhat.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Fam Zheng 提交于
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: NFam Zheng <famz@redhat.com> [Amended text inline. --js] Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1476395910-8697-3-git-send-email-jsnow@redhat.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Paolo Bonzini 提交于
Thanks to the acquire semantics of qemu_event_reset and qemu_event_wait, some memory barriers can be removed. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Do not use the somewhat mysterious atomic_mb_read/atomic_mb_set, instead make sure that the operations on QemuEvent are annotated with the desired acquire and release semantics. In particular, qemu_event_set wakes up the waiting thread, so it must be a release from the POV of the waker (compare with qemu_mutex_unlock). And it actually needs a full barrier, because that's the only thing that provides something like a "load-release". Use smp_mb_acquire until we have atomic_load_acquire and atomic_store_release in atomic.h. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 10月, 2016 1 次提交
-
-
由 Wei Yang 提交于
According to linux kernel commit <89c1e79eb30> ("linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK"), these two macro could be improved. This patch takes this change and also move them all in header file. Signed-off-by: NWei Yang <richard.weiyang@gmail.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 07 10月, 2016 4 次提交
-
-
由 Fam Zheng 提交于
Use a hash table to keep record of all loaded modules, and return early if the requested module is already loaded. Signed-off-by: NFam Zheng <famz@redhat.com> Message-id: 1473043845-13197-3-git-send-email-famz@redhat.com Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
Recently we moved a few options from QemuOptsLists in blockdev.c to bdrv_runtime_opts in block.c in order to make them accissble using blockdev-add. However, this has the side effect that these options are missing from query-command-line-options now, and libvirt consequently disables the corresponding feature. This problem was reported as a regression for the 'discard' option, introduced in commit 818584a4. However, it is more general than that. Fix it by adding bdrv_runtime_opts to the list of QemuOptsLists that are returned in query-command-line-options. For the future, libvirt is advised to use QMP schema introspection for block device options. Reported-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Tested-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Emilio G. Cota 提交于
The old map's bucket locks are being unlocked *after* that same old map has been passed to RCU for destruction. This is a bug that can cause a segfault, since there's no guarantee that the deletion will be deferred (e.g. there may be no concurrent readers). The segfault is easily triggered in RHEL6/CentOS6 with qht-test, particularly on a single-core system or by pinning qht-test to a single core. Fix it by unlocking the map's bucket locks right after having published the new map, and (crucially) before marking the map for deletion via call_rcu(). While at it, expand qht_do_resize() to atomically do (1) a reset, (2) a resize, or (3) a reset+resize. This simplifies the calling code, since the new function (qht_do_resize_reset()) acquires and releases the buckets' locks. Note that no qht_do_reset inline is provided, since it would have no users--qht_reset() already performs a reset without taking ht->lock. Reported-by: NPeter Maydell <peter.maydell@linaro.org> Reported-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NEmilio G. Cota <cota@braap.org> Message-Id: <1475706880-10667-3-git-send-email-cota@braap.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Emilio G. Cota 提交于
Sometimes gcc doesn't pick up the fact that 'new' is properly set if 'resize == true', which may generate an unnecessary build warning. Fix it by removing 'resize' and directly checking that 'new' is non-NULL. Signed-off-by: NEmilio G. Cota <cota@braap.org> Message-Id: <1475706880-10667-2-git-send-email-cota@braap.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 04 10月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
This is a small helper that tries to fetch binary name for given PID. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Message-Id: <4d75d475c1884f8e94ee8b1e57273ddf3ed68bf7.1474987617.git.mprivozn@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Alex Bennée 提交于
ThreadSanitizer detects a possible race between reading/writing the hashes. The ordering semantics are already documented for QHT however for true C11 compliance we should use relaxed atomic primitives for accesses that are done across threads. On x86 this slightly changes to the code to not do a load/compare in a single instruction leading to a slight performance degradation. Running 'taskset -c 0 tests/qht-bench -n 1 -d 10' (i.e. all lookups) 10 times, we get: before the patch: $ ./mean.pl 34.04 34.24 34.38 34.25 34.18 34.51 34.46 34.44 34.29 34.08 34.287 +- 0.160072900059109 after: $ ./mean.pl 33.94 34.00 33.52 33.46 33.55 33.71 34.27 34.06 34.28 34.58 33.937 +- 0.374731014640279 Signed-off-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NEmilio G. Cota <cota@braap.org> Message-Id: <20160930213106.20186-10-alex.bennee@linaro.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 29 9月, 2016 9 次提交
-
-
由 Peter Lieven 提交于
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
Signed-off-by: NPeter Lieven <pl@kamp.de> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
The name of the sigaltstack coroutine struct was misleading. Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Daniel P. Berrange 提交于
The trace points for util/qemu-coroutine*.c were mistakenly left in the top level trace-events file, instead of util/trace-events in commit 492bb2dd Author: Daniel P. Berrange <berrange@redhat.com> Date: Thu Jun 16 09:39:48 2016 +0100 trace: split out trace events for util/ directory Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1473872624-23285-3-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrange 提交于
The trace points for util/buffer.c were mistakenly put in the io/trace-events file, instead of util/trace-events in commit 892bd32e Author: Daniel P. Berrange <berrange@redhat.com> Date: Thu Jun 16 09:39:50 2016 +0100 trace: split out trace events for io/ directory Move all trace-events for files in the io/ directory to Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1473872624-23285-2-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
See the doc comments for a description of this new coroutine API. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 1474989516-18255-2-git-send-email-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 23 9月, 2016 4 次提交
-
-
由 Fam Zheng 提交于
sscanf is relatively loose (tolerate) on some invalid formats that we should fail instead of generating a wrong uuid structure, like with whitespaces and short strings. Add and use a helper function to first check the format. Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-11-git-send-email-famz@redhat.com>
-
由 Fam Zheng 提交于
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to QemuUUID is done here too to keep everything in sync and avoid code churn. Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
-
由 Fam Zheng 提交于
So that it doesn't have to be zeroed at each call. Suggested-by: NEric Blake <eblake@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com>
-
由 Fam Zheng 提交于
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard with only a small number of operations, it is cleaner to have a central support in libqemuutil. This patch adds qemu_uuid_* functions that all uuid users in the code base can rely on. Except for qemu_uuid_generate which is new code, all other functions are just copy from existing fallbacks from other files. Note that qemu_uuid_parse is moved without updating the function signature to use QemuUUID, to keep this patch simple. Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
-
- 21 9月, 2016 1 次提交
-
-
由 Marc Mari 提交于
Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. In addition, only the protocol drivers are being modularized, as they are the only ones which see significant performance benefits. The format drivers do not generally link to external libraries, so modularizing them is of no benefit from a performance perspective. All the necessary module information is located in a new structure found in module_block.h This spoils the purpose of 5505e8b7 (block/dmg: make it modular). Before this patch, if module build is enabled, block-dmg.so is linked to libbz2, whereas the main binary is not. In downstream, theoretically, it means only the qemu-block-extra package depends on libbz2, while the main QEMU package needn't to. With this patch, we (temporarily) change the case so that the main QEMU depends on libbz2 again. Signed-off-by: NMarc Marí <markmb@redhat.com> Signed-off-by: NColin Lord <clord@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1471008424-16465-4-git-send-email-clord@redhat.com Reviewed-by: NMax Reitz <mreitz@redhat.com> [mreitz: Do a signed comparison against the length of block_driver_modules[], so it will not cause a compile error when empty] Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
- 15 9月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
If giving QEMU a log arg which asks to enable multiple different trace event patterns such as $QEMU -d trace:qio*,trace:qcrypto* the parser will then invoke trace_enable_events("qio*,trace:qcrypto*") trace_enable_events("qcrypto*") as when finding a 'trace:' prefix, it is not clever enough to strip anything after the next comma. As a result only the last 'trace:' match ever works. Rather than trying to be more clever with parsing the command line arg in place, simplify the code by using g_strsplit to break it into individual strings on ','. These resulting pieces can be directly used without worrying about trailing data from the next option. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1473186343-16704-1-git-send-email-berrange@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 9月, 2016 9 次提交
-
-
由 Richard Henderson 提交于
Handle alignment of buffers, so that the vector paths can be used more often. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1473800239-13841-1-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
There's no real knowledge of the cacheline size, just prefetching one loop ahead. Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-7-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-6-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
For ppc64le, gcc6 does extremely poorly with the Altivec code. Moreover, on POWER7 and POWER8, a hand-optimized Altivec version turns out to be no faster than the revised integer version, and therefore not worth the effort. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
The revised integer version is 4 times faster than the neon version on an AppliedMicro Mustang. Even with hand scheduling and additional unrolling I cannot make any neon version run as fast as the integer. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
Allow selection of several acceleration functions based on the size and alignment of the buffer. Do not require ifunc support for AVX2 acceleration. Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-5-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
Since the two users don't make use of the returned offset, beyond ensuring that the entire buffer is zero, consider the can_use_buffer_find_nonzero_offset and buffer_find_nonzero_offset functions internal. Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-4-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Richard Henderson 提交于
This is unused and complicates the vector interface. Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-3-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-