qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4a44d8: Convert stderr message calling error_


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4a44d8: Convert stderr message calling error_get_pretty() ...
Date: Thu, 22 Aug 2013 09:00:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4a44d85e28bd282f53ccf0fa933dd71b8744a229
      
https://github.com/qemu/qemu/commit/4a44d85e28bd282f53ccf0fa933dd71b8744a229
  Author: Seiji Aguchi <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M arch_init.c
    M hw/char/serial.c
    M hw/i386/pc.c
    M qemu-char.c
    M target-i386/cpu.c
    M target-ppc/translate_init.c
    M vl.c

  Log Message:
  -----------
  Convert stderr message calling error_get_pretty() to error_report()

Convert stderr messages calling error_get_pretty()
to error_report().

Timestamp is prepended by -msg timstamp option with it.

Per Markus's comment below, A conversion from fprintf() to
error_report() is always an improvement, regardless of
error_get_pretty().

http://marc.info/?l=qemu-devel&m=137513283408601&w=2

But, it is not reasonable to convert them at one time
because fprintf() is used everwhere in qemu.

So, it should be done step by step with avoiding regression.

Signed-off-by: Seiji Aguchi <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: d95704341280fc521dc2b16bbbc5858f6647e2c3
      
https://github.com/qemu/qemu/commit/d95704341280fc521dc2b16bbbc5858f6647e2c3
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: introduce basic list modes

We're going to need more state while processing a list of repeated
options. This change eliminates "repeated_opts_first" and adds a new state
variable:

  list_mode       repeated_opts  repeated_opts_first
  --------------  -------------  -------------------
  LM_NONE         NULL           false
  LM_STARTED      non-NULL       true
  LM_IN_PROGRESS  non-NULL       false

Additionally, it is documented that lookup_scalar() and processed(), both
called by opts_type_XXX(), are invalid in LM_STARTED -- generated qapi
code calls opts_next_list() to allocate the very first link before trying
to parse a scalar into it. List mode restrictions are expressed in
positive / inclusive form.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: d8754f40acb2d30e4735cdcd21a16e7ac29264a3
      
https://github.com/qemu/qemu/commit/d8754f40acb2d30e4735cdcd21a16e7ac29264a3
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: introduce list modes for interval flattening

The new modes are equal-rank, exclusive alternatives of LM_IN_PROGRESS.
Teach opts_next_list(), opts_type_int() and opts_type_uint64() to handle
them.

Also enumerate explicitly what functions are valid to call in what modes:
- opts_next_list() is valid to call while flattening a range,
- opts_end_list(): ditto,
- lookup_scalar() is invalid to call during flattening; generated qapi
  traversal code must continue asking for the same kind of signed/unsigned
  list element until the interval is fully flattened,
- processed(): ditto.

List mode restrictions are always formulated in positive / inclusive
sense. The restrictions for lookup_scalar() and processed() are
automatically satisfied by current qapi traversals if the schema to build
is compatible with OptsVisitor.

The new list modes are not entered yet.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 1e1c555a49175e2298eaa156e008a92d207bf812
      
https://github.com/qemu/qemu/commit/1e1c555a49175e2298eaa156e008a92d207bf812
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: opts_type_int(): recognize intervals when LM_IN_PROGRESS

When a well-formed range value, bounded by signed integers, is encountered
while processing a repeated option, enter LM_SIGNED_INTERVAL and return
the low bound.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 62d090e23fc17e4e60725ead0dff8902f8e66b52
      
https://github.com/qemu/qemu/commit/62d090e23fc17e4e60725ead0dff8902f8e66b52
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: rebase opts_type_uint64() to parse_uint_full()

Simplify the code in preparation for the next patch.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 581a8a800070500527f6c75e5d6b75134c2b5a9d
      
https://github.com/qemu/qemu/commit/581a8a800070500527f6c75e5d6b75134c2b5a9d
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: opts_type_uint64(): recognize intervals when LM_IN_PROGRESS

