- 06 5月, 2015 6 次提交
-
-
由 Eric Blake 提交于
Previous commits demonstrated that the generator had several flaws with less-than-perfect unions: - a simple union that listed the same branch twice (or two variant names that map to the same C enumerator, including the implicit MAX sentinel) ended up generating invalid C code - an anonymous union that listed two branches with the same qtype ended up generating invalid C code - the generator crashed on anonymous union attempts to use an array type - the generator was silently ignoring a base type for anonymous unions - the generator allowed unknown types or nested anonymous unions as a branch in an anonymous union Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Eric Blake 提交于
None of the existing QMP or QGA interfaces uses a union with a base type but no discriminator; it is easier to avoid this in the generator to save room for other future extensions more likely to be useful. An earlier commit added a union-base-no-discriminator test to ensure that we eventually give a decent error message; likewise, removing UserDefUnion outright is okay, because we moved all the tests we wish to keep into the tests of the simple union UserDefNativeListUnion in the previous commit. Now is the time to actually forbid simple union with base, and remove the last vestiges from the testsuite. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Eric Blake 提交于
The previous commit demonstrated that the generator had several flaws with less-than-perfect enums: - an enum that listed the same string twice (or two variant strings that map to the same C enumerator) ended up generating an invalid C enum - because the generator adds a _MAX terminator to each enum, the use of an enum member 'max' can also cause this clash - if an enum omits 'data', the generator left a python stack trace rather than a graceful message - an enum that used a non-array 'data' was silently accepted by the parser - an enum that used non-string members in the 'data' member was silently accepted by the parser Add check_enum to cover these situations, and update testcases to match. While valid .json files won't trigger any of these cases, we might as well be nicer to developers that make a typo while trying to add new QAPI code. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Eric Blake 提交于
Python 2 and Python 3 have a wild history of whether strings default to ascii or unicode, where Python 3 requires checking isinstance(foo, basestr) to cover all strings, but where that code is not portable to Python 2. It's simpler to just state that we don't care about Unicode strings, and to just always use the simpler isinstance(foo, str) everywhere. I'm no python expert, so I'm basing it on this conversation: https://lists.gnu.org/archive/html/qemu-devel/2014-09/msg05278.htmlSigned-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Eric Blake 提交于
We were missing the 'size' builtin type (which means that QAPI using [ 'size' ] would fail to compile). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Eric Blake 提交于
There was some redundancy between builtin_types[] and builtin_type_qtypes{}. Merge them into one. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 05 5月, 2015 2 次提交
-
-
由 Paolo Bonzini 提交于
If the is_write argument is true, address_space_rw writes to memory and thus reads from the buffer. The opposite holds if is_write is false. Fix the model. Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Gerd Hoffmann 提交于
perl script to transform shader programs into c include files with static string constands containing the shader programs, so we can easily embed them into qemu. Also some Makefile logic for them. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
- 28 4月, 2015 3 次提交
-
-
由 John Snow 提交于
A filter is added to allow callers to request very specific events to be pulled from the event queue, while leaving undesired events still in the stream. This allows us to poll for completion data for multiple asynchronous events in any arbitrary order. A new timeout context is added to the qmp pull_event method's wait parameter to allow tests to fail if they do not complete within some expected period of time. Also fixed is a bug in qmp.pull_event where we try to retrieve an event from an empty list if we attempt to retrieve an event with wait=False but no events have occurred. Signed-off-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1429314609-29776-19-git-send-email-jsnow@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
The 'qemu coroutine <coroutine-address>' GDB command prints the backtrace for a CoroutineUContext. This is useful for peeking inside yielded coroutines that are waiting for file descriptor events, timers, etc. For example: $ gdb tests/test-coroutine (gdb) b test_yield (gdb) r (gdb) b qemu_coroutine_enter (gdb) c (gdb) c Continuing. Breakpoint 2, qemu_coroutine_enter (co=0x555555c66520, opaque=0x0) at qemu-coroutine.c:103 103 { (gdb) source scripts/qemu-gdb.py (gdb) qemu coroutine 0x555555c66520 #0 0x000055555557a740 in qemu_coroutine_switch (from_=<optimized out>, to_=0x7ffff7f90a70, action=COROUTINE_YIELD) at coroutine-ucontext.c:177 #1 0x0000555555566af9 in yield_5_times (opaque=0x7fffffffdbb7) at tests/test-coroutine.c:107 #2 0x000055555557a7aa in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at coroutine-ucontext.c:80 #3 0x00007ffff08de000 in __start_context () at /lib64/libc.so.6 Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1427409754-8556-1-git-send-email-stefanha@redhat.com Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
The ffs(3) family of functions is not portable. MinGW doesn't always provide the function. Use ctz32() or ctz64() instead. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1427124571-28598-10-git-send-email-stefanha@redhat.com Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 26 4月, 2015 1 次提交
-
-
由 Peter Maydell 提交于
Make address_space_rw take transaction attributes, rather than always using the 'unspecified' attributes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
-
- 25 4月, 2015 1 次提交
-
-
由 Eric Blake 提交于
Defaulting a parameter to True, then having all callers omit or pass an explicit True for that parameter, is pointless. Looks like it has been dead since introduction in commit 06d64c62, more than 4 years ago. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 18 3月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
The .d file name must match exactly what is used in the SUBDIR_DEVICES_MAK_DEP variable. Instead of making assumptions in the make_device_config.sh script, just pass it in. Similarly, the makefile target may not match the output file name, because Makefile uses a temporary file. Instead of making assumptions on what the Makefile does, emit the config-devices.mak file to stdout, and use the passed-in destination as the makefile target Reported-by: NPeter Maydell <peter.maydell@linaro.org> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 17 3月, 2015 2 次提交
-
-
由 Andreas Färber 提交于
Functionally it is a recursive qom-list with qom-get per non-child<> property. Some failures needed to be handled, such as trying to read a pointer property, which is not representable in QMP. Those print a literal "<EXCEPTION>". Tested-by: NAlistair Francis <alistair.francis@xilinx.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Jan Kiszka 提交于
Allocate the calculated overall size, not only the size of a single element. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
-
- 10 3月, 2015 2 次提交
-
-
由 Stefan Hajnoczi 提交于
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NAdemar Reis <areis@redhat.com> Reviewed-by: NWei Huang <wei@redhat.com> Message-Id: <1425338947-10296-3-git-send-email-stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Stefan Hajnoczi 提交于
The curses user interface shows both the accumulated total and the current event counts. Add column headers so it's clear what the numbers mean. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NAdemar Reis <areis@redhat.com> Reviewed-by: NWei Huang <wei@redhat.com> Message-Id: <1425338947-10296-2-git-send-email-stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 03 3月, 2015 1 次提交
-
-
由 Stefan Hajnoczi 提交于
DTrace on Mac OS X fails due to trace events using 'self' as an argument name: GEN trace/generated-tracers-dtrace.h dtrace: failed to compile script trace/generated-tracers-dtrace.dtrace: line 1330: syntax error, unexpected DT_KEY_SELF, expecting ) near "self" make: *** [trace/generated-tracers-dtrace.h] Error 1 Filter argument names according to the list of DTrace .d file reserved keywords. Note that DTrace on Mac and Linux still do not work after this patch. There are additional build issues remaining. Reported-by: NHenk Poley <henkpoley@gmail.com> Tested-by: NHenk Poley <henkpoley@gmail.com> Cc: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 28 2月, 2015 1 次提交
-
-
由 Michael S. Tsirkin 提交于
V=1 should show what's going on, it's not nice to silence things unconditionally. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Message-Id: <1424332114-13440-1-git-send-email-mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 2月, 2015 4 次提交
-
-
由 Michael S. Tsirkin 提交于
Thomas Huth noticed that some linux headers use __inline__, change to inline to be consistent with the rest of QEMU. Reported-by: NThomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Copy arch specific virtio headers. ATM this applies to s390 only. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Drop the linux-specific virtio headers, use the copy from standard-headers instead. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we can easily fix that automatically while importing. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
-
- 24 2月, 2015 1 次提交
-
-
由 Michael S. Tsirkin 提交于
It's not easy to figure out how monitor translates strings: most QEMU code deals with translated indexes, these are translated using _lookup arrays, so you need to find the array name, and find the appropriate offset. This patch adds C99 indexes to lookup arrays, which makes it possible to find the correct key using simple grep, and see that the matching is correct at a glance. Example: Before: const char *MigrationCapability_lookup[] = { "xbzrle", "rdma-pin-all", "auto-converge", "zero-blocks", NULL, }; After: const char *MigrationCapability_lookup[] = { [MIGRATION_CAPABILITY_XBZRLE] = "xbzrle", [MIGRATION_CAPABILITY_RDMA_PIN_ALL] = "rdma-pin-all", [MIGRATION_CAPABILITY_AUTO_CONVERGE] = "auto-converge", [MIGRATION_CAPABILITY_ZERO_BLOCKS] = "zero-blocks", [MIGRATION_CAPABILITY_MAX] = NULL, }; Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 17 2月, 2015 1 次提交
-
-
由 Mike Day 提交于
QLIST has RCU-friendly primitives, so switch to it. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NMike Day <ncmike@ncultra.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 2月, 2015 1 次提交
-
-
由 Fam Zheng 提交于
This adds scripts/qtest.py as a python library for qtest protocol. This is a skeleton with a basic "cmd" method to execute a command, reading and parsing of qtest output could be added later on demand. Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Message-id: 1422586186-9925-3-git-send-email-famz@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 2月, 2015 1 次提交
-
-
由 Wei Huang 提交于
This patch defines the list of kvm_exit reasons for aarch64. This list is based on the Exception Class (EC) field of HSR register. With this patch users can trace the execution of guest VMs better. A sample output from command "kvm_stat -1 -t" is shown as the following: <...> kvm_exit(WATCHPT_HYP) 0 0 kvm_exit(WFI) 9422 9361 NOTE: This patch requires TRACE_EVENT(kvm_exit) to include exit_reason field in TP_ARGS. A patch to upstream kernel has been submitted. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 10 2月, 2015 1 次提交
-
-
由 Greg Kurz 提交于
It fixes the following error: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 584, in <module> dump.read(dump_memory = args.memory) File "./scripts/analyze-migration.py", line 528, in read self.sections[section_id].read() File "./scripts/analyze-migration.py", line 250, in read self.file.readvar(n_valid * HASH_PTE_SIZE_64) NameError: global name 'HASH_PTE_SIZE_64' is not defined Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 06 2月, 2015 6 次提交
-
-
由 Dr. David Alan Gilbert 提交于
When debugging migration it's useful to know the PID of each trace message so you can figure out if it came from the source or the destination. Printing the time makes it easy to do latency measurements or timings between trace points. Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-id: 1421746875-9962-1-git-send-email-dgilbert@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Alexander Graf 提交于
This patch adds a python tool to the scripts directory that can read a dumped migration stream if it contains the JSON description of the device states. I constructs a human readable JSON stream out of it. It's very simple to use: $ qemu-system-x86_64 (qemu) migrate "exec:cat > mig" $ ./scripts/analyze_migration.py -f mig Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Amit Shah 提交于
Commit 22382bb9 renamed the 'hw_cursor_x' and 'hw_cursor_y' fields in cirrus_vga. Update the static checker's whitelist to allow matching against the old and new names. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Markus Armbruster 提交于
Memory allocated with GLib needs to be freed with GLib. Freeing it with free() instead of g_free() is a common error. Harmless when g_free() is a trivial wrapper around free(), which is commonly the case. But model the difference anyway. In a local scan, this flags four ALLOC_FREE_MISMATCH. Requires --enable ALLOC_FREE_MISMATCH, because the checker is still preview. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Markus Armbruster 提交于
Without a model, Coverity can't know that the result of g_strdup() needs to be fed to g_free(). One way to get such a model is to scan GLib, build a derived model file with cov-collect-models, and use that when scanning QEMU. Unfortunately, the Coverity Scan service we use doesn't support that. Thus, we're stuck with the other way: write a user model. Doing that for all of GLib is hardly practical. I'm doing it for the "String Utility Functions" we actually use that return dynamically allocated strings. In a local scan, this flags 20 additional RESOURCE_LEAKs. The ones I checked look genuine. It also loses a NULL_RETURNS about ppce500_init() using qemu_find_file() without error checking. I don't understand why. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Markus Armbruster 提交于
In current versions of GLib, g_new() may expand into g_malloc_n(). When it does, Coverity can't see the memory allocation, because we don't model g_malloc_n(). Similarly for g_new0(), g_renew(), g_try_new(), g_try_new0(), g_try_renew(). Model g_malloc_n(), g_malloc0_n(), g_realloc_n(). Model g_try_malloc_n(), g_try_malloc0_n(), g_try_realloc_n() by adding indeterminate out of memory conditions on top. To avoid undue duplication, replace the existing models for g_malloc() & friends by trivial wrappers around g_malloc_n() & friends. In a local scan, this flags four additional RESOURCE_LEAKs and one NULL_RETURNS. The NULL_RETURNS is a false positive: Coverity can now see that g_try_malloc(l1_sz * sizeof(uint64_t)) in qcow2_check_metadata_overlap() may return NULL, but is too stupid to recognize that a loop executing l1_sz times won't be entered then. Three out of the four RESOURCE_LEAKs appear genuine. The false positive is in ppce500_prep_device_tree(): the pointer dies, but a pointer to a struct member escapes, and we get the pointer back for freeing with container_of(). Too funky for Coverity. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 1月, 2015 4 次提交
-
-
由 Wei Huang 提交于
While running kvm_stat using tracepoint on ARM64 hardware (e.g. "kvm_stat -1 -t"), the initial values of some kvm_userspace_exit counters were found to be very suspecious. For instance the tracing tool showed that S390_TSCH was called many times on ARM64 machine, which apparently was wrong. This patch adds RESET ioctl support for perf monitoring. Before calling ioctl to enable a perf event, this patch resets the counter first. With this patch, the init counter values become correct on ARM64 hardware. Example: ==== before patch ==== kvm_userspace_exit(S390_SIEIC) 1426 0 kvm_userspace_exit(S390_TSCH) 339 0 ==== after patch ==== kvm_userspace_exit(S390_SIEIC) 0 0 kvm_userspace_exit(S390_TSCH) 0 0 Signed-off-by: NWei Huang <wei@redhat.com>
-
由 Wei Huang 提交于
kvm_stat uses syscall() to call perf_event_open(). If this function call fails, the returned value is -1, which doesn't tell the details of such failure (i.e. ENOSYS or EINVAL). This patch retrieves errno and prints it when syscall() fails. The error message will look like "Exception: perf_event_open failed, errno = 38". Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Wei Huang 提交于
This patch updates the exit reasons for x86_vmx, x86_svm, and userspace to the latest definition. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Wei Huang 提交于
This patch enables aarch64 support for kvm_stat. The platform detection is based on OS uname. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 20 1月, 2015 1 次提交
-
-
由 Peter Maydell 提交于
Make sure that all generated C structs have at least one field; this avoids potential issues with attempting to malloc space for zero-length structs in C (g_malloc(sizeof struct) would return NULL). It also avoids an incompatibility with C++ (where an empty struct is size 1); that isn't important to us now but might be in future. Generated empty structures look like this: struct Abort { char qapi_dummy_field_for_empty_struct; }; This silences clang warnings like: ./qapi-types.h:3752:1: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat] struct Abort ^ Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1419359069-16611-1-git-send-email-peter.maydell@linaro.org
-