qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c0d67a: hw/core/qdev-properties: Use qemu_str


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] c0d67a: hw/core/qdev-properties: Use qemu_strtol() in set_...
Date: Thu, 08 Oct 2020 07:30:42 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c0d67ade53a6db090a1c17676ffcdcf16052dfb4
      
https://github.com/qemu/qemu/commit/c0d67ade53a6db090a1c17676ffcdcf16052dfb4
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

The MACAddr structure contains an array of uint8_t. Previously
if a value was out of the [0..255] range, it was silently casted
and no input validation was done.
Replace strtol() by qemu_strtol() -- so checkpatch.pl won't
complain if we move this code later -- and return EINVAL if the
input is invalid.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-3-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: bccb20c49df1bd683248a366021973901c11982f
      
https://github.com/qemu/qemu/commit/bccb20c49df1bd683248a366021973901c11982f
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()

Replace strtoul() by qemu_strtoul() so checkpatch.pl won't complain
if we move this code later.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-4-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 9ee468f3295e080abe8aed6ffddc339a94590d65
      
https://github.com/qemu/qemu/commit/9ee468f3295e080abe8aed6ffddc339a94590d65
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Fix code style

We will soon move this code, fix its style to avoid checkpatch.pl
to complain.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-5-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: a2974439ada0a3eda1fed7d80c8670ce94cbceef
      
https://github.com/qemu/qemu/commit/a2974439ada0a3eda1fed7d80c8670ce94cbceef
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    A hw/core/qdev-prop-internal.h
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Export enum-related functions

We are going to split this file and reuse these static functions.
Add the local "qdev-prop-internal.h" header declaring them.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-6-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 79bdf29c08a592a4c5d2f9b7bb462e71ee568988
      
https://github.com/qemu/qemu/commit/79bdf29c08a592a4c5d2f9b7bb462e71ee568988
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-properties.c
    M include/hw/qdev-properties.h

  Log Message:
  -----------
  hw/core/qdev-properties: Export qdev_prop_enum

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-7-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 93e163e4ef9e714830c5a84a8ac554fa41fed7b5
      
https://github.com/qemu/qemu/commit/93e163e4ef9e714830c5a84a8ac554fa41fed7b5
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-prop-internal.h
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Export some integer-related functions

We are going to split this file and reuse these static functions.
Declare them in the local "qdev-prop-internal.h" header.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-8-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: aa1859cc77df9f547cded0b906a0c47f1760be2b
      
https://github.com/qemu/qemu/commit/aa1859cc77df9f547cded0b906a0c47f1760be2b
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  hw/core/qdev-properties: Extract system-mode specific properties

Move properties specific to machines into a separate file.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930164949.1425294-9-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 4a795202ec7deba1b2c251af85192cc8231f9370
      
https://github.com/qemu/qemu/commit/4a795202ec7deba1b2c251af85192cc8231f9370
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/cpu.c

  Log Message:
  -----------
  hw/core/cpu: Add missing 'exec/cpu-common.h' include

cpu_common_reset() uses tcg_flush_softmmu_tlb() which is
declared in "exec/cpu-common.h". Add the missing header
to avoid when refactoring other headers:

  hw/core/cpu.c: In function ‘cpu_common_reset’:
  hw/core/cpu.c:273:9: error: implicit declaration of function 
‘tcg_flush_softmmu_tlb’ [-Werror=implicit-function-declaration]
    273 |         tcg_flush_softmmu_tlb(cpu);
        |         ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200908123433.105706-1-philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 4d9c7c8471267d981843cf0a86bea2c28e2f0a4b
      
https://github.com/qemu/qemu/commit/4d9c7c8471267d981843cf0a86bea2c28e2f0a4b
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M qom/object.c

  Log Message:
  -----------
  qom: Improve error message displayed with missing object properties

Instead of only displaying the property missing, also display
the object name. This help developer to quickly figure out the
mistake without opening a debugger.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200920155340.401482-1-f4bug@amsat.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: d5b9959dd7714e8451608f3ccb58f13b9e7d3147
      
https://github.com/qemu/qemu/commit/d5b9959dd7714e8451608f3ccb58f13b9e7d3147
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M include/qom/object.h

  Log Message:
  -----------
  qom: Fix DECLARE_*CHECKER documentation

Correct copy/paste mistake in the DECLARE_INSTANCE_CHECKER and
DECLARE_CLASS_CHECKERS documentation.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 258c732769038b5c67ba572523961246651c6583
      
https://github.com/qemu/qemu/commit/258c732769038b5c67ba572523961246651c6583
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M docs/devel/qom.rst

  Log Message:
  -----------
  docs/devel/qom: Fix indentation of bulleted list

The list was incorrectly parsed as a literal block due to
indentation.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 671b3db0562e3c24e6823b68747bc4be5a8e6d78
      
https://github.com/qemu/qemu/commit/671b3db0562e3c24e6823b68747bc4be5a8e6d78
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M docs/devel/qom.rst

  Log Message:
  -----------
  docs/devel/qom: Fix indentation of code blocks

Some code blocks had one extra space, fix that.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: acc34c2144deb12d4f1968efb3fd64b40f5e1142
      
https://github.com/qemu/qemu/commit/acc34c2144deb12d4f1968efb3fd64b40f5e1142
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M docs/devel/qom.rst

  Log Message:
  -----------
  docs/devel/qom: Use *emphasis* for emphasis

<emphasis> is not valid reST syntax.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-5-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: b99e80cb0f773ae3c339b3f5b99f2d4283494c1a
      
https://github.com/qemu/qemu/commit/b99e80cb0f773ae3c339b3f5b99f2d4283494c1a
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M include/qom/object.h

  Log Message:
  -----------
  docs/devel/qom: Remove usage of <code>

<code> is not valid reST syntax.

Function @argument references don't need additional markup, so
just remove <code></code>.

Constants were changed to use reST ``code`` syntax

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 38a0d5bcdec74a3937a66a97179aeb7910aa0d4a
      
https://github.com/qemu/qemu/commit/38a0d5bcdec74a3937a66a97179aeb7910aa0d4a
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M docs/devel/qom.rst

  Log Message:
  -----------
  docs/devel/qom: Avoid long lines

Long code lines don't look good in the rendered documents, make
them shorter.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003025424.199291-7-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 19ab6044be0c55d529e875e3ee16fdd5c3b54d33
      
https://github.com/qemu/qemu/commit/19ab6044be0c55d529e875e3ee16fdd5c3b54d33
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: Handle function typedefs that return pointers

One example that was not being parsed correctly by kernel-doc is:

  typedef Object *(ObjectPropertyResolve)(Object *obj,
                                          void *opaque,
                                          const char *part);

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 3cd3c5193cde5242e243c25759f85802e267994f
      
https://github.com/qemu/qemu/commit/3cd3c5193cde5242e243c25759f85802e267994f
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: Handle function typedefs without asterisks

Example of typedef that was not parsed by kernel-doc:

  typedef void (ObjectUnparent)(Object *obj);

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: ff59780f8d710fdf7f409058bb69e4f23141b654
      
https://github.com/qemu/qemu/commit/ff59780f8d710fdf7f409058bb69e4f23141b654
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M include/qom/object.h

  Log Message:
  -----------
  qom: Explicitly tag doc comments for typedefs and structs

If we explicitly indicate we are documenting a typedef or a
struct, we'll be able to remove the $decl_type='type name' hack
from kernel-doc.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 301302f06794f78191ac371646776f1bc6b19d73
      
https://github.com/qemu/qemu/commit/301302f06794f78191ac371646776f1bc6b19d73
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M include/exec/memory.h

  Log Message:
  -----------
  memory: Explicitly tag doc comments for structs

This will allow us to remove the QEMU-specific
$decl_type='type name' hack from the kernel-doc script.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-5-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: eb4c9775089f355db9cb6292a947aa5cba6c380b
      
https://github.com/qemu/qemu/commit/eb4c9775089f355db9cb6292a947aa5cba6c380b
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M scripts/kernel-doc

  Log Message:
  -----------
  kernel-doc: Remove $decl_type='type name' hack

The $decl_type='type name' hack makes it impossible to document
macros with uppercase names (e.g. most of the macros in
object.h).

Now that we have explicitly tagged the struct and typedef doc
comments in memory.h and object.h, we don't need that hack
anymore.  This will make the documentation for the macros in
object.h finally be rendered as expected.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 1b5e843ab68c4afa611da22f303a5b0daa979ad8
      
https://github.com/qemu/qemu/commit/1b5e843ab68c4afa611da22f303a5b0daa979ad8
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M hw/core/numa.c

  Log Message:
  -----------
  numa: hmat: require parent cache description before the next level one

Spec[1] defines 0 - 3 level memory side cache, however QEMU
CLI allows to specify an intermediate cache level without
specifying previous level. Such option(s) silently ignored
when building HMAT table, which leads to incomplete cache
information.
Make sure that previous level exists and error out
if it hasn't been provided.

1) ACPI 6.2A 5.2.27.5 Memory Side Cache Information Structure

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1842877
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20201006150002.1601845-1-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: a1d22c668a7662289b42624fe2aa92c9a23df1d2
      
https://github.com/qemu/qemu/commit/a1d22c668a7662289b42624fe2aa92c9a23df1d2
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M docs/devel/qom.rst
    M hw/core/cpu.c
    M hw/core/numa.c
    A hw/core/qdev-prop-internal.h
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M include/exec/memory.h
    M include/hw/qdev-properties.h
    M include/qom/object.h
    M qom/object.c
    M scripts/kernel-doc

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/ehabkost/tags/machine-next-pull-request' into staging

machine + QOM queue, 2020-10-06

* QOM documentation fixes and cleanups (Eduardo Habkost)
* user-mode: Prune build dependencies (Philippe Mathieu-Daudé)
* qom: Improve error message (Philippe Mathieu-Daudé)
* numa: hmat: require parent cache description before the next
  level one (Igor Mammedov)

# gpg: Signature made Tue 06 Oct 2020 23:09:03 BST
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-next-pull-request: (21 commits)
  numa: hmat: require parent cache description before the next level one
  kernel-doc: Remove $decl_type='type name' hack
  memory: Explicitly tag doc comments for structs
  qom: Explicitly tag doc comments for typedefs and structs
  kernel-doc: Handle function typedefs without asterisks
  kernel-doc: Handle function typedefs that return pointers
  docs/devel/qom: Avoid long lines
  docs/devel/qom: Remove usage of <code>
  docs/devel/qom: Use *emphasis* for emphasis
  docs/devel/qom: Fix indentation of code blocks
  docs/devel/qom: Fix indentation of bulleted list
  qom: Fix DECLARE_*CHECKER documentation
  qom: Improve error message displayed with missing object properties
  hw/core/cpu: Add missing 'exec/cpu-common.h' include
  hw/core/qdev-properties: Extract system-mode specific properties
  hw/core/qdev-properties: Export some integer-related functions
  hw/core/qdev-properties: Export qdev_prop_enum
  hw/core/qdev-properties: Export enum-related functions
  hw/core/qdev-properties: Fix code style
  hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/6eeea6725a70...a1d22c668a76



reply via email to

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