When a well-formed range value, bounded by unsigned integers, is
encountered while processing a repeated option, enter LM_UNSIGNED_INTERVAL
and return the low bound.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 15a849be100b54776bcf63193c3fea598666030f
      
https://github.com/qemu/qemu/commit/15a849be100b54776bcf63193c3fea598666030f
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M include/qapi/opts-visitor.h
    M qapi/opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: don't try to flatten overlong integer ranges

Prevent mistyped command line options from incurring high memory and CPU
usage at startup. 64K elements in a range should be enough for everyone
(TM).

The OPTS_VISITOR_RANGE_MAX macro is public so that unit tests can
construct corner cases with it.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 99351c8472f76552c059a5dd382860229d647c4f
      
https://github.com/qemu/qemu/commit/99351c8472f76552c059a5dd382860229d647c4f
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M .gitignore

  Log Message:
  -----------
  add "test-int128" and "test-bitops" to .gitignore

"test-int128" was probably missed in commit 6046c620
("int128: optimize and add test cases").

"test-bitops" was probably missed in commit 3464700f
("tests: Add test-bitops.c with some sextract tests").

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 3953e3a5d34fa7caffc3e32eae4270b2d810d966
      
https://github.com/qemu/qemu/commit/3953e3a5d34fa7caffc3e32eae4270b2d810d966
  Author: Laszlo Ersek <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M .gitignore
    M tests/Makefile
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    A tests/test-opts-visitor.c

  Log Message:
  -----------
  OptsVisitor: introduce unit tests, with test cases for range flattening

According to commit 4f193e34
("tests: Use qapi-schema-test.json as schema parser test")
the "tests/qapi-schema/qapi-schema-test.out" file must be updated as well.

Signed-off-by: Laszlo Ersek <address@hidden>
Tested-by: Wanlong Gao <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 277acfe8b38de35be8cb6e274678b5a7919c2d44
      
https://github.com/qemu/qemu/commit/277acfe8b38de35be8cb6e274678b5a7919c2d44
  Author: Fam Zheng <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: print the invalid char in error message

It's more friendly to print which char is invalid to user, especially
when user tries to input a float value and expect the monitor to round
it to int. Since we don't round float number when we look for a integer,
telling which char is invalid is less confusing.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 21e0043bada1a24ae2ba6cd0051e104c0cbf9634
      
https://github.com/qemu/qemu/commit/21e0043bada1a24ae2ba6cd0051e104c0cbf9634
  Author: Peter Maydell <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M scripts/qapi.py

  Log Message:
  -----------
  scripts/qapi.py: Avoid syntax not supported by Python 2.4

The Python "except Foo as x" syntax was only introduced in
Python 2.6, but we aim to support Python 2.4 and later.
Use the old-style "except Foo, x" syntax instead, thus
fixing configure/compile on systems with older Python.

Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: b6d9766ddf5453e79e0c66c9348728ba44ba115f
      
https://github.com/qemu/qemu/commit/b6d9766ddf5453e79e0c66c9348728ba44ba115f
  Author: Jia Liu <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M hw/openrisc/openrisc_sim.c

  Log Message:
  -----------
  hw/openrisc: Avoid using uninitialised variable 'entry'

clang warns that cpu_openrisc_load_kernel() can use 'entry' uninitialized:

