summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gdbstub: Implement gdb_do_syscallv()Peter Maydell2015-09-072-4/+37
| | | | | | | | | Implement a variant of the existing gdb_do_syscall() which takes a va_list. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Christopher Covington <cov@codeaurora.org> Message-id: 1439483745-28752-4-git-send-email-peter.maydell@linaro.org
* target-arm: Improve semihosting debug printsChristopher Covington2015-09-071-3/+9
| | | | | | | | | | | | | Print semihosting debugging information before the do_arm_semihosting() call so that angel_SWIreason_ReportException, which causes the function to not return, gets the same debug prints as other semihosting calls. Also print out the semihosting call number. Signed-off-by: Christopher Covington <christopher.covington@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Christopher Covington <cov@codeaurora.org> Message-id: 1439483745-28752-3-git-send-email-peter.maydell@linaro.org
* target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdbPeter Maydell2015-09-071-1/+1
| | | | | | | | | | | A spurious trailing "\n" in the gdb syscall format string used for SYS_WRITE0 meant that gdb would reject the remote syscall, with the effect that the output from the guest was silently dropped. Remove the newline so that gdb accepts the packet. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* arm: Use g_new() & friends where that makes obvious senseMarkus Armbruster2015-09-0717-65/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Coccinelle semantic patch: @@ type T; @@ -g_malloc(sizeof(T)) +g_new(T, 1) @@ type T; @@ -g_try_malloc(sizeof(T)) +g_try_new(T, 1) @@ type T; @@ -g_malloc0(sizeof(T)) +g_new0(T, 1) @@ type T; @@ -g_try_malloc0(sizeof(T)) +g_try_new0(T, 1) @@ type T; expression n; @@ -g_malloc(sizeof(T) * (n)) +g_new(T, n) @@ type T; expression n; @@ -g_try_malloc(sizeof(T) * (n)) +g_try_new(T, n) @@ type T; expression n; @@ -g_malloc0(sizeof(T) * (n)) +g_new0(T, n) @@ type T; expression n; @@ -g_try_malloc0(sizeof(T) * (n)) +g_try_new0(T, n) @@ type T; expression p, n; @@ -g_realloc(p, sizeof(T) * (n)) +g_renew(T, p, n) @@ type T; expression p, n; @@ -g_try_realloc(p, sizeof(T) * (n)) +g_try_renew(T, p, n) @@ type T; expression n; @@ -(T *)g_new(T, n) +g_new(T, n) @@ type T; expression n; @@ -(T *)g_new0(T, n) +g_new0(T, n) @@ type T; expression p, n; @@ -(T *)g_renew(T, p, n) +g_renew(T, p, n) Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1440524394-15640-1-git-send-email-armbru@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-09-04' ↵Peter Maydell2015-09-045-0/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Monitor patches # gpg: Signature made Fri 04 Sep 2015 12:40:11 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2015-09-04: hmp: add info iothreads command qmp-shell: add documentation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hmp: add info iothreads commandTing Wang2015-09-044-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make "info iothreads" available on the HMP monitor. For example, the results are as follows when executing qemu command with "-object iothread,id=iothread-1 -object iothread,id=iothread-2". (qemu) info iothreads iothread-1: thread_id=123 iothread-2: thread_id=456 Signed-off-by: Ting Wang <kathy.wangting@huawei.com> Message-Id: <1435306033-58372-1-git-send-email-kathy.wangting@huawei.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Amos Jianjun Kong <kongjianjun@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * qmp-shell: add documentationJohn Snow2015-09-041-0/+35
| | | | | | | | | | | | | | | | | | | | I should probably document the changes that were made. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <1435775149-17285-1-git-send-email-jsnow@redhat.com> Reviewed-By: Kashyap Chamarthy <kchamart@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
* | Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-09-04' into ↵Peter Maydell2015-09-0482-267/+316
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging qapi: Another round of fixes and cleanups # gpg: Signature made Fri 04 Sep 2015 14:48:54 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-qapi-2015-09-04: (33 commits) qapi: Generators crash when --output-dir isn't given, fix docs/qapi-code-gen.txt: Fix QAPI schema examples qapi: Simplify error reporting for array types qapi: Fix errors for non-string, non-dictionary members tests/qapi-schema: Cover non-string, non-dictionary members tests/qapi-schema: Cover two more syntax errors qapi: Drop one of two "simple union must not have base" checks qapi: Generated code cleanup qapi-commands: Drop useless initialization qapi-commands: Don't feed output of mcgen() to mcgen() again qapi-commands: Inline gen_marshal_output_call() qapi-commands: Fix gen_err_check(e) for e and e != 'local_err' qapi: Command returning anonymous type doesn't work, outlaw qapi: Fix to reject union command and event arguments qapi-tests: New tests for union, alternate command arguments tests/qapi-schema: Rename tests from data- to args- tests/qapi-schema: Restore test case for flat union base bug qapi: Document flaws in checking of names qapi: Document shortcoming with union 'data' branch qapi: Document that input visitor semantics are prone to leaks ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qapi: Generators crash when --output-dir isn't given, fixMarkus Armbruster2015-09-041-5/+6
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * docs/qapi-code-gen.txt: Fix QAPI schema examplesMarkus Armbruster2015-09-041-3/+2
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Simplify error reporting for array typesMarkus Armbruster2015-09-043-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_type() first checks and peels off the array type, then checks the element type. For two out of four error messages, it takes pains to report errors for "array of T" instead of just T. Odd. Let's examine the errors. * Unknown element type, e.g. tests/qapi-schema/args-array-unknown.json: Member 'array' of 'data' for command 'oops' uses unknown type 'array of NoSuchType' To make sense of this, you need to know that 'array of NoSuchType' refers to '[NoSuchType]'. Easy enough. However, simply reporting Member 'array' of 'data' for command 'oops' uses unknown type 'NoSuchType' is at least as easy to understand. * Element type's meta-type is inadmissible, e.g. tests/qapi-schema/returns-whitelist.json: 'returns' for command 'no-way-this-will-get-whitelisted' cannot use built-in type 'array of int' 'array of int' is technically not a built-in type, but that's pedantry. However, simply reporting 'returns' for command 'no-way-this-will-get-whitelisted' cannot use built-in type 'int' avoids the issue, and is at least as easy to understand. * The remaining two errors are unreachable, because the array checking ensures that value is a string. Thus, reporting some errors for "array of T" instead of just T works, but doesn't really improve things. Drop it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Fix errors for non-string, non-dictionary membersMarkus Armbruster2015-09-047-10/+9
| | | | | | | | | | | | | | Fixes the errors demonstrated by the previous commit. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * tests/qapi-schema: Cover non-string, non-dictionary membersMarkus Armbruster2015-09-0413-0/+17
| | | | | | | | | | | | | | | | | | We always report "should be a dictionary" then. This is misleading: when allow_dict, it can be a dictionary or a type name string, else it can only be a type name. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * tests/qapi-schema: Cover two more syntax errorsMarkus Armbruster2015-09-049-0/+9
| | | | | | | | | | | | | | Syntax error coverage should now be complete. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Drop one of two "simple union must not have base" checksMarkus Armbruster2015-09-042-9/+1
| | | | | | | | | | | | | | | | | | The first check ensures the second one can't trigger. Drop the first one, because the second one is in a more logical place, and emits a nicer error message. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Generated code cleanupMarkus Armbruster2015-09-045-44/+39
| | | | | | | | | | | | | | | | Clean up white-space, brace placement, and superfluous #ifdef QAPI_TYPES_BUILTIN_CLEANUP_DEF. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-commands: Drop useless initializationMarkus Armbruster2015-09-042-7/+3
| | | | | | | | | | | | | | | | | | In generated command handlers, the assignment to retval dominates its only use. Therefore, its initialization is useless. Drop it. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-commands: Don't feed output of mcgen() to mcgen() againMarkus Armbruster2015-09-041-31/+21
| | | | | | | | | | | | | | | | | | Multiple passes through mcgen() is prone to produce unwanted blank lines, which we then combat by sprinkling .rstrip() on top. Just don't do it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-commands: Inline gen_marshal_output_call()Markus Armbruster2015-09-041-8/+4
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'Markus Armbruster2015-09-041-6/+7
| | | | | | | | | | | | | | | | | | gen_err_check() hard-codes 'local_err' instead of substituting the argument. Currently harmless, since all callers pass either None or 'local_err'. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Command returning anonymous type doesn't work, outlawMarkus Armbruster2015-09-0411-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproducer: with { 'command': 'user_def_cmd4', 'returns': { 'a': 'int' } } added to qapi-schema-test.json, qapi-commands.py dies when it tries to generate the command handler function Traceback (most recent call last): File "/work/armbru/qemu/scripts/qapi-commands.py", line 359, in <module> ret = generate_command_decl(cmd['command'], arglist, ret_type) + "\n" File "/work/armbru/qemu/scripts/qapi-commands.py", line 29, in generate_command_decl ret_type=c_type(ret_type), name=c_name(name), File "/work/armbru/qemu/scripts/qapi.py", line 927, in c_type assert isinstance(value, str) and value != "" AssertionError because the return type doesn't exist. Simply outlaw this usage, and drop or dumb down test cases accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Fix to reject union command and event argumentsMarkus Armbruster2015-09-046-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A command's or event's 'data' must be a struct type, given either as a dictionary, or as struct type name. Commit dd883c6 tightened the checking there, but not enough: we still accept 'union'. Fix to reject it. We may want to support union types there, but we'll have to extend qapi-commands.py and qapi-events.py for it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-tests: New tests for union, alternate command argumentsMarkus Armbruster2015-09-049-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A command's 'data' must be a struct type, given either as a dictionary, or as struct type name. Existing test case data-int.json covers simple type 'int'. Add test cases for type names referring to union and alternate types. The latter is caught (good), but the former is not (bug). Events have the same problem, but since they get checked by the same code, we don't bother to duplicate the tests. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * tests/qapi-schema: Rename tests from data- to args-Markus Armbruster2015-09-0432-9/+9
| | | | | | | | | | | | | | | | | | Since every schema entity has 'data', the data- prefix conveys no information. These tests actually exercise commands. Only commands have arguments, so change the prefix to to args-. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * tests/qapi-schema: Restore test case for flat union base bugMarkus Armbruster2015-09-042-6/+7
| | | | | | | | | | | | | | Test case added in commit 2fc0043, and messed up in commit 5223070. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Document flaws in checking of namesMarkus Armbruster2015-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | We don't actually enforce our "other than downstream extensions [...], all names should begin with a letter" rule. Add a FIXME. We should reject names that differ only in '_' vs. '.' vs. '-', because they're liable to clash in generated C. Add a FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Document shortcoming with union 'data' branchEric Blake2015-09-041-0/+8
| | | | | | | | | | | | | | | | | | Add a FIXME to remind us to fully audit whether removing the 'void *data' branch of each qapi union type can be done safely. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1438297637-26789-1-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * qapi: Document that input visitor semantics are prone to leaksEric Blake2015-09-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most functions that can return a pointer or set an Error ** value are decent enough to guarantee a NULL return when reporting an error. Not so with our generated qapi visitor functions. If the caller is not careful to clean up partially-allocated objects on error, then the caller suffers a memory leak. Properly fixing it is probably complex enough to save for a later day, so merely document it for now. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1438295587-19069-1-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * tests/qapi-schema: Document events with base don't workMarkus Armbruster2015-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | When event FOO's 'data' is a struct with a base, we consider only the struct's direct members, and ignore its base. The generated qapi_event_send_foo() doesn't take arguments for base members. No such events currently exist in the QMP schema. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * tests/qapi-schema: Document alternate's enum lacks visit functionMarkus Armbruster2015-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | We generate a declaration, but no definition. The QMP schema has two: Qcow2OverlapChecks and BlockdevRef. Neither visit_type_Qcow2OverlapChecksKind() nor visit_type_BlockdevRefKind() is actually used. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-visit: Fix two name arguments passed to visitorsMarkus Armbruster2015-09-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The generated code passes mangled schema names to visit_type_enum() and union's visit_start_struct(). Fix it to pass the names unadulterated, like we do everywhere else. Only qapi-schema-test.json actually has names where this makes a difference: enum __org.qemu_x-Enum, flat union __org.qemu_x-Union2, simple union __org.qemu_x-Union1 and its implicit enum __org.qemu_x-Union1Kind. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-visit: Replace list implicit_structs by setMarkus Armbruster2015-09-041-4/+3
| | | | | | | | | | | | | | | | Use set because that's what it is. While there, rename to implicit_structs_seen. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-visit: Fix generated code when schema has forward refsMarkus Armbruster2015-09-043-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The visit_type_implicit_FOO() are generated on demand, right before their first use. Used by visit_type_STRUCT_fields() when STRUCT has base FOO, and by visit_type_UNION() when flat UNION has member a FOO. If the schema defines FOO after its first use as struct base or flat union member, visit_type_implicit_FOO() calls visit_type_implicit_FOO() before its definition, which doesn't compile. Rearrange qapi-schema-test.json to demonstrate the bug. Fix by generating the necessary forward declaration. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Generate a nicer struct for flat unionsMarkus Armbruster2015-09-041-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct generated for a flat union is weird: the members of its base are at the end, except for the union tag, which is at the beginning. Example: qapi-schema-test.json has { 'struct': 'UserDefUnionBase', 'data': { 'string': 'str', 'enum1': 'EnumOne' } } { 'union': 'UserDefFlatUnion', 'base': 'UserDefUnionBase', 'discriminator': 'enum1', 'data': { 'value1' : 'UserDefA', 'value2' : 'UserDefB', 'value3' : 'UserDefB' } } We generate: struct UserDefFlatUnion { EnumOne enum1; union { void *data; UserDefA *value1; UserDefB *value2; UserDefB *value3; }; char *string; }; Change to put all base members at the beginning, unadulterated. Not only is this easier to understand, it also permits casting the flat union to its base, if that should become useful. We now generate: struct UserDefFlatUnion { /* Members inherited from UserDefUnionBase: */ char *string; EnumOne enum1; /* Own members: */ union { /* union tag is @enum1 */ void *data; UserDefA *value1; UserDefB *value2; UserDefB *value3; }; }; Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Fix generated code when flat union has member 'kind'Markus Armbruster2015-09-044-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A flat union's tag member gets renamed to 'kind' in the generated code. Breaks when another member named 'kind' exists. Example, adapted from qapi-schema-test.json: { 'struct': 'UserDefUnionBase', 'data': { 'kind': 'str', 'enum1': 'EnumOne' } } We generate: struct UserDefFlatUnion { EnumOne kind; union { void *data; UserDefA *value1; UserDefB *value2; UserDefB *value3; }; char *kind; }; Kill the silly rename. Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Drop unused and useless parameters and variablesMarkus Armbruster2015-09-045-42/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gen_sync_call()'s parameter indent is useless: gen_sync_call() uses it only as optional argument for push_indent() and pop_indent(), their default is four, and gen_sync_call()'s only caller passes four. Drop the parameter. gen_visitor_input_containers_decl()'s parameter obj is always "QOBJECT(args)". Use that, and drop the parameter. Drop unused parameters of gen_marshal_output(), gen_marshal_input_decl(), generate_visit_struct_body(), generate_visit_list(), generate_visit_enum(), generate_declaration(), generate_enum_declaration(), generate_decl_enum(). Drop unused variables in generate_event_enum_lookup(), generate_enum_lookup(), generate_visit_struct_fields(), check_event(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Reject -p arguments that break qapi-event.pyMarkus Armbruster2015-09-041-0/+6
| | | | | | | | | | | | | | | | qapi-event.py breaks when you ask for a funny prefix like '@'. Protect it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi-event: Clean up how name of enum QAPIEvent is madeMarkus Armbruster2015-09-043-6/+6
| | | | | | | | | | | | | | | | | | Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, which is an improvement in my book. Unbreaks prefix containing '.', but other funny characters remain broken. To be fixed next. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Simplify guardname()Markus Armbruster2015-09-041-7/+3
| | | | | | | | | | | | | | | | The guards around built-in declarations lose their _H. It never made much sense anyway. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Clean up cgen() and mcgen()Markus Armbruster2015-09-042-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 05dfb26 added eatspace stripping to mcgen(). Move it to cgen(), just in case somebody gets tempted to use cgen() directly instead of via mcgen(). cgen() indents blank lines. No such lines get generated right now, but fix it anyway. We use triple-quoted strings for program text, like this: ''' Program text any number of lines ''' Keeps the program text relatively readable, but puts an extra newline at either end. mcgen() "fixes" that by dropping the first and last line outright. Drop only the newlines. This unmasks a bug in qapi-commands.py: four quotes instead of three. Fix it up. Output doesn't change Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Clarify docs on including the same file multiple timesMarkus Armbruster2015-09-041-2/+2
|/ | | | | | | | | It's idempotent. While there, update examples to current code. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell2015-09-033-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | into staging # gpg: Signature made Thu 03 Sep 2015 15:46:52 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/tracing-pull-request: trace-events: Add hmp completion Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * trace-events: Add hmp completionDr. David Alan Gilbert2015-09-033-0/+22
| | | | | | | | | | | | | | | | | | Add completion for the trace event names in the hmp trace-event command. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-id: 1439548063-18410-1-git-send-email-dgilbert@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150903' into stagingPeter Maydell2015-09-0316-26/+736
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First batch of s390x patches for 2.5: - introduce 2.5 compat machine - support for migration of storage keys # gpg: Signature made Thu 03 Sep 2015 11:28:06 BST using RSA key ID C6F02FAF # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" * remotes/cohuck/tags/s390x-20150903: s390x: Disable storage key migration on old machine type s390x: Migrate guest storage keys (initial memory only) s390x: Info skeys sub-command s390x: Dump-skeys hmp support s390x: Dump storage keys qmp command s390x: Enable new s390-storage-keys device s390x: Create QOM device for s390 storage keys s390x: add 2.5 compat s390-ccw-virtio machine Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * s390x: Disable storage key migration on old machine typeJason J. Herne2015-09-033-3/+43
| | | | | | | | | | | | | | | | | | This code disables storage key migration when an older machine type is specified. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Migrate guest storage keys (initial memory only)Jason J. Herne2015-09-031-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | Routines to save/load guest storage keys are provided. register_savevm is called to register them as migration handlers. We prepare the protocol to support more complex parameters. So we will later be able to support standby memory (having empty holes), compression and "state live migration" like done for ram. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Info skeys sub-commandJason J. Herne2015-09-034-0/+36
| | | | | | | | | | | | | | | | | | | | Provide an info skeys hmp sub-command to allow the end user to dump a storage key for a given address. This is useful for guest operating system developers. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Dump-skeys hmp supportJason J. Herne2015-09-034-0/+34
| | | | | | | | | | | | | | | | | | Add dump-skeys command to the human monitor. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * s390x: Dump storage keys qmp commandJason J. Herne2015-09-034-2/+135
| | | | | | | | | | | | | | | | | | | | | | | | Provide a dump-skeys qmp command to allow the end user to dump storage keys. This is useful for debugging problems with guest storage key support within Qemu and for guest operating system developers. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * s390x: Enable new s390-storage-keys deviceJason J. Herne2015-09-037-24/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s390 guest initialization is modified to make use of new s390-storage-keys device. Old code that globally allocated storage key array is removed. The new device enables storage key access for kvm guests. Cache storage key QOM objects in frequently used helper functions to avoid a performance hit every time we use one of these functions. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
OpenPOWER on IntegriCloud