qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 83ecb2: scripts/qapi-types.py: Add dummy memb


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 83ecb2: scripts/qapi-types.py: Add dummy member to empty s...
Date: Tue, 20 Jan 2015 10:00:09 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 83ecb22ba2c91a4674ae109595a8ed1da8de4d7a
      
https://github.com/qemu/qemu/commit/83ecb22ba2c91a4674ae109595a8ed1da8de4d7a
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M scripts/qapi-types.py

  Log Message:
  -----------
  scripts/qapi-types.py: Add dummy member to empty structs

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: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden


  Commit: ec53b45bcd1f74f7a4c31331fa6d50b402cd6d26
      
https://github.com/qemu/qemu/commit/ec53b45bcd1f74f7a4c31331fa6d50b402cd6d26
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M exec.c
    M linux-user/main.c
    M target-alpha/cpu.h
    M target-arm/cpu.h
    M target-cris/cpu.h
    M target-i386/cpu.h
    M target-lm32/cpu.h
    M target-m68k/cpu.h
    M target-microblaze/cpu.h
    M target-mips/cpu.h
    M target-moxie/cpu.h
    M target-ppc/cpu.h
    M target-s390x/cpu.h
    M target-sh4/cpu.h
    M target-sparc/cpu.h
    M target-xtensa/cpu.h
    M translate-all.c

  Log Message:
  -----------
  exec.c: Drop TARGET_HAS_ICE define and checks

The TARGET_HAS_ICE #define is intended to indicate whether a target-*
guest CPU implementation supports the breakpoint handling. However,
all our guest CPUs have that support (the only two which do not
define TARGET_HAS_ICE are unicore32 and openrisc, and in both those
cases the bp support is present and the lack of the #define is just
a bug). So remove the #define entirely: all new guest CPU support
should include breakpoint handling as part of the basic implementation.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden


  Commit: 0c021c1fd2c4ec3c68c59232ccee012c067bc682
      
https://github.com/qemu/qemu/commit/0c021c1fd2c4ec3c68c59232ccee012c067bc682
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  cpu_ldst.h: Remove unused ldul_ macros

The five ldul_ macros are not used anywhere and are marked up with an XXX
comment. "ldul" is a non-standard prefix for our family of load instructions:
we don't mark 32-bit accesses for signedness because they return a 32 bit
quantity. So just delete them.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden


  Commit: 24e60305c5839eccf4b915411215b412fb34c52b
      
https://github.com/qemu/qemu/commit/24e60305c5839eccf4b915411215b412fb34c52b
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor.c: Use ld*_p() instead of ld*_raw()

The monitor code for doing a memory_dump() was using ld*_raw() to do
target-CPU accesses out of a local buf[] array. The correct functions
for this purpose are ld*_p(), which take a host pointer, rather than
ld*_raw(), which take an integer representing a guest address and
are somewhat meaningless in softmmu configurations. Nobody noticed
because for softmmu the _raw functions are the same as ldl_p but
with some extra casts thrown in. Switch to using the correct functions
instead.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: eb513f82f04fab442cdef9db698dafc852275f7f
      
https://github.com/qemu/qemu/commit/eb513f82f04fab442cdef9db698dafc852275f7f
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M target-sparc/ldst_helper.c

  Log Message:
  -----------
  target-sparc: Don't use {ld, st}*_raw functions

Instead of using the _raw family of ld/st accessor functions, use
cpu_*_data. All this code is CONFIG_USER_ONLY, so the two are the
same semantically, but the _raw functions are really a detail of
the implementation which has leaked into a few callsites like this one.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 2ccf97ec0f1b7a62a3220064f305454f3932c55a
      
https://github.com/qemu/qemu/commit/2ccf97ec0f1b7a62a3220064f305454f3932c55a
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user/elfload.c: Don't use _raw accessor functions

The _raw accessor functions are an implementation detail that has
leaked out to some callsites. Use get_user_u64() instead of ldq_raw().

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: b8d6ac9f90d047cbc8e06366ae33b71ea9c5232c
      