hw/openrisc/openrisc_sim.c:69:9: error: variable 'entry' is used uninitialized
whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized]

    if (kernel_filename && !qtest_enabled()) {
  ^~~~~~~~~~~~~~~
hw/openrisc/openrisc_sim.c:91:19: note: uninitialized use occurs here
    cpu->env.pc = entry;
            ^~~~~

Fix this by not attempting to change the CPU's starting PC unless
we actually loaded a kernel.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Jia Liu <address@hidden>


  Commit: ed396e2b2d256c1628de7c11841b509455a76c03
      
https://github.com/qemu/qemu/commit/ed396e2b2d256c1628de7c11841b509455a76c03
  Author: Jia Liu <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M hw/openrisc/pic_cpu.c

  Log Message:
  -----------
  hw/openrisc: Fix masking in openrisc_pic_cpu_handler()

Consider the masking of PICSR and PICMR:

    ((cpu->env.picsr && (1 << i)) && (cpu->env.picmr && (1 << i)))

To correctly mask bits, we should use the bitwise AND "&" rather than
the logical AND "&&".  Also, the loop is not necessary for masking.
Simply use (cpu->env.picsr & cpu->env.picmr).

Signed-off-by: Xi Wang <address@hidden>
Acked-by: Jia Liu <address@hidden>


  Commit: 7717f248eebdcfe6de400404d0cf65dcb3633308
      
https://github.com/qemu/qemu/commit/7717f248eebdcfe6de400404d0cf65dcb3633308
  Author: Jia Liu <address@hidden>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M hw/openrisc/pic_cpu.c

  Log Message:
  -----------
  hw/openrisc: Avoid undefined shift in openrisc_pic_cpu_handler()

In C99 signed shift (1 << 31) is undefined behavior, since the result
exceeds INT_MAX.  Use 1U instead and move the shift after the check.

Signed-off-by: Xi Wang <address@hidden>
Acked-by: Jia Liu <address@hidden>


  Commit: 9fe480695ad8c9126ac8f318a0241e10aad7a25b
      
https://github.com/qemu/qemu/commit/9fe480695ad8c9126ac8f318a0241e10aad7a25b
  Author: Anthony Liguori <address@hidden>
  Date:   2013-08-22 (Thu, 22 Aug 2013)

  Changed paths:
    M hw/openrisc/openrisc_sim.c
    M hw/openrisc/pic_cpu.c

  Log Message:
  -----------
  Merge remote-tracking branch 'jliu/or32' into staging

# By Jia Liu
# Via Jia Liu
* jliu/or32:
  hw/openrisc: Avoid undefined shift in openrisc_pic_cpu_handler()
  hw/openrisc: Fix masking in openrisc_pic_cpu_handler()
  hw/openrisc: Avoid using uninitialised variable 'entry'

Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 5211333bf77d5199d5f27cd306b2798d90a4c8fc
      
https://github.com/qemu/qemu/commit/5211333bf77d5199d5f27cd306b2798d90a4c8fc
  Author: Anthony Liguori <address@hidden>
  Date:   2013-08-22 (Thu, 22 Aug 2013)

  Changed paths:
    M .gitignore
    M arch_init.c
    M hw/char/serial.c
    M hw/i386/pc.c
    M include/qapi/opts-visitor.h
    M monitor.c
    M qapi/opts-visitor.c
    M qemu-char.c
    M scripts/qapi.py
    M target-i386/cpu.c
    M target-ppc/translate_init.c
    M tests/Makefile
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    A tests/test-opts-visitor.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Laszlo Ersek (8) and others
# Via Luiz Capitulino
* luiz/queue/qmp:
  scripts/qapi.py: Avoid syntax not supported by Python 2.4
  monitor: print the invalid char in error message
  OptsVisitor: introduce unit tests, with test cases for range flattening
  add "test-int128" and "test-bitops" to .gitignore
  OptsVisitor: don't try to flatten overlong integer ranges
  OptsVisitor: opts_type_uint64(): recognize intervals when LM_IN_PROGRESS
  OptsVisitor: rebase opts_type_uint64() to parse_uint_full()
  OptsVisitor: opts_type_int(): recognize intervals when LM_IN_PROGRESS
  OptsVisitor: introduce list modes for interval flattening
  OptsVisitor: introduce basic list modes
  Convert stderr message calling error_get_pretty() to error_report()

Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/ecfe10c9a6f9...5211333bf77d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]