https://github.com/qemu/qemu/commit/b8d6ac9f90d047cbc8e06366ae33b71ea9c5232c
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M bsd-user/elfload.c

  Log Message:
  -----------
  bsd-user/elfload.c: Don't use ldl() or ldq_raw()

Use get_user_u64() and get_user_ual() instead of the ldl() and
ldq_raw() functions.

[Note that this change is not compile tested as it is actually
in dead code -- none of the bsd-user configurations are PPC.]

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 5899d6d0b4cae1a0ff7487b635eee4d9db1a2a7c
      
https://github.com/qemu/qemu/commit/5899d6d0b4cae1a0ff7487b635eee4d9db1a2a7c
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M linux-user/vm86.c

  Log Message:
  -----------
  linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c

Use the cpu_ld*_data and cpu_st*_data family of functions to access
guest memory in vm86.c rather than the very short-named ldl/stl functions.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: d8d5119cae38da090b7a76f22cecc8088691ab49
      
https://github.com/qemu/qemu/commit/d8d5119cae38da090b7a76f22cecc8088691ab49
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M linux-user/main.c

  Log Message:
  -----------
  linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop

In the m68k cpu_loop() use get_user_u16 to read the immediate for
the simcall rahter than lduw, to bring it into line with how other
archs do it and to remove another user of the ldl family of functions.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 15353001197c413f3ddebd51152a514dce08c458
      
https://github.com/qemu/qemu/commit/15353001197c413f3ddebd51152a514dce08c458
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M target-mips/op_helper.c

  Log Message:
  -----------
  target-mips: Don't use _raw load/store accessors

Use cpu_*_data instead of the direct *_raw load/store accessors.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 5a0826f7d2f9bea6e02157985b103d0a4c458aaa
      
https://github.com/qemu/qemu/commit/5a0826f7d2f9bea6e02157985b103d0a4c458aaa
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  cpu_ldst.h: Drop unused ld/st*_kernel defines

The ld*_kernel and st*_kernel defines are not used anywhere;
delete them.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 177ea79f65c90b3bc84d59565b7519e47ea02f63
      
https://github.com/qemu/qemu/commit/177ea79f65c90b3bc84d59565b7519e47ea02f63
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  cpu_ldst.h: Remove unused very short ld*/st* defines

The very short ld*/st* defines are now not used anywhere; delete them.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 9220fe54c679d145232a28df6255e166ebf91bab
      
https://github.com/qemu/qemu/commit/9220fe54c679d145232a28df6255e166ebf91bab
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h
    A include/exec/cpu_ldst_useronly_template.h
    M target-i386/seg_helper.c

  Log Message:
  -----------
  cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors

Use inline functions rather than macros for cpu_ld/st accessors
for the *-user configurations, as we already do for softmmu.
This has a two advantages:
 * we can actually typecheck our arguments
 * we don't need to leak the _raw macros everywhere

Since the _kernel functions were only used by target-i386/seg_helper.c,
put the definitions for them in that file too. (It already has the
similar template include code to define them for the softmmu case,
so it makes sense to have it deal with defining them for user-only.)

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 355392329e4a843580e53cb027ed85e0cbebb640
      
https://github.com/qemu/qemu/commit/355392329e4a843580e53cb027ed85e0cbebb640
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst_template.h

  Log Message:
  -----------
  cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros

The ld*_raw and st*_raw macros are now only used within the code
produced by cpu_ldst_template.h, and only in three places.
Expand these out to just call the ld_p and st_p functions directly.

Note that in all the callsites the address argument is a uintptr_t,
so we can drop that part of the double-cast used in the saddr() and
laddr() macros.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 800e2ecc896beb6b79e7333c762da163b6a9135a
      
https://github.com/qemu/qemu/commit/800e2ecc896beb6b79e7333c762da163b6a9135a
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  cpu_ldst.h: Drop unused _raw macros, saddr() and laddr()

The _raw macros and their helpers saddr() and laddr() are now
totally unused -- delete them.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: 82f11917c99e3c7fa3d6aa98572ecc98c7324c2f
      
https://github.com/qemu/qemu/commit/82f11917c99e3c7fa3d6aa98572ecc98c7324c2f
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst_template.h

  Log Message:
  -----------
  cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors

The cpu_ldfq/stfq/ldfl/stfl accessors for loading and storing
float32 and float64 are completely unused, so delete them.
(The union they use for converting from the float32/float64
type to uint32_t or uint64_t is the wrong way to do it anyway:
they should be using make_float* and float*_val.)

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: db5fd8d709fd57f4d4f11edfca9f421f657f4508
      
https://github.com/qemu/qemu/commit/db5fd8d709fd57f4d4f11edfca9f421f657f4508
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu-all.h
    M include/exec/cpu_ldst.h
    M include/qemu/bswap.h

  Log Message:
  -----------
  cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors

Add documentation of what the cpu_*_* accessors look like.
Correct some minor errors in the existing documentation of the
direct _p accessor family. Remove the near-duplicate comment
on the _p accessors from cpu-all.h and replace it with a reference
to the comment in bswap.h.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: de5ee4a888667ca0a198f0743d70075d70564117
      
https://github.com/qemu/qemu/commit/de5ee4a888667ca0a198f0743d70075d70564117
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined

Not all targets define a full set of suffix strings for the
NB_MMU_MODES that they have. In this situation, don't define any
helper functions for that mode, rather than defining helper functions
with no suffix at all. The MMU mode is still functional; it is merely
not directly accessible via cpu_ld*_MODE from target helper functions.

Also add an "NB_MMU_MODES >= 2" check to the definition of the mode 1
helpers -- some targets only define one MMU mode.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden


  Commit: 699eae17b841e6784dc3864bf357e26bff1e9dfe
      
https://github.com/qemu/qemu/commit/699eae17b841e6784dc3864bf357e26bff1e9dfe
  Author: Peter Maydell <address@hidden>
  Date:   2015-01-20 (Tue, 20 Jan 2015)

  Changed paths:
    M bsd-user/elfload.c
    M exec.c
    M include/exec/cpu-all.h
    M include/exec/cpu_ldst.h
    M include/exec/cpu_ldst_template.h
    A include/exec/cpu_ldst_useronly_template.h
    M include/qemu/bswap.h
    M linux-user/elfload.c
    M linux-user/main.c
    M linux-user/vm86.c
    M monitor.c
    M scripts/qapi-types.py
    M target-alpha/cpu.h
    M target-arm/cpu.h
    M target-cris/cpu.h
    M target-i386/cpu.h
    M target-i386/seg_helper.c
    M target-lm32/cpu.h
    M target-m68k/cpu.h
    M target-microblaze/cpu.h
    M target-mips/cpu.h
    M target-mips/op_helper.c
    M target-moxie/cpu.h
    M target-ppc/cpu.h
    M target-s390x/cpu.h
    M target-sh4/cpu.h
    M target-sparc/cpu.h
    M target-sparc/ldst_helper.c
    M target-xtensa/cpu.h
    M translate-all.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20150120' into 
staging

Miscellaneous cross-tree patches:
 * load/store helper cleanup
 * drop TARGET_HAS_ICE define and checks
 * scripts/qapi-types.py: Add dummy member to empty structs
 * cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined

# gpg: Signature made Tue 20 Jan 2015 15:43:38 GMT using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <address@hidden>"

* remotes/pmaydell/tags/pull-misc-20150120:
  cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined
  cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors
  cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors
  cpu_ldst.h: Drop unused _raw macros, saddr() and laddr()
  cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros
  cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors
  cpu_ldst.h: Remove unused very short ld*/st* defines
  cpu_ldst.h: Drop unused ld/st*_kernel defines
  target-mips: Don't use _raw load/store accessors
  linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop
  linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c
  bsd-user/elfload.c: Don't use ldl() or ldq_raw()
  linux-user/elfload.c: Don't use _raw accessor functions
  target-sparc: Don't use {ld, st}*_raw functions
  monitor.c: Use ld*_p() instead of ld*_raw()
  cpu_ldst.h: Remove unused ldul_ macros
  exec.c: Drop TARGET_HAS_ICE define and checks
  scripts/qapi-types.py: Add dummy member to empty structs

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


Compare: https://github.com/qemu/qemu/compare/a5bd4470ed34...699eae17b841

reply via email to

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