Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some occurrences of -Wshadow=local #87

Closed
wants to merge 218 commits into from

Commits on Sep 26, 2023

  1. simpletrace: add __all__ to define public interface

    It was unclear what was the supported public interface. I.e. when
    refactoring the code, what functions/classes are important to retain.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    2c109f2 View commit details
    Browse the repository at this point in the history
  2. simpletrace: annotate magic constants from QEMU code

    It wasn't clear where the constants and structs came from, so I added
    comments to help.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    8405ec6 View commit details
    Browse the repository at this point in the history
  3. simpletrace: improve parsing of sys.argv; fix files never closed.

    The arguments extracted from `sys.argv` named and unpacked to make it
    clear what the arguments are and what they're used for.
    
    The two input files were opened, but never explicitly closed. File usage
    changed to use `with` statement to take care of this. At the same time,
    ownership of the file-object is moved up to `run` function. Added option
    to process to support file-like objects.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    f7bd4f0 View commit details
    Browse the repository at this point in the history
  4. simpletrace: changed naming of edict and idtoname to improve readability

    Readability is subjective, but I've expanded the naming of the variables
    and arguments, to help with understanding for new eyes on the code.
    
    Signed-off-by: Mads Ynddal <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    3b71b61 View commit details
    Browse the repository at this point in the history
  5. simpletrace: update code for Python 3.11

    The call to `getargspec` was deprecated and in Python 3.11 it has been
    removed in favor of `getfullargspec`. `getfullargspec` is compatible
    with QEMU's requirement of at least Python version 3.6.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ce96eb3 View commit details
    Browse the repository at this point in the history
  6. simpletrace: improved error handling on struct unpack

    A failed call to `read_header` wouldn't be handled the same for the two
    different code paths (one path would try to use `None` as a list).
    Changed to raise exception to be handled centrally. This also allows for
    easier unpacking, as errors has been filtered out.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    d1f9259 View commit details
    Browse the repository at this point in the history
  7. simpletrace: define exception and add handling

    Define `SimpleException` to differentiate our exceptions from generic
    exceptions (IOError, etc.). Adapted simpletrace to support this and
    output to stderr.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    1990fb9 View commit details
    Browse the repository at this point in the history
  8. simpletrace: made Analyzer into context-manager

    Instead of explicitly calling `begin` and `end`, we can change the class
    to use the context-manager paradigm. This is mostly a styling choice,
    used in modern Python code. But it also allows for more advanced analyzers
    to handle exceptions gracefully in the `__exit__` method (not
    demonstrated here).
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    87617b9 View commit details
    Browse the repository at this point in the history
  9. simpletrace: refactor to separate responsibilities

    Moved event_mapping and event_id_to_name down one level in the function
    call-stack to keep variable instantiation and usage closer (`process`
    and `run` has no use of the variables; `read_trace_records` does).
    
    Instead of passing event_mapping and event_id_to_name to the bottom of
    the call-stack, we move their use to `read_trace_records`. This
    separates responsibility and ownership of the information.
    
    `read_record` now just reads the arguments from the file-object by
    knowning the total number of bytes. Parsing it to specific arguments is
    moved up to `read_trace_records`.
    
    Special handling of dropped events removed, as they can be handled
    by the general code.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    6f53641 View commit details
    Browse the repository at this point in the history
  10. simpletrace: move logic of process into internal function

    To avoid duplicate code depending on input types and to better handle
    open/close of log with a context-manager, we move the logic of process into
    _process.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    b78234e View commit details
    Browse the repository at this point in the history
  11. simpletrace: move event processing to Analyzer class

    Moved event processing to the Analyzer class to separate specific analyzer
    logic (like caching and function signatures) from the _process function.
    This allows for new types of Analyzer-based subclasses without changing
    the core code.
    
    Note, that the fn_cache is important for performance in cases where the
    analyzer is branching away from the catch-all a lot. The cache has no
    measurable performance penalty.
    
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    d1f89c2 View commit details
    Browse the repository at this point in the history
  12. simpletrace: added simplified Analyzer2 class

    By moving the dynamic argument construction to keyword-arguments,
    we can remove all of the specialized handling, and streamline it.
    If a tracing method wants to access these, they can define the
    kwargs, or ignore it be placing `**kwargs` at the end of the
    function's arguments list.
    
    Added deprecation warning to Analyzer class to make users aware
    of the Analyzer2 class. No removal date is planned.
    
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    3470fef View commit details
    Browse the repository at this point in the history
  13. MAINTAINERS: add maintainer of simpletrace.py

    In my work to refactor simpletrace.py, I noticed that there's no
    maintainer of it, and has the status of "odd fixes". I'm using it from
    time to time, so I'd like to maintain the script.
    
    I've added myself as reviewer under "Tracing" to be informed of changes
    that might affect simpletrace.py.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    8419726 View commit details
    Browse the repository at this point in the history
  14. scripts/analyse-locks-simpletrace.py: changed iteritems() to items()

    Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
    means the script currently doesn't work on Python 3.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Signed-off-by: Mads Ynddal <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    Baekalfen authored and stefanhaRH committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ff01470 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. tests/tcg/tricore: Bump cpu to tc37x

    we don't want to exclude ISA v1.6.2 insns from our tests.
    
    Acked-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-Id: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    d97fa9a View commit details
    Browse the repository at this point in the history
  2. target/tricore: Implement CRCN insn

    reported in https://gitlab.com/qemu-project/qemu/-/issues/1667
    
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    3e2a510 View commit details
    Browse the repository at this point in the history
  3. target/tricore: Correctly handle FPU RM from PSW

    when we reconstructed PSW using psw_read(), we were trying to clear the
    cached USB bits out of env->PSW. The mask was wrong and we would clear
    PSW.RM as well.
    
    when we write the PSW using psw_write() we update the rounding modes in
    env->fp_status for softfloat. The order of bits used by TriCore is not
    the one used by softfloat.
    
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    ce64bab View commit details
    Browse the repository at this point in the history
  4. target/tricore: Implement FTOU insn

    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    2bdbe35 View commit details
    Browse the repository at this point in the history
  5. target/tricore: Clarify special case for FTOUZ insn

    this is not something other ISAs do, so clarify it with a comment.
    
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    e43692b View commit details
    Browse the repository at this point in the history
  6. target/tricore: Implement ftohp insn

    reported in https://gitlab.com/qemu-project/qemu/-/issues/1667
    
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    815061b View commit details
    Browse the repository at this point in the history
  7. target/tricore: Implement hptof insn

    Reviewed-by: Richard Henderson <[email protected]>
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1667
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    5e0e06d View commit details
    Browse the repository at this point in the history
  8. target/tricore: Fix RCPW/RRPW_INSERT insns for width = 0

    we would crash if width was 0 for these insns, as tcg_gen_deposit() is
    undefined for that case. For TriCore, width = 0 is a mov from the src reg
    to the dst reg, so we special case this here.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    23fa6f5 View commit details
    Browse the repository at this point in the history
  9. target/tricore: Swap src and dst reg for RCRR_INSERT

    Acked-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    222ff2d View commit details
    Browse the repository at this point in the history
  10. target/tricore: Replace cpu_*_code with translator_*

    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    1f22db1 View commit details
    Browse the repository at this point in the history
  11. target/tricore: Fix FTOUZ being ISA v1.3.1 up

    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    4f79db4 View commit details
    Browse the repository at this point in the history
  12. tests/tcg/tricore: Extended and non-extened regs now match

    RSx for d regs and e regs now use the same numbering. This makes sure
    that mixing d and e registers in an insn test will not overwrite data
    between registers.
    
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    8c3cf3f View commit details
    Browse the repository at this point in the history
  13. accel/tcg: Avoid load of icount_decr if unused

    With CF_NOIRQ and without !CF_USE_ICOUNT, the load isn't used.
    Avoid emitting it.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    f47a90d View commit details
    Browse the repository at this point in the history
  14. accel/tcg: Hoist CF_MEMI_ONLY check outside translation loop

    The condition checked is loop invariant; check it only once.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    5d97e94 View commit details
    Browse the repository at this point in the history
  15. accel/tcg: Track current value of can_do_io in the TB

    Simplify translator_io_start by recording the current
    known value of can_do_io within DisasContextBase.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    0ca41cc View commit details
    Browse the repository at this point in the history
  16. accel/tcg: Improve setting of can_do_io at start of TB

    Initialize can_do_io to true if this the TB has CF_LAST_IO
    and will consist of a single instruction.  This avoids a
    set to 0 followed immediately by a set to 1.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    a2f99d4 View commit details
    Browse the repository at this point in the history
  17. accel/tcg: Always set CF_LAST_IO with CF_NOIRQ

    Without this we can get see loops through cpu_io_recompile,
    in which the cpu makes no progress.
    
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    200c1f9 View commit details
    Browse the repository at this point in the history
  18. accel/tcg: Always require can_do_io

    Require i/o as the last insn of a TranslationBlock always,
    not only with icount.  This is required for i/o that alters
    the address space, such as a pci config space write.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1866
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Richard Henderson <[email protected]>
    rth7680 committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    18a536f View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. migration/rdma: Fix save_page method to fail on polling error

    qemu_rdma_save_page() reports polling error with error_report(), then
    succeeds anyway.  This is because the variable holding the polling
    status *shadows* the variable the function returns.  The latter
    remains zero.
    
    Broken since day one, and duplicated more recently.
    
    Fixes: 2da776d (rdma: core logic)
    Fixes: b390afd (migration/rdma: Fix out of order wrid)
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Eric Blake <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Li Zhijian <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    bbde656 View commit details
    Browse the repository at this point in the history
  2. migration: Clean up local variable shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Tracked down with -Wshadow=local.
    Clean up: delete inner declarations when they are actually redundant,
    else rename variables.
    
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Li Zhijian <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    7f3de3f View commit details
    Browse the repository at this point in the history
  3. ui: Clean up local variable shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Tracked down with -Wshadow=local.
    Clean up: delete inner declarations when they are actually redundant,
    else rename variables.
    
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e33e66b View commit details
    Browse the repository at this point in the history
  4. block/dirty-bitmap: Clean up local variable shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Tracked down with -Wshadow=local.
    Clean up: rename both the pair of parameters and the pair of local
    variables.  While there, move the local variables to function scope.
    
    Suggested-by: Kevin Wolf <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Kevin Wolf <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    6a0f7ff View commit details
    Browse the repository at this point in the history
  5. block/vdi: Clean up local variable shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Tracked down with -Wshadow=local.
    Clean up: delete inner declarations when they are actually redundant,
    else rename variables.
    
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Reviewed-by: Kevin Wolf <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    d25b99c View commit details
    Browse the repository at this point in the history
  6. block: Clean up local variable shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Tracked down with -Wshadow=local.
    Clean up: delete inner declarations when they are actually redundant,
    else rename variables.
    
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Stefan Hajnoczi <[email protected]>
    Acked-by: Anthony PERARD <[email protected]>
    Acked-by: Ilya Dryomov <[email protected]>
    Reviewed-by: Kevin Wolf <[email protected]>
    Message-ID: <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    fb2575f View commit details
    Browse the repository at this point in the history
  7. qobject atomics osdep: Make a few macros more hygienic

    Variables declared in macros can shadow other variables.  Much of the
    time, this is harmless, e.g.:
    
        #define _FDT(exp)                                                  \
            do {                                                           \
                int ret = (exp);                                           \
                if (ret < 0) {                                             \
                    error_report("error creating device tree: %s: %s",   \
                            #exp, fdt_strerror(ret));                      \
                    exit(1);                                               \
                }                                                          \
            } while (0)
    
    Harmless shadowing in h_client_architecture_support():
    
            target_ulong ret;
    
            [...]
    
            ret = do_client_architecture_support(cpu, spapr, vec, fdt_bufsize);
            if (ret == H_SUCCESS) {
                _FDT((fdt_pack(spapr->fdt_blob)));
                [...]
            }
    
            return ret;
    
    However, we can get in trouble when the shadowed variable is used in a
    macro argument:
    
        #define QOBJECT(obj) ({                                 \
            typeof(obj) o = (obj);                              \
            o ? container_of(&(o)->base, QObject, base) : NULL; \
         })
    
    QOBJECT(o) expands into
    
        ({
    --->    typeof(o) o = (o);
            o ? container_of(&(o)->base, QObject, base) : NULL;
        })
    
    Unintended variable name capture at --->.  We'd be saved by
    -Winit-self.  But I could certainly construct more elaborate death
    traps that don't trigger it.
    
    To reduce the risk of trapping ourselves, we use variable names in
    macros that no sane person would use elsewhere.  Here's our actual
    definition of QOBJECT():
    
        #define QOBJECT(obj) ({                                         \
            typeof(obj) _obj = (obj);                                   \
            _obj ? container_of(&(_obj)->base, QObject, base) : NULL;   \
        })
    
    Works well enough until we nest macro calls.  For instance, with
    
        #define qobject_ref(obj) ({                     \
            typeof(obj) _obj = (obj);                   \
            qobject_ref_impl(QOBJECT(_obj));            \
            _obj;                                       \
        })
    
    the expression qobject_ref(obj) expands into
    
        ({
            typeof(obj) _obj = (obj);
            qobject_ref_impl(
                ({
    --->            typeof(_obj) _obj = (_obj);
                    _obj ? container_of(&(_obj)->base, QObject, base) : NULL;
                }));
            _obj;
        })
    
    Unintended variable name capture at --->.
    
    The only reliable way to prevent unintended variable name capture is
    -Wshadow.
    
    One blocker for enabling it is shadowing hiding in function-like
    macros like
    
         qdict_put(dict, "name", qobject_ref(...))
    
    qdict_put() wraps its last argument in QOBJECT(), and the last
    argument here contains another QOBJECT().
    
    Use dark preprocessor sorcery to make the macros that give us this
    problem use different variable names on every call.
    
    Signed-off-by: Markus Armbruster <[email protected]>
    Reviewed-by: Eric Blake <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    bb71846 View commit details
    Browse the repository at this point in the history
  8. hw/tricore: Log failing test in testdevice

    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    6d55999 View commit details
    Browse the repository at this point in the history
  9. tests/tcg: Reset result register after each test

    some insns use the result register implicitly as an input. Thus, we
    could end up with data from the previous insn spilling over.
    
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    76bc63d View commit details
    Browse the repository at this point in the history
  10. target/tricore: Remove CSFRs from cpu.h

    these are already defined in 'csfr.h.inc'. We don't need to duplicate
    these registers.
    
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    824b2cb View commit details
    Browse the repository at this point in the history
  11. target/tricore: Change effective address (ea) to target_ulong

    as this is an effective address and those cannot be signed,
    it should not be a signed integer.
    
    Signed-off-by: Bastian Koppelmann <[email protected]>
    Message-ID: <[email protected]>
    bkoppelmann committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    ceada00 View commit details
    Browse the repository at this point in the history
  12. optionrom: Remove build-id section

    Our linker script for optionroms specifies only the placement of the
    .text section, leaving the linker free to place the remaining sections
    at arbitrary places in the file.
    
    Since at least binutils 2.39, the .note.gnu.build-id section is now
    being placed at the start of the file, which causes label addresses to
    be shifted. For linuxboot_dma.bin that means that the PnP header
    (among others) will not be found when determining the type of ROM at
    optionrom_setup():
    
    (0x1c is the label _pnph, where the magic "PnP" is)
    
    $ xxd /usr/share/qemu/linuxboot_dma.bin | grep "PnP"
    00000010: 0000 0000 0000 0000 0000 1c00 2450 6e50  ............$PnP
    
    $ xxd pc-bios/optionrom/linuxboot_dma.bin | grep "PnP"
    00000010: 0000 0000 0000 0000 0000 4c00 2450 6e50  ............$PnP
                                       ^bad
    
    Using a freshly built linuxboot_dma.bin ROM results in a broken boot:
    
      SeaBIOS (version rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org)
      Booting from Hard Disk...
      Boot failed: could not read the boot disk
    
      Booting from Floppy...
      Boot failed: could not read the boot disk
    
      No bootable device.
    
    We're not using the build-id section, so pass the --build-id=none
    option to the linker to remove it entirely.
    
    Note: In theory, this same issue could happen with any other
    section. The ideal solution would be to have all unused sections
    discarded in the linker script. However that would be a larger change,
    specially for the pvh rom which uses the .bss and COMMON sections so
    I'm addressing only the immediate issue here.
    
    Reported-by: Vasiliy Ulyanov <[email protected]>
    Signed-off-by: Fabiano Rosas <[email protected]>
    Reviewed-by: Thomas Huth <[email protected]>
    Message-ID: <[email protected]>
    Cc: [email protected]
    Signed-off-by: Paolo Bonzini <[email protected]>
    Fabiano Rosas authored and bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    35ed01b View commit details
    Browse the repository at this point in the history
  13. accel/kvm/kvm-all: Handle register access errors

    A register access error typically means something seriously wrong
    happened so that anything bad can happen after that and recovery is
    impossible.
    Even failing one register access is catastorophic as
    architecture-specific code are not written so that it torelates such
    failures.
    
    Make sure the VM stop and nothing worse happens if such an error occurs.
    
    Signed-off-by: Akihiko Odaki <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    akihikodaki authored and bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    7191f24 View commit details
    Browse the repository at this point in the history
  14. e1000: remove old compatibility code

    This code is not needed anymore in the supported machine types.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    fa4ec9f View commit details
    Browse the repository at this point in the history
  15. pc: remove short_root_bus property

    The property was only used on QEMU 1.6 machine types.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    946f7c0 View commit details
    Browse the repository at this point in the history
  16. make-release: do not ship dtc sources

    A new enough libfdt is included in all of Debian 11, Ubuntu 20.04
    and MSYS2.  It has also been included for several minor releases
    in Fedora and openSUSE Leap, as well as in CentOS.  Therefore
    there is no need anymore to ship the sources together with the QEMU
    tarballs.
    
    Keep the wrap file so that it can be used with --enable-download,
    but do not ship the sources anymore with either archive-source.sh
    or make-release.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f0df613 View commit details
    Browse the repository at this point in the history
  17. meson: clean up static_library keyword arguments

    These are either built because they are dependencies of other targets,
    or not needed at all because they are used via extract_objects().
    Mark them as "build_by_default: false"; if applicable, mark them
    as "fa" so that -Wl,--whole-archive does not interact with the
    linker script used for fuzzing.
    
    (The "fa" hack is brittle; updating to Meson 1.1 would allow using
    declare_dependency(objects: ...) instead).
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1044
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    4c545a0 View commit details
    Browse the repository at this point in the history
  18. tcg: Clean up local variable shadowing

    Fix:
    
      tcg/tcg.c:2551:27: error: declaration shadows a local variable [-Werror,-Wshadow]
                        MemOp op = get_memop(oi);
                              ^
      tcg/tcg.c:2437:12: note: previous declaration is here
        TCGOp *op;
               ^
      accel/tcg/tb-maint.c:245:18: error: declaration shadows a local variable [-Werror,-Wshadow]
            for (int i = 0; i < V_L2_SIZE; i++) {
                     ^
      accel/tcg/tb-maint.c:210:9: note: previous declaration is here
        int i;
            ^
    
    Reviewed-by: Richard Henderson <[email protected]>
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    9a239c6 View commit details
    Browse the repository at this point in the history
  19. target/arm/tcg: Clean up local variable shadowing

    Fix:
    
      target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’:
      target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’ shadows a previous local [-Wshadow=compatible-local]
        509 |         TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]);
            |                  ^~~
      target/arm/tcg/translate-m-nocp.c:433:14: note: shadowed declaration is here
        433 |     TCGv_i32 tmp;
            |              ^~~
           ---
    
      target/arm/tcg/mve_helper.c: In function ‘helper_mve_vqshlsb’:
      target/arm/tcg/mve_helper.c:1259:19: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local]
       1259 |         typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32);  \
            |                   ^
      target/arm/tcg/mve_helper.c:1267:5: note: in expansion of macro ‘WRAP_QRSHL_HELPER’
       1267 |     WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp)
            |     ^~~~~~~~~~~~~~~~~
      target/arm/tcg/mve_helper.c:927:22: note: in expansion of macro ‘DO_SQSHL_OP’
        927 |             TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat);          \
            |                      ^~
      target/arm/tcg/mve_helper.c:945:5: note: in expansion of macro ‘DO_2OP_SAT’
        945 |     DO_2OP_SAT(OP##b, 1, int8_t, FN)            \
            |     ^~~~~~~~~~
      target/arm/tcg/mve_helper.c:1277:1: note: in expansion of macro ‘DO_2OP_SAT_S’
       1277 | DO_2OP_SAT_S(vqshls, DO_SQSHL_OP)
            | ^~~~~~~~~~~~
           ---
    
      target/arm/tcg/mve_helper.c: In function ‘do_sqrshl48_d’:
      target/arm/tcg/mve_helper.c:2463:17: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local]
       2463 |         int64_t extval = sextract64(src << shift, 0, 48);
            |                 ^~~~~~
      target/arm/tcg/mve_helper.c:2443:18: note: shadowed declaration is here
       2443 |     int64_t val, extval;
            |                  ^~~~~~
           ---
    
      target/arm/tcg/mve_helper.c: In function ‘do_uqrshl48_d’:
      target/arm/tcg/mve_helper.c:2495:18: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local]
       2495 |         uint64_t extval = extract64(src << shift, 0, 48);
            |                  ^~~~~~
      target/arm/tcg/mve_helper.c:2479:19: note: shadowed declaration is here
       2479 |     uint64_t val, extval;
            |                   ^~~~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    d54deb2 View commit details
    Browse the repository at this point in the history
  20. target/arm/hvf: Clean up local variable shadowing

    Per Peter Maydell analysis [*]:
    
      The hvf_vcpu_exec() function is not documented, but in practice
      its caller expects it to return either EXCP_DEBUG (for "this was
      a guest debug exception you need to deal with") or something else
      (presumably the intention being 0 for OK).
    
      The hvf_sysreg_read() and hvf_sysreg_write() functions are also not
      documented, but they return 0 on success, or 1 for a completely
      unrecognized sysreg where we've raised the UNDEF exception (but
      not if we raised an UNDEF exception for an unrecognized GIC sysreg --
      I think this is a bug). We use this return value to decide whether
      we need to advance the PC past the insn or not. It's not the same
      as the return value we want to return from hvf_vcpu_exec().
    
      Retain the variable as locally scoped but give it a name that
      doesn't clash with the other function-scoped variable.
    
    This fixes:
    
      target/arm/hvf/hvf.c:1936:13: error: declaration shadows a local variable [-Werror,-Wshadow]
            int ret = 0;
                ^
      target/arm/hvf/hvf.c:1807:9: note: previous declaration is here
        int ret;
            ^
    [*] https://lore.kernel.org/qemu-devel/CAFEAcA_e+fU6JKtS+W63wr9cCJ6btu_hT_ydZWOwC0kBkDYYYQ@mail.gmail.com/
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5a3d2c3 View commit details
    Browse the repository at this point in the history
  21. target/mips: Clean up local variable shadowing

    Fix:
    
      target/mips/tcg/nanomips_translate.c.inc:4410:33: error: declaration shadows a local variable [-Werror,-Wshadow]
                            int32_t imm = extract32(ctx->opcode, 1, 13) |
                                    ^
      target/mips/tcg/nanomips_translate.c.inc:3577:9: note: previous declaration is here
        int imm;
            ^
      target/mips/tcg/translate.c:15578:19: error: declaration shadows a local variable [-Werror,-Wshadow]
        for (unsigned i = 1; i < 32; i++) {
                      ^
      target/mips/tcg/translate.c:15567:9: note: previous declaration is here
        int i;
            ^
      target/mips/tcg/msa_helper.c:7478:13: error: declaration shadows a local variable [-Werror,-Wshadow]
                MSA_FLOAT_MAXOP(pwx->w[0], min, pws->w[0], pws->w[0], 32);
                ^
      target/mips/tcg/msa_helper.c:7434:23: note: expanded from macro 'MSA_FLOAT_MAXOP'
            float_status *status = &env->active_tc.msa_fp_status;
                          ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    92e0ef7 View commit details
    Browse the repository at this point in the history
  22. target/m68k: Clean up local variable shadowing

    Fix:
    
      target/m68k/translate.c:828:18: error: declaration shadows a local variable [-Werror,-Wshadow]
                TCGv tmp = tcg_temp_new();
                     ^
      target/m68k/translate.c:801:15: note: previous declaration is here
        TCGv reg, tmp, result;
                  ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    574d572 View commit details
    Browse the repository at this point in the history
  23. target/tricore: Clean up local variable shadowing

    Fix:
    
      target/tricore/translate.c:5016:18: warning: declaration of ‘temp’ shadows a previous local [-Wshadow=compatible-local]
       5016 |             TCGv temp = tcg_constant_i32(const9);
            |                  ^~~~
      target/tricore/translate.c:4958:10: note: shadowed declaration is here
       4958 |     TCGv temp;
            |          ^~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Bastian Koppelmann <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    81b8056 View commit details
    Browse the repository at this point in the history
  24. hw/arm/armv7m: Clean up local variable shadowing

    Fix:
    
      hw/arm/armv7m.c: In function ‘armv7m_realize’:
      hw/arm/armv7m.c:520:27: warning: declaration of ‘sbd’ shadows a previous local [-Wshadow=compatible-local]
        520 |             SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]);
            |                           ^~~
      hw/arm/armv7m.c:278:19: note: shadowed declaration is here
        278 |     SysBusDevice *sbd;
            |                   ^~~
           ---
    
      hw/arm/armsse.c: In function ‘armsse_realize’:
      hw/arm/armsse.c:1471:27: warning: declaration of ‘mr’ shadows a previous local [-Wshadow=compatible-local]
       1471 |             MemoryRegion *mr;
            |                           ^~
      hw/arm/armsse.c:917:19: note: shadowed declaration is here
        917 |     MemoryRegion *mr;
            |                   ^~
           ---
    
      hw/arm/armsse.c:1608:22: warning: declaration of ‘dev_splitter’ shadows a previous local [-Wshadow=compatible-local]
       1608 |         DeviceState *dev_splitter = DEVICE(splitter);
            |                      ^~~~~~~~~~~~
      hw/arm/armsse.c:923:18: note: shadowed declaration is here
        923 |     DeviceState *dev_splitter;
            |                  ^~~~~~~~~~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    807e4d1 View commit details
    Browse the repository at this point in the history
  25. hw/arm/virt: Clean up local variable shadowing

    Fix:
    
      hw/arm/virt.c:821:22: error: declaration shadows a local variable [-Werror,-Wshadow]
                qemu_irq irq = qdev_get_gpio_in(vms->gic,
                         ^
      hw/arm/virt.c:803:13: note: previous declaration is here
            int irq;
                ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    c7f14e4 View commit details
    Browse the repository at this point in the history
  26. hw/arm/allwinner: Clean up local variable shadowing

    Fix:
    
      hw/arm/allwinner-r40.c:412:14: error: declaration shadows a local variable [-Werror,-Wshadow]
        for (int i = 0; i < AW_R40_NUM_MMCS; i++) {
                 ^
      hw/arm/allwinner-r40.c:299:14: note: previous declaration is here
        unsigned i;
                 ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    2f6037a View commit details
    Browse the repository at this point in the history
  27. hw/m68k: Clean up local variable shadowing

    Fix:
    
      hw/m68k/virt.c:263:13: error: declaration shadows a local variable [-Werror,-Wshadow]
                BOOTINFOSTR(param_ptr, BI_COMMAND_LINE,
                ^
      hw/m68k/bootinfo.h:47:13: note: expanded from macro 'BOOTINFOSTR'
            int i; \
                ^
      hw/m68k/virt.c:130:9: note: previous declaration is here
        int i;
            ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Thomas Huth <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5f87ddd View commit details
    Browse the repository at this point in the history
  28. hw/microblaze: Clean up local variable shadowing

    Fix:
    
      hw/microblaze/petalogix_ml605_mmu.c: In function ‘petalogix_ml605_init’:
      hw/microblaze/petalogix_ml605_mmu.c:186:24: warning: declaration of ‘dinfo’ shadows a previous local [-Wshadow=compatible-local]
        186 |             DriveInfo *dinfo = drive_get(IF_MTD, 0, i);
            |                        ^~~~~
      hw/microblaze/petalogix_ml605_mmu.c:78:16: note: shadowed declaration is here
         78 |     DriveInfo *dinfo;
            |                ^~~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    4705c8e View commit details
    Browse the repository at this point in the history
  29. hw/nios2: Clean up local variable shadowing

    Fix:
    
      hw/nios2/10m50_devboard.c: In function ‘nios2_10m50_ghrd_init’:
      hw/nios2/10m50_devboard.c:101:22: warning: declaration of ‘dev’ shadows a previous local [-Wshadow=compatible-local]
        101 |         DeviceState *dev = qdev_new(TYPE_NIOS2_VIC);
            |                      ^~~
      hw/nios2/10m50_devboard.c:60:18: note: shadowed declaration is here
         60 |     DeviceState *dev;
            |                  ^~~
    
      hw/nios2/10m50_devboard.c:110:18: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
        110 |         for (int i = 0; i < 32; i++) {
            |                  ^
      hw/nios2/10m50_devboard.c:67:9: note: shadowed declaration is here
         67 |     int i;
            |         ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    09e24b1 View commit details
    Browse the repository at this point in the history
  30. net/eth: Clean up local variable shadowing

    Fix:
    
      net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow]
                size_t input_size = iov_size(pkt, pkt_frags);
                       ^
      net/eth.c:413:16: note: previous declaration is here
            size_t input_size = iov_size(pkt, pkt_frags);
                   ^
    
    Suggested-by: Akihiko Odaki <[email protected]>
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Eric Blake <[email protected]>
    Reviewed-by: Akihiko Odaki <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    1728593 View commit details
    Browse the repository at this point in the history
  31. crypto/cipher-gnutls.c: Clean up local variable shadowing

    Fix:
    
      In file included from crypto/cipher.c:140:
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’:
      crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        116 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:94:9: note: shadowed declaration is here
         94 |     int err;
            |         ^~~
           ---
    
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_decrypt’:
      crypto/cipher-gnutls.c.inc:177:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        177 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:154:9: note: shadowed declaration is here
        154 |     int err;
            |         ^~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5f6d4f7 View commit details
    Browse the repository at this point in the history
  32. util/vhost-user-server: Clean up local variable shadowing

    Fix:
    
      util/vhost-user-server.c: In function ‘set_watch’:
      util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ shadows a previous local [-Wshadow=compatible-local]
        274 |         VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1);
            |                    ^~~~~~~~~~~
      util/vhost-user-server.c:271:16: note: shadowed declaration is here
        271 |     VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd);
            |                ^~~~~~~~~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    fbf58f2 View commit details
    Browse the repository at this point in the history
  33. linux-user/strace: Clean up local variable shadowing

    Fix:
    
      linux-user/strace.c: In function ‘print_sockaddr’:
      linux-user/strace.c:370:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
        370 |             int i;
            |                 ^
      linux-user/strace.c:361:9: note: shadowed declaration is here
        361 |     int i;
            |         ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    7f087a3 View commit details
    Browse the repository at this point in the history
  34. sysemu/device_tree: Clean up local variable shadowing

    Fix:
    
      hw/mips/boston.c:472:5: error: declaration shadows a local variable [-Werror,-Wshadow]
        qemu_fdt_setprop_cells(fdt, name, "reg", reg_base, reg_size);
        ^
      include/sysemu/device_tree.h:129:13: note: expanded from macro 'qemu_fdt_setprop_cells'
            int i;
                ^
      hw/mips/boston.c:461:9: note: previous declaration is here
        int i;
            ^
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Markus Armbruster <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    720d6bc View commit details
    Browse the repository at this point in the history
  35. softmmu/memory: Clean up local variable shadowing

    Fix:
    
      softmmu/memory.c: In function ‘mtree_print_mr’:
      softmmu/memory.c:3236:27: warning: declaration of ‘ml’ shadows a previous local [-Wshadow=compatible-local]
       3236 |         MemoryRegionList *ml;
            |                           ^~
      softmmu/memory.c:3213:32: note: shadowed declaration is here
       3213 |     MemoryRegionList *new_ml, *ml, *next_ml;
            |                                ^~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    083f450 View commit details
    Browse the repository at this point in the history
  36. softmmu/physmem: Clean up local variable shadowing

    Fix:
    
      softmmu/physmem.c: In function ‘cpu_physical_memory_snapshot_and_clear_dirty’:
      softmmu/physmem.c:916:27: warning: declaration of ‘offset’ shadows a parameter [-Wshadow=compatible-local]
        916 |             unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE;
            |                           ^~~~~~
      softmmu/physmem.c:892:31: note: shadowed declaration is here
        892 |     (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client)
            |                        ~~~~~~~^~~~~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    6ba9b60 View commit details
    Browse the repository at this point in the history
  37. hw/core/machine: Clean up local variable shadowing

    Fix:
    
      hw/core/machine.c: In function ‘machine_initfn’:
      hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a parameter [-Wshadow=compatible-local]
       1081 |         Object *obj = OBJECT(ms);
            |                 ^~~
      hw/core/machine.c:1065:36: note: shadowed declaration is here
       1065 | static void machine_initfn(Object *obj)
            |                            ~~~~~~~~^~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5e0528a View commit details
    Browse the repository at this point in the history
  38. hw/intc/openpic: Clean up local variable shadowing

    Fix:
    
      hw/intc/openpic.c: In function ‘openpic_gbl_write’:
      hw/intc/openpic.c:614:17: warning: declaration of ‘idx’ shadows a previous local [-Wshadow=compatible-local]
        614 |             int idx;
            |                 ^~~
      hw/intc/openpic.c:568:9: note: shadowed declaration is here
        568 |     int idx;
            |         ^~~
    
    Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Peter Maydell <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    philmd authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    1cc0c5d View commit details
    Browse the repository at this point in the history
  39. hw/ppc: Clean up local variable shadowing in _FDT helper routine

    this fixes numerous warnings of this type :
    
      In file included from ../hw/ppc/spapr_pci.c:43:
      ../hw/ppc/spapr_pci.c: In function ‘spapr_dt_phb’:
      ../include/hw/ppc/fdt.h:18:13: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=compatible-local]
         18 |         int ret = (exp);                                           \
            |             ^~~
      ../hw/ppc/spapr_pci.c:2355:5: note: in expansion of macro ‘_FDT’
       2355 |     _FDT(bus_off = fdt_add_subnode(fdt, 0, phb->dtbusname));
            |     ^~~~
      ../hw/ppc/spapr_pci.c:2311:24: note: shadowed declaration is here
       2311 |     int bus_off, i, j, ret;
            |                        ^~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    90231ce View commit details
    Browse the repository at this point in the history
  40. pnv/psi: Clean up local variable shadowing

    to fix :
    
      ../hw/ppc/pnv_psi.c: In function ‘pnv_psi_p9_mmio_write’:
      ../hw/ppc/pnv_psi.c:741:24: warning: declaration of ‘addr’ shadows a parameter [-Wshadow=compatible-local]
        741 |                 hwaddr addr = val & ~(PSIHB9_ESB_CI_VALID | PSIHB10_ESB_CI_64K);
            |                        ^~~~
      ../hw/ppc/pnv_psi.c:702:56: note: shadowed declaration is here
        702 | static void pnv_psi_p9_mmio_write(void *opaque, hwaddr addr,
            |                                                 ~~~~~~~^~~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    694616d View commit details
    Browse the repository at this point in the history
  41. spapr: Clean up local variable shadowing in spapr_dt_cpus()

    Introduce a helper routine defining one CPU device node to fix this
    warning :
    
      ../hw/ppc/spapr.c: In function ‘spapr_dt_cpus’:
      ../hw/ppc/spapr.c:812:19: warning: declaration of ‘cs’ shadows a previous local [-Wshadow=compatible-local]
        812 |         CPUState *cs = rev[i];
            |                   ^~
      ../hw/ppc/spapr.c:786:15: note: shadowed declaration is here
        786 |     CPUState *cs;
            |               ^~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    bd87a59 View commit details
    Browse the repository at this point in the history
  42. spapr: Clean up local variable shadowing in spapr_init_cpus()

    Remove extra 'i' variable to fix this warning :
    
      ../hw/ppc/spapr.c: In function ‘spapr_init_cpus’:
      ../hw/ppc/spapr.c:2668:13: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
       2668 |         int i;
            |             ^
      ../hw/ppc/spapr.c:2645:9: note: shadowed declaration is here
       2645 |     int i;
            |         ^
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    c0b648d View commit details
    Browse the repository at this point in the history
  43. spapr: Clean up local variable shadowing in spapr_get_fw_dev_path()

    Rename PCIDevice variable to avoid this warning :
    
      ../hw/ppc/spapr.c: In function ‘spapr_get_fw_dev_path’:
      ../hw/ppc/spapr.c:3217:20: warning: declaration of ‘pcidev’ shadows a previous local [-Wshadow=compatible-local]
       3217 |         PCIDevice *pcidev = CAST(PCIDevice, dev, TYPE_PCI_DEVICE);
            |                    ^~~~~~
      ../hw/ppc/spapr.c:3147:16: note: shadowed declaration is here
       3147 |     PCIDevice *pcidev = CAST(PCIDevice, dev, TYPE_PCI_DEVICE);
            |                ^~~~~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    01a78f2 View commit details
    Browse the repository at this point in the history
  44. spapr/drc: Clean up local variable shadowing in rtas_ibm_configure_co…

    …nnector()
    
    Remove extra 'drc_index' variable to avoid this warning :
    
      ../hw/ppc/spapr_drc.c: In function ‘rtas_ibm_configure_connector’:
      ../hw/ppc/spapr_drc.c:1240:26: warning: declaration of ‘drc_index’ shadows a previous local [-Wshadow=compatible-local]
       1240 |                 uint32_t drc_index = spapr_drc_index(drc);
            |                          ^~~~~~~~~
      ../hw/ppc/spapr_drc.c:1155:14: note: shadowed declaration is here
       1155 |     uint32_t drc_index;
            |              ^~~~~~~~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    bea3d6e View commit details
    Browse the repository at this point in the history
  45. spapr/pci: Clean up local variable shadowing in spapr_phb_realize()

    Rename SysBusDevice variable to avoid this warning :
    
      ../hw/ppc/spapr_pci.c: In function ‘spapr_phb_realize’:
      ../hw/ppc/spapr_pci.c:1872:24: warning: declaration of ‘s’ shadows a previous local [-Wshadow=local]
       1872 |         SpaprPhbState *s;
            |                        ^
      ../hw/ppc/spapr_pci.c:1829:19: note: shadowed declaration is here
       1829 |     SysBusDevice *s = SYS_BUS_DEVICE(dev);
            |                   ^
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    15675f2 View commit details
    Browse the repository at this point in the history
  46. spapr/drc: Clean up local variable shadowing in prop_get_fdt()

    Rename 'name' variable to avoid this warning :
    
      ../hw/ppc/spapr_drc.c: In function ‘prop_get_fdt’:
      ../hw/ppc/spapr_drc.c:344:21: warning: declaration of ‘name’ shadows a parameter [-Wshadow=compatible-local]
        344 |         const char *name = NULL;
            |                     ^~~~
      ../hw/ppc/spapr_drc.c:325:63: note: shadowed declaration is here
        325 | static void prop_get_fdt(Object *obj, Visitor *v, const char *name,
            |                                                   ~~~~~~~~~~~~^~~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Harsh Prateek Bora <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    8cf52ff View commit details
    Browse the repository at this point in the history
  47. test-throttle: don't shadow 'index' variable in do_test_accounting()

    Fixes build with -Wshadow=local
    
    Signed-off-by: Alberto Garcia <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Markus Armbruster <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    bertogg authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    d857309 View commit details
    Browse the repository at this point in the history
  48. hw/acpi: changes towards enabling -Wshadow=local

    Code changes in acpi that addresses all compiler complaints coming from enabling
    -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing
    other local variables or parameters. These makes the code confusing and/or adds
    bugs that are difficult to catch.  See also
    
        Subject: Help wanted for enabling -Wshadow=local
        Message-Id: <[email protected]>
        https://lore.kernel.org/qemu-devel/[email protected]
    
    The code is tested to build with and without the flag turned on.
    
    CC: Markus Armbruster <[email protected]>
    CC: Philippe Mathieu-Daude <[email protected]>
    CC: [email protected]
    CC: [email protected]
    Signed-off-by: Ani Sinha <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Michael S. Tsirkin <[email protected]>
    [Commit message tweaked]
    Signed-off-by: Markus Armbruster <[email protected]>
    ani-sinha authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    7b393b7 View commit details
    Browse the repository at this point in the history
  49. hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd()

    Avoid shadowing a local variable in do_process_its_cmd():
    
    ../../hw/intc/arm_gicv3_its.c:548:17: warning: declaration of ‘ite’ shadows a previous local [-Wshadow=compatible-local]
      548 |         ITEntry ite = {};
          |                 ^~~
    ../../hw/intc/arm_gicv3_its.c:518:13: note: shadowed declaration is here
      518 |     ITEntry ite;
          |             ^~~
    
    Signed-off-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Eric Auger <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    pm215 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    33b3b4a View commit details
    Browse the repository at this point in the history
  50. hw/misc/arm_sysctl.c: Avoid shadowing local variable

    Avoid shadowing a local variable in arm_sysctl_write():
    
    ../../hw/misc/arm_sysctl.c: In function ‘arm_sysctl_write’:
    ../../hw/misc/arm_sysctl.c:537:26: warning: declaration of ‘val’ shadows a parameter [-Wshadow=local]
      537 |                 uint32_t val;
          |                          ^~~
    ../../hw/misc/arm_sysctl.c:388:39: note: shadowed declaration is here
      388 |                              uint64_t val, unsigned size)
          |                              ~~~~~~~~~^~~
    
    Signed-off-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Eric Auger <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    pm215 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    b2e7e20 View commit details
    Browse the repository at this point in the history
  51. hw/arm/smmuv3.c: Avoid shadowing variable

    Avoid shadowing a variable in smmuv3_notify_iova():
    
    ../../hw/arm/smmuv3.c: In function ‘smmuv3_notify_iova’:
    ../../hw/arm/smmuv3.c:1043:23: warning: declaration of ‘event’ shadows a previous local [-Wshadow=local]
     1043 |         SMMUEventInfo event = {.inval_ste_allowed = true};
          |                       ^~~~~
    ../../hw/arm/smmuv3.c:1038:19: note: shadowed declaration is here
     1038 |     IOMMUTLBEvent event;
          |                   ^~~~~
    
    Signed-off-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Eric Auger <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    pm215 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    9e2135e View commit details
    Browse the repository at this point in the history
  52. hw/arm/smmuv3-internal.h: Don't use locals in statement macros

    The STE_CTXPTR() and STE_S2TTB() macros both extract two halves
    of an address from fields in the STE and combine them into a
    single value to return. The current code for this uses a GCC
    statement expression. There are two problems with this:
    
    (1) The type chosen for the variable in the statement expr
    is 'unsigned long', which might not be 64 bits
    
    (2) the name chosen for the variable causes -Wshadow warnings
    because it's the same as a variable in use at the callsite:
    
    In file included from ../../hw/arm/smmuv3.c:34:
    ../../hw/arm/smmuv3.c: In function ‘smmu_get_cd’:
    ../../hw/arm/smmuv3-internal.h:538:23: warning: declaration of ‘addr’ shadows a previous local [-Wshadow=compatible-local]
      538 |         unsigned long addr;                                     \
          |                       ^~~~
    ../../hw/arm/smmuv3.c:339:23: note: in expansion of macro ‘STE_CTXPTR’
      339 |     dma_addr_t addr = STE_CTXPTR(ste);
          |                       ^~~~~~~~~~
    ../../hw/arm/smmuv3.c:339:16: note: shadowed declaration is here
      339 |     dma_addr_t addr = STE_CTXPTR(ste);
          |                ^~~~
    
    Sidestep both of these problems by just using a single
    expression rather than a statement expr.
    
    For CMD_ADDR, we got the type of the variable right but still
    run into -Wshadow problems:
    
    In file included from ../../hw/arm/smmuv3.c:34:
    ../../hw/arm/smmuv3.c: In function ‘smmuv3_range_inval’:
    ../../hw/arm/smmuv3-internal.h:334:22: warning: declaration of ‘addr’ shadows a previous local [-Wshadow=compatible-local]
      334 |             uint64_t addr = high << 32 | (low << 12);         \
          |                      ^~~~
    ../../hw/arm/smmuv3.c:1104:28: note: in expansion of macro ‘CMD_ADDR’
     1104 |     dma_addr_t end, addr = CMD_ADDR(cmd);
          |                            ^~~~~~~~
    ../../hw/arm/smmuv3.c:1104:21: note: shadowed declaration is here
     1104 |     dma_addr_t end, addr = CMD_ADDR(cmd);
          |                     ^~~~
    
    so convert it too.
    
    CD_TTB has neither problem, but it is the only other macro in
    the file that uses this pattern, so we convert it also for
    consistency's sake.
    
    We use extract64() rather than extract32() to avoid having
    to explicitly cast the result to uint64_t.
    
    Signed-off-by: Peter Maydell <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Eric Auger <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    pm215 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    84abccd View commit details
    Browse the repository at this point in the history
  53. aspeed/i2c: Clean up local variable shadowing

    Remove superfluous local 'data' variable and use the one define at the
    top of the routine. This fixes :
    
      ../hw/i2c/aspeed_i2c.c: In function ‘aspeed_i2c_bus_recv’:
      ../hw/i2c/aspeed_i2c.c:315:17: warning: declaration of ‘data’ shadows a previous local [-Wshadow=compatible-local]
        315 |         uint8_t data;
            |                 ^~~~
      ../hw/i2c/aspeed_i2c.c:288:13: note: shadowed declaration is here
        288 |     uint8_t data;
            |             ^~~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Joel Stanley <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    ce6c368 View commit details
    Browse the repository at this point in the history
  54. aspeed: Clean up local variable shadowing

    Remove superfluous local 'irq' variables and use the one define at the
    top of the routine. This fixes warnings in aspeed_soc_ast2600_realize()
    such as :
    
      ../hw/arm/aspeed_ast2600.c: In function ‘aspeed_soc_ast2600_realize’:
      ../hw/arm/aspeed_ast2600.c:420:18: warning: declaration of ‘irq’ shadows a previous local [-Wshadow=compatible-local]
        420 |         qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i);
            |                  ^~~
      ../hw/arm/aspeed_ast2600.c:312:14: note: shadowed declaration is here
        312 |     qemu_irq irq;
            |              ^~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e8874c0 View commit details
    Browse the repository at this point in the history
  55. aspeed/i3c: Rename variable shadowing a local

    to fix warning :
    
      ../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’:
      ../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a parameter [-Wshadow=local]
       1959 |         Object *dev = OBJECT(&s->devices[i]);
            |                 ^~~
      ../hw/i3c/aspeed_i3c.c:1942:45: note: shadowed declaration is here
       1942 | static void aspeed_i3c_realize(DeviceState *dev, Error **errp)
            |                                ~~~~~~~~~~~~~^~~
    
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Andrew Jeffery <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e407513 View commit details
    Browse the repository at this point in the history
  56. aspeed/timer: Clean up local variable shadowing

    commit 8137355 ("aspeed/timer: Fix behaviour running Linux")
    introduced a MAX() expression to calculate the next timer deadline :
    
        return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0));
    
    The second MAX() is not necessary since the compared values are an
    unsigned and 0. Simply remove it and fix warning :
    
      ../hw/timer/aspeed_timer.c: In function ‘calculate_next’:
      ../include/qemu/osdep.h:396:31: warning: declaration of ‘_a’ shadows a previous local [-Wshadow=compatible-local]
        396 |         typeof(1 ? (a) : (b)) _a = (a), _b = (b);       \
            |                               ^~
      ../hw/timer/aspeed_timer.c:170:12: note: in expansion of macro ‘MAX’
        170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
            |            ^~~
      ../hw/timer/aspeed_timer.c:170:16: note: in expansion of macro ‘MAX’
        170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
            |                ^~~
      /home/legoater/work/qemu/qemu-aspeed.git/include/qemu/osdep.h:396:31: note: shadowed declaration is here
        396 |         typeof(1 ? (a) : (b)) _a = (a), _b = (b);       \
            |                               ^~
      ../hw/timer/aspeed_timer.c:170:12: note: in expansion of macro ‘MAX’
        170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
            |            ^~~
    
    Cc: Joel Stanley <[email protected]>
    Cc: Andrew Jeffery <[email protected]>
    Signed-off-by: Cédric Le Goater <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    legoater authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    62fcc4e View commit details
    Browse the repository at this point in the history
  57. intel_iommu: Fix shadow local variables on "size"

    This patch fixes the warning of shadowed local variable:
    
    ../hw/i386/intel_iommu.c: In function ‘vtd_address_space_unmap’:
    ../hw/i386/intel_iommu.c:3773:18: warning: declaration of ‘size’ shadows a previous local [-Wshadow=compatible-local]
     3773 |         uint64_t size = mask + 1;
          |                  ^~~~
    ../hw/i386/intel_iommu.c:3747:12: note: shadowed declaration is here
     3747 |     hwaddr size, remain;
          |            ^~~~
    
    Cc: Jason Wang <[email protected]>
    Cc: Eric Auger <[email protected]>
    Cc: Michael S. Tsirkin <[email protected]>
    Cc: Markus Armbruster <[email protected]>
    Signed-off-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    xzpeter authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    a082739 View commit details
    Browse the repository at this point in the history
  58. crypto: remove shadowed 'ret' variable

    Both instances of 'ret' are used to store a gnutls API return code.
    
    Signed-off-by: Daniel P. Berrangé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    berrange authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    3cc9fe1 View commit details
    Browse the repository at this point in the history
  59. seccomp: avoid shadowing of 'action' variable

    This is confusing as one 'action' variable is used for storing
    a SCMP_ enum value, while the other 'action' variable is used
    for storing a SECCOMP_ enum value.
    
    Signed-off-by: Daniel P. Berrangé <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Markus Armbruster <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    berrange authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    0d57919 View commit details
    Browse the repository at this point in the history
  60. qemu-nbd: changes towards enabling -Wshadow=local

    Address all compiler complaints from -Wshadow in qemu-nbd.  Several
    instances of 'int ret' became shadows when commit 4fbec26 added 'ret'
    at a higher scope in main.  More interesting was the 'void *ret'
    capturing the result of a pthread; where we were conceptually doing
    '(void*)(intptr_t)EXIT_FAILURE != NULL' which just feels wrong (even
    though it happens to compile correctly), so it was worth a better
    cleanup.
    
    Signed-off-by: Eric Blake <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    ebblake authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e161785 View commit details
    Browse the repository at this point in the history
  61. hw/riscv: opentitan: Fixup local variables shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Bugs love to hide in such code.
    Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
    on polling error".
    
    This patch removes the local variable shadowing. Tested by adding:
    
        --extra-cflags='-Wshadow=local -Wno-error=shadow=local -Wno-error=shadow=compatible-local'
    
    To configure
    
    Signed-off-by: Alistair Francis <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel Henrique Barboza <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    alistair23 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    010f555 View commit details
    Browse the repository at this point in the history
  62. target/riscv: cpu: Fixup local variables shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Bugs love to hide in such code.
    Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
    on polling error".
    
    This patch removes the local variable shadowing. Tested by adding:
    
        --extra-cflags='-Wshadow=local -Wno-error=shadow=local -Wno-error=shadow=compatible-local'
    
    To configure
    
    Signed-off-by: Alistair Francis <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel Henrique Barboza <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    alistair23 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    2933299 View commit details
    Browse the repository at this point in the history
  63. target/riscv: vector_helper: Fixup local variables shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Bugs love to hide in such code.
    Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
    on polling error".
    
    This patch removes the local variable shadowing. Tested by adding:
    
        --extra-cflags='-Wshadow=local -Wno-error=shadow=local -Wno-error=shadow=compatible-local'
    
    To configure
    
    Signed-off-by: Alistair Francis <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel Henrique Barboza <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    alistair23 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f3f65c4 View commit details
    Browse the repository at this point in the history
  64. softmmu/device_tree: Fixup local variables shadowing

    Local variables shadowing other local variables or parameters make the
    code needlessly hard to understand.  Bugs love to hide in such code.
    Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
    on polling error".
    
    This patch removes the local variable shadowing. Tested by adding:
    
        --extra-cflags='-Wshadow=local -Wno-error=shadow=local -Wno-error=shadow=compatible-local'
    
    To configure
    
    Signed-off-by: Alistair Francis <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Daniel Henrique Barboza <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    alistair23 authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5567fa8 View commit details
    Browse the repository at this point in the history
  65. hw/nvme: Clean up local variable shadowing in nvme_ns_init()

    Fix local variable shadowing in nvme_ns_init().
    
    Reported-by: Markus Armbruster <[email protected]>
    Signed-off-by: Klaus Jensen <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Jesper Wendel Devantier <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    birkelund authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f193d0b View commit details
    Browse the repository at this point in the history
  66. disas/m68k: clean up local variable shadowing

    Fix following warnings
    
    .../disas/m68k.c: In function ‘print_insn_arg’:
    .../disas/m68k.c:1635:13: warning: declaration of ‘val’ shadows a previous local [-Wshadow=compatible-local]
     1635 |         int val = fetch_arg (buffer, place, 5, info);
          |             ^~~
    .../disas/m68k.c:1093:7: note: shadowed declaration is here
     1093 |   int val = 0;
          |       ^~~
    
    Signed-off-by: Laurent Vivier <[email protected]>
    Message-ID: <[email protected]>
    Reviewed-by: Thomas Huth <[email protected]>
    Signed-off-by: Markus Armbruster <[email protected]>
    vivier authored and Markus Armbruster committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    4dba914 View commit details
    Browse the repository at this point in the history
  67. migration-test: Create kvm_opts

    So arch_dirty_ring option becomes one option like the others.
    
    Reviewed-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    71d3612 View commit details
    Browse the repository at this point in the history
  68. migration-test: bootpath is the same for all tests and for all archs

    So just make it a global variable.
    
    Reviewed-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    877cec6 View commit details
    Browse the repository at this point in the history
  69. migration-test: Add bootfile_create/delete() functions

    The bootsector code is read only from the guest (otherwise we are
    going to have problems with it being read from both source and
    destination).
    
    Create a single copy for all the tests.
    
    Reviewed-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    0c690d3 View commit details
    Browse the repository at this point in the history
  70. migration-test: dirtylimit checks for x86_64 arch before

    So no need to assert we are in x86_64.
    Once there, refactor the function to remove useless variables.
    
    Reviewed-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    22d3c6e View commit details
    Browse the repository at this point in the history
  71. migration-test: simplify shmem_opts handling

    Reviewed-by: Peter Xu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    0368ace View commit details
    Browse the repository at this point in the history
  72. migration: Refactor repeated call of yank_unregister_instance

    In the function qmp_migrate(), yank_unregister_instance() gets called
    twice which isn't required. Hence, refactoring it so that it gets called
    during the local_error cleanup.
    
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Acked-by: Peter Xu <[email protected]>
    Signed-off-by: Tejus GK <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    gktejus authored and Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f4e1b61 View commit details
    Browse the repository at this point in the history
  73. migration: Use qemu_file_transferred_noflush() for block migration.

    We only care about the amount of bytes transferred.  Flushing is done
    by the system somewhere else.
    
    Reviewed-by: Fabiano Rosas <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f16ecfa View commit details
    Browse the repository at this point in the history
  74. migration: Don't abuse qemu_file transferred for RDMA

    Just create a variable for it, the same way that multifd does.  This
    way it is safe to use for other thread, etc, etc.
    
    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    67c31c9 View commit details
    Browse the repository at this point in the history
  75. migration/RDMA: It is accounting for zero/normal pages in two places

    Remove the one in control_save_page().
    
    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    19df4f3 View commit details
    Browse the repository at this point in the history
  76. migration/rdma: Remove QEMUFile parameter when not used

    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e337803 View commit details
    Browse the repository at this point in the history
  77. migration/rdma: Don't use imaginary transfers

    RDMA protocol is completely asynchronous, so in qemu_rdma_save_page()
    they "invent" that a byte has been transferred.  And then they call
    qemu_file_credit_transfer() and ram_transferred_add() with that byte.
    Just remove that calls as nothing has been sent.
    
    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    2ebe5d4 View commit details
    Browse the repository at this point in the history
  78. migration: Remove unused qemu_file_credit_transfer()

    After this change, nothing abuses QEMUFile to account for data
    transferrefd during migration.
    
    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    9f51fe9 View commit details
    Browse the repository at this point in the history
  79. migration/rdma: Simplify the function that saves a page

    When we sent a page through QEMUFile hooks (RDMA) there are three
    posiblities:
    - We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and
      control_save_page() returns false to let anything else to proceed.
    - There is one error but we are using RDMA.  Then we return a negative
      value, control_save_page() needs to return true.
    - Everything goes well and RDMA start the sent of the page
      asynchronously.  It returns RAM_SAVE_CONTROL_DELAYED and we need to
      return 1 for ram_save_page_legacy.
    
    Clear?
    
    I know, I know, the interface is as bad as it gets.  I think that now
    it is a bit clearer, but this needs to be done some other way.
    
    Reviewed-by: Leonardo Bras <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-Id: <[email protected]>
    Juan Quintela committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    9c53d36 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Makefile: build plugins before running TCG tests

    Add back test-plugins and, after making sure it is always defined,
    do so unconditionally.
    
    Reported-by: Alex Bennée <[email protected]>
    Fixes: 2c13c57 ("configure, meson: move --enable-plugins to meson", 2023-09-07)
    Reviewed-by: Alex Bennée <[email protected]>
    Tested-by: Alex Bennée <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    ce43e84 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu

    …into staging
    
    Pull request
    
    - Mads Ynddal's improvements to simpletrace.py
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmUVgyAACgkQnKSrs4Gr
    # c8jxkAf/TVtEZTPDvQMz7PNEsAdGLREwYKrsUXHtqOrINbVL1slrJ1qYmygeJltq
    # 37CAcxBzvnaH7y2jF8JPKWK3sO3x1fc2ocA72BZt3kuim5T7MojJgFfAN/PdwRHf
    # q1a+lYJHKOi0BV4yWPmPHnCSXOohHbJfRBxwZgwFEZMbWdlkAm6m+JFUqn+Vd5ee
    # 4vEBxrNMY28H02OeoFNBQPCLRHrkeH4EVj+DP5TAk1H1ehoZeH45UoUsopEfD51z
    # IyiXxzumtgpCMyC/jXS5BY6VStW7lDLoDscflMQ/l7ITEtm7Hj2fnPcp/aRKoEUk
    # p1JuoSm8YrwnwMokFsQCbkYWkBWieQ==
    # =rrnI
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Thu 28 Sep 2023 09:44:00 EDT
    # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
    # gpg: Good signature from "Stefan Hajnoczi <[email protected]>" [ultimate]
    # gpg:                 aka "Stefan Hajnoczi <[email protected]>" [ultimate]
    # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
    
    * tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu:
      scripts/analyse-locks-simpletrace.py: changed iteritems() to items()
      MAINTAINERS: add maintainer of simpletrace.py
      simpletrace: added simplified Analyzer2 class
      simpletrace: move event processing to Analyzer class
      simpletrace: move logic of process into internal function
      simpletrace: refactor to separate responsibilities
      simpletrace: made Analyzer into context-manager
      simpletrace: define exception and add handling
      simpletrace: improved error handling on struct unpack
      simpletrace: update code for Python 3.11
      simpletrace: changed naming of edict and idtoname to improve readability
      simpletrace: improve parsing of sys.argv; fix files never closed.
      simpletrace: annotate magic constants from QEMU code
      simpletrace: add __all__ to define public interface
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    5436f1b View commit details
    Browse the repository at this point in the history
  3. Merge tag 'pull-tcg-20230928' of https://gitlab.com/rth7680/qemu into…

    … staging
    
    accel/tcg: Always require can_do_io, for #1866
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmUV1sgdHHJpY2hhcmQu
    # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/8UAgAjFSrUvW5cGTiaow7
    # cTvvoFnQzVCM7gFbC2T9W29Hrv0s3tqJHSdUFftzzMXB1atylwb85XN5wegC98zk
    # 7+OzrUvTN2fRHVTnWdUg2Tgj+pR/Sw+9HVy851c3B/e3oFegqAIQaNK5w9N3ZpWd
    # gpGN8Lau6dEdte8ckMTzG0Sw4LryZyvcgz9+vDv+YX03JaiSMqziHoJGwHfjqr9Q
    # FOI1f4gQw+Y2ct6Xop1vVILH2I26US40Y2DvEMEDuZpTkTN0L2V8ipz+tWgGuCMa
    # 7HRySJAw5HiDdtAV9/H5dfGJVgjsgwuWoYm+viJtJKJ+X350a5YI77hkbglPxQu+
    # Q+dCVA==
    # =lQYd
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Thu 28 Sep 2023 15:40:56 EDT
    # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
    # gpg:                issuer "[email protected]"
    # gpg: Good signature from "Richard Henderson <[email protected]>" [full]
    # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
    
    * tag 'pull-tcg-20230928' of https://gitlab.com/rth7680/qemu:
      accel/tcg: Always require can_do_io
      accel/tcg: Always set CF_LAST_IO with CF_NOIRQ
      accel/tcg: Improve setting of can_do_io at start of TB
      accel/tcg: Track current value of can_do_io in the TB
      accel/tcg: Hoist CF_MEMI_ONLY check outside translation loop
      accel/tcg: Avoid load of icount_decr if unused
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    5b0d1a8 View commit details
    Browse the repository at this point in the history
  4. Merge tag 'pull-tricore-20230929' of https://github.com/bkoppelmann/qemu

     into staging
    
    - Add FTOU, CRCN, FTOHP, and HPTOF insns
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQJTBAABCgA9FiEEbmNqfoPy3Qz6bm43CtLGOWtpyhQFAmUWb2sfHGtiYXN0aWFu
    # QG1haWwudW5pLXBhZGVyYm9ybi5kZQAKCRAK0sY5a2nKFPn0D/0S+Zth2okyfe6H
    # YdoFB49PWlcafIvZHr1TDswp3LvSDnrjHLJfEW1Gx3mtDkw+/7uid0eMTQ8sDlxJ
    # t7spJdZDZ5dkm+9K5MzGkW0zo0jDY6kbS1A3HJRPcpJJJk4zBBL1K4KC1FBUD6IK
    # 7n41f5vExgWhIhOgZmT9WTMbBfh73/+Cu8h6M9RAI1VI0O6N5jOETpKTBFsPOx+A
    # Kd429cB1c9QeAj0iEXdMn2/Xg2cAII86jrOcYkLYltxir/r6Cia9hfp/F6OXpcZI
    # QqKzn11djvbCCL7m9OXhuI3ZP+TIcX7QOabSstfghHlNG1qs/RkXwIRqKHsfRXNG
    # nywBTjwIDSiZ4cbZVJ6OjXxbU9OBRkmDgh+SYEVMlFi4E+t3WeTMC8gxUsjfITpK
    # JXFoduN2P0yKRjkWQ2OSQ7xX4StFPikXBH1eC8RNnW4IY00wMiJ0tM/0+j+qJLLM
    # Ft/bceIZhnGs+axN0jF1EtR03uLZ0kmy3YqsH/KnBnufrag3ytpC/kAtl9Scd6m+
    # N4pAT9cfgxqXv/yXAKGupoNPwPGvvSKV6XQTJt2Hn7PBadHWlvlBkgYqGIejpHDM
    # x9EghA8o4q5rTu9zTqBv36bOHJEDbJhmq5dYqJTS/q1ORjnWQQsLxv+6XGN3wrbb
    # OuexPdD8fH3mWrjeJJ3KDKojOYyGyg==
    # =gUyL
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Fri 29 Sep 2023 02:32:11 EDT
    # gpg:                using RSA key 6E636A7E83F2DD0CFA6E6E370AD2C6396B69CA14
    # gpg:                issuer "[email protected]"
    # gpg: Good signature from "Bastian Koppelmann <[email protected]>" [unknown]
    # gpg: WARNING: The key's User ID is not certified with a trusted signature!
    # gpg:          There is no indication that the signature belongs to the owner.
    # Primary key fingerprint: 6E63 6A7E 83F2 DD0C FA6E  6E37 0AD2 C639 6B69 CA14
    
    * tag 'pull-tricore-20230929' of https://github.com/bkoppelmann/qemu:
      target/tricore: Change effective address (ea) to target_ulong
      target/tricore: Remove CSFRs from cpu.h
      tests/tcg: Reset result register after each test
      hw/tricore: Log failing test in testdevice
      tests/tcg/tricore: Extended and non-extened regs now match
      target/tricore: Fix FTOUZ being ISA v1.3.1 up
      target/tricore: Replace cpu_*_code with translator_*
      target/tricore: Swap src and dst reg for RCRR_INSERT
      target/tricore: Fix RCPW/RRPW_INSERT insns for width = 0
      target/tricore: Implement hptof insn
      target/tricore: Implement ftohp insn
      target/tricore: Clarify special case for FTOUZ insn
      target/tricore: Implement FTOU insn
      target/tricore: Correctly handle FPU RM from PSW
      target/tricore: Implement CRCN insn
      tests/tcg/tricore: Bump cpu to tc37x
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    a3108b2 View commit details
    Browse the repository at this point in the history
  5. Merge tag 'pull-shadow-2023-09-29' of https://repo.or.cz/qemu/armbru

    …into staging
    
    -Wshadow=local patches patches for 2023-09-29
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmUWhnsSHGFybWJydUBy
    # ZWRoYXQuY29tAAoJEDhwtADrkYZTDBkP/2E8cyH+fn7yehNAZT8fjBuDBaj0x3wf
    # Bs4++bMEZpgfA/11le/Mm+N9BFDtoGj4dnDwQ0yN6bcKcfmNvxh+M+lNaRO+xvXA
    # qs/kJtFYkJYuEj1wgKK2XXd4YcD/S4Qap+FSuUBv8KE/oeALkB1fEpvMcwtJtQqc
    # 7POQEqYNQfUe+MX/wKZ+qditbbrFRwX69dAd8+nGTbFestXd2uFA5I5kv3ebxELg
    # VjTBgQdp7s82iTvoXpTtmQ6A9ba13zmelxmsAMLlAihkbffMwbtbrkQ7qIIUOW1o
    # I4WPxhIXXyZbB48qARUq5G3GQuh+7dRArcpYWaFel2a6cjm2Z6NmWJeRAr0cIaWV
    # P5B79k7DO551YsBZn+ubH0U+qwMLw+zq2apQ+SeH/loE0pP/c2OBOPtaVI46D0Dh
    # 2kgaSuTIy9AByAHoYBxKnxy4TVwPKzk8hdzCQdiRSO7KJdMqMsV+/w1eR4oH9dsf
    # CAvJXVzLicFMMABA/4O99K+1yjIOQpwmiqAjc+gV6FdhwllSH3yQDiK4RMWNAwRu
    # bRQHBCk143t7cM3ts09T+5QxkWB3U0iGMJ4rpn43yjH5xwlWmpTlztvd7XlXwyTR
    # 8j2Z+8qxe992HmVk34rKdkGnu0qz4AhJBgAEEk2e0oepZvjfigqodQwEMCQsse5t
    # cH51HzTDuen/
    # =XVKC
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Fri 29 Sep 2023 04:10:35 EDT
    # gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
    # gpg:                issuer "[email protected]"
    # gpg: Good signature from "Markus Armbruster <[email protected]>" [full]
    # gpg:                 aka "Markus Armbruster <[email protected]>" [full]
    # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
    
    * tag 'pull-shadow-2023-09-29' of https://repo.or.cz/qemu/armbru: (56 commits)
      disas/m68k: clean up local variable shadowing
      hw/nvme: Clean up local variable shadowing in nvme_ns_init()
      softmmu/device_tree: Fixup local variables shadowing
      target/riscv: vector_helper: Fixup local variables shadowing
      target/riscv: cpu: Fixup local variables shadowing
      hw/riscv: opentitan: Fixup local variables shadowing
      qemu-nbd: changes towards enabling -Wshadow=local
      seccomp: avoid shadowing of 'action' variable
      crypto: remove shadowed 'ret' variable
      intel_iommu: Fix shadow local variables on "size"
      aspeed/timer: Clean up local variable shadowing
      aspeed/i3c: Rename variable shadowing a local
      aspeed: Clean up local variable shadowing
      aspeed/i2c: Clean up local variable shadowing
      hw/arm/smmuv3-internal.h: Don't use locals in statement macros
      hw/arm/smmuv3.c: Avoid shadowing variable
      hw/misc/arm_sysctl.c: Avoid shadowing local variable
      hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd()
      hw/acpi: changes towards enabling -Wshadow=local
      test-throttle: don't shadow 'index' variable in do_test_accounting()
      ...
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    5d7e601 View commit details
    Browse the repository at this point in the history
  6. Merge tag 'migration-20231002-pull-request' of https://gitlab.com/jua…

    …n.quintela/qemu into staging
    
    Migration Pull request (20231002)
    
    In this migration pull request:
    
    - Refactor repeated call of yank_unregister_instance (tejus)
    - More migraton-test changes
    
    Please, apply.
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmUatX4ACgkQ9IfvGFhy
    # 1yMlbQ/+Kp7m1Mr5LUM/8mvh9LZTVvWauBHch1pdvpCsJO+Grdtv6MtZL5UKT2ue
    # xYksZvf/rT4bdt2H1lSsG1o2GOcIf4qyWICgYNDo8peaxm1IrvgAbimaWHWLeORX
    # sBxKcBBuTac55vmEKzbPSbwGCGGTU/11UGXQ4ruGN3Hwbd2JZHAK6GxGIzANToZc
    # JtwBr/31SxJ2YndNLaPMEnD3cHbRbD2UyODeTt1KI5LdTGgXHoB6PgCk2AMQP1Ko
    # LlaPLsrEKC06h2CJ27BB36CNVEGMN2iFa3aKz1FC85Oj2ckatspAFw78t9guj6eM
    # MYxn0ipSsjjWjMsc3zEDxi7JrA///5bp1e6e7WdLpOaMBPpV4xuvVvA6Aku2es7D
    # fMPOMdftBp6rrXp8edBMTs1sOHdE1k8ZsyJ90m96ckjfLX39TPAiJRm4pWD2UuP5
    # Wjr+/IU+LEp/KCqimMj0kYMRz4rM3PP8hOakPZLiRR5ZG6sgbHZK44iPXB/Udz/g
    # TCZ87siIpI8YHb3WCaO5CvbdjPrszg1j9v7RimtDeGLDR/hNokkQ1EEeszDTGpgt
    # xst4S4wVmex2jYyi53woH4V1p8anP7iqa8elPehAaYPobp47pmBV53ZaSwibqzPN
    # TmO7P9rfyQGCiXXZRvrAQJa+gmAkQlSEI7mSssV77pU+1gdEj9c=
    # =hD/8
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Mon 02 Oct 2023 08:20:14 EDT
    # gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
    # gpg: Good signature from "Juan Quintela <[email protected]>" [full]
    # gpg:                 aka "Juan Quintela <[email protected]>" [full]
    # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
    
    * tag 'migration-20231002-pull-request' of https://gitlab.com/juan.quintela/qemu:
      migration/rdma: Simplify the function that saves a page
      migration: Remove unused qemu_file_credit_transfer()
      migration/rdma: Don't use imaginary transfers
      migration/rdma: Remove QEMUFile parameter when not used
      migration/RDMA: It is accounting for zero/normal pages in two places
      migration: Don't abuse qemu_file transferred for RDMA
      migration: Use qemu_file_transferred_noflush() for block migration.
      migration: Refactor repeated call of yank_unregister_instance
      migration-test: simplify shmem_opts handling
      migration-test: dirtylimit checks for x86_64 arch before
      migration-test: Add bootfile_create/delete() functions
      migration-test: bootpath is the same for all tests and for all archs
      migration-test: Create kvm_opts
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    50d0bfd View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux()

    The call to esp_dma_enable() was being made with the SYSBUS_ESP type instead of
    the ESP type. This meant that when GPIO 1 was being used to trigger a DMA
    request from an external DMA controller, the setting of ESPState's dma_enabled
    field would clobber unknown memory whilst the dma_cb callback pointer would
    typically return NULL so the DMA request would never start.
    
    Signed-off-by: Mark Cave-Ayland <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Thomas Huth <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    mcayland authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    b86dc5c View commit details
    Browse the repository at this point in the history
  2. esp: restrict non-DMA transfer length to that of available data

    In the case where a SCSI layer transfer is incorrectly terminated, it is
    possible for a TI command to cause a SCSI buffer overflow due to the
    expected transfer data length being less than the available data in the
    FIFO. When this occurs the unsigned async_len variable underflows and
    becomes a large offset which writes past the end of the allocated SCSI
    buffer.
    
    Restrict the non-DMA transfer length to be the smallest of the expected
    transfer length and the available FIFO data to ensure that it is no longer
    possible for the SCSI buffer overflow to occur.
    
    Signed-off-by: Mark Cave-Ayland <[email protected]>
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1810
    Reviewed-by: Thomas Huth <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    mcayland authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    77668e4 View commit details
    Browse the repository at this point in the history
  3. scsi-disk: ensure that FORMAT UNIT commands are terminated

    Otherwise when a FORMAT UNIT command is issued, the SCSI layer can become
    confused because it can find itself in the situation where it thinks there
    is still data to be transferred which can cause the next emulated SCSI
    command to fail.
    
    Signed-off-by: Mark Cave-Ayland <[email protected]>
    Fixes: 6ab7176 ("scsi-disk: add FORMAT UNIT command")
    Tested-by: Thomas Huth <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    mcayland authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    be2b619 View commit details
    Browse the repository at this point in the history
  4. crypto: only include tls-cipher-suites in emulators

    tls-cipher-suites is an object that is used to inject TLS configuration
    into the guest (via fw_cfg).  It is never used for host-side TLS
    operation, and therefore it need not be available in the tools.
    
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0c1a529 View commit details
    Browse the repository at this point in the history
  5. ui/vnc: Require audiodev= to enable audio

    If there is no audiodev do not send the audio ack in response to
    VNC_ENCODING_AUDIO, so that clients aren't told audio exists, and
    immediately drop the client if they try to send any audio control messages
    when audio is not advertised.
    
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9e58d7a View commit details
    Browse the repository at this point in the history
  6. audio: Require AudioState in AUD_add_capture

    Since all callers require a valid audiodev this function can now safely
    abort in case of missing AudioState.
    
    Signed-off-by: Martin Kletzander <[email protected]>
    Message-ID: <c6e87e678e914df0f59da2145c2753cdb4a16f63.1650874791.git.mkletzan@redhat.com>
    Signed-off-by: Paolo Bonzini <[email protected]>
    nertpinx authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    aaa6a6f View commit details
    Browse the repository at this point in the history
  7. audio: allow returning an error from the driver init

    An error is already printed by audio_driver_init, but we can make
    it more precise if the driver can return an Error *.
    
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    f606173 View commit details
    Browse the repository at this point in the history
  8. audio: return Error ** from audio_state_by_name

    Remove duplicate error formatting code.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    176adaf View commit details
    Browse the repository at this point in the history
  9. audio: commonize voice initialization

    Move some mostly irrelevant code out of audio_init.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5c63d14 View commit details
    Browse the repository at this point in the history
  10. audio: simplify flow in audio_init

    Merge two ifs into one.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    e329963 View commit details
    Browse the repository at this point in the history
  11. audio: remove QEMU_AUDIO_* and -audio-help support

    These have been deprecated for a long time, and the introduction of
    -audio in 7.1.0 has cemented the new way of specifying an audio backend's
    parameters.  However, there is still a need for simple configuration
    of the audio backend in the desktop case; therefore, if no audiodev is
    passed to audio_init(), go through a bunch of simple Audiodev* structures
    and pick the first that can be initialized successfully.
    
    The only QEMU_AUDIO_* option that is left in, waiting for a better idea,
    is QEMU_AUDIO_DRV=none which is used by qtest.
    
    Remove all the parsing code, including the concept of "can_be_default"
    audio drivers: now that audio_prio_list[] is only used in a single place,
    wav can be excluded directly in that function.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    69a8027 View commit details
    Browse the repository at this point in the history
  12. Introduce machine property "audiodev"

    Many machine types have default audio devices with no way to set the underlying
    audiodev.  Instead of adding an option for each and every one of them, this new
    property can be used as a default during machine initialisation when creating
    such devices.
    
    Signed-off-by: Martin Kletzander <[email protected]>
    [Make the property optional, instead of including it in all machines. - Paolo]
    Signed-off-by: Paolo Bonzini <[email protected]>
    nertpinx authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    7a2c7da View commit details
    Browse the repository at this point in the history
  13. hw/arm: Support machine-default audiodev with fallback

    Signed-off-by: Martin Kletzander <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    nertpinx authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    b8ab030 View commit details
    Browse the repository at this point in the history
  14. hw/ppc: Support machine-default audiodev with fallback

    Signed-off-by: Martin Kletzander <[email protected]>
    Signed-off-by: Paolo Bonzini <[email protected]>
    nertpinx authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    2b16397 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9dcb64c View commit details
    Browse the repository at this point in the history
  16. audio: propagate Error * out of audio_init

    Starting from audio_driver_init, propagate errors via Error ** so that
    audio_init_audiodevs can simply pass &error_fatal, and AUD_register_card
    can signal faiure.
    
    Signed-off-by: Martin Kletzander <[email protected]>
    [Reworked the audio/audio.c parts, while keeping Martin's hw/ changes. - Paolo]
    Signed-off-by: Paolo Bonzini <[email protected]>
    nertpinx authored and bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    cb94ff5 View commit details
    Browse the repository at this point in the history
  17. audio: forbid default audiodev backend with -nodefaults

    Now that all callers support setting an audiodev, forbid using the default
    audiodev if -nodefaults is provided on the command line.
    
    Signed-off-by: Paolo Bonzini <[email protected]>
    bonzini committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9f8cf35 View commit details
    Browse the repository at this point in the history
  18. input: Allow to choose console with qemu_input_is_absolute

    Although an input is routed depending on the console,
    qemu_input_is_absolute() had no mechanism to specify the console.
    
    Accept QemuConsole as an argument for qemu_input_is_absolute, and let
    the display know the absolute/relative state for a particular console.
    
    Signed-off-by: Akihiko Odaki <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-Id: <[email protected]>
    akihikodaki authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0337e41 View commit details
    Browse the repository at this point in the history
  19. ui/console: make qemu_console_is_multihead() static

    qemu_console_is_multihead() is only called from within "ui/console.c";
    make it static.
    
    Cc: "Marc-André Lureau" <[email protected]> (odd fixer:Graphics)
    Cc: Gerd Hoffmann <[email protected]> (odd fixer:Graphics)
    Signed-off-by: Laszlo Ersek <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    lersek authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    845fff1 View commit details
    Browse the repository at this point in the history
  20. ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead()

    qemu_console_is_multihead() declares the console "c" a "multihead" console
    if there are two different consoles in the system that (a) both reference
    "c->device", and (b) have different "c->head" numbers. In effect, if at
    least two consoles exist that are different heads of the same device that
    underlies "c".
    
    Commit 58d5870 ("ui/console: move graphic fields to
    QemuGraphicConsole", 2023-09-04) pushed the "device" and "head" members
    from the QemuConsole base class down to the QemuGraphicConsole subclass,
    adjusting the referring QOM properties accordingly as well. As a result,
    the "device" property lookup in qemu_console_is_multihead() now crashes,
    in case the candidate console being investigated for criterion (a) is not
    a QemuGraphicConsole instance:
    
    > Unexpected error in object_property_find_err() at qom/object.c:1314:
    > qemu: Property 'qemu-fixed-text-console.device' not found
    > Aborted (core dumped)
    
    This is effectively an unchecked downcast. Make it checked: only consider
    such console candidates that are themselves QemuGraphicConsole instances.
    
    Cc: "Marc-André Lureau" <[email protected]> (odd fixer:Graphics)
    Cc: Gerd Hoffmann <[email protected]> (odd fixer:Graphics)
    Fixes: 58d5870
    Signed-off-by: Laszlo Ersek <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    lersek authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4ce2f97 View commit details
    Browse the repository at this point in the history
  21. ui/console: eliminate QOM properties from qemu_console_is_multihead()

    According to Marc-André's and Gerd's descriptions, the "device" and
    "head" members of QemuGraphicConsole are exposed as QOM properties for two
    purposes:
    
    (1) Introspection (e.g., "qom-get" monitor command).
    
    (2) A VNC server can display a specific device + head. This lets us run a
        multihead configuration by using multiple VNC servers (one for each
        head).
    
        Further, we can link input devices to device + head, so input events
        are routed to different devices dependent on where they are coming
        from. Which is most useful for tablet devices in a VNC multihead
        setup, each head has its own tablet device then. This does requires
        manual guest-side configuration, for establishing the same tablet <->
        head relationship.
    
    However, neither goal seems to justify the complicated QOM property lookup
    that's internal to qemu_console_is_multihead().
    
    Rework qemu_console_is_multihead() with plain old C language field
    accesses.
    
    Cc: "Marc-André Lureau" <[email protected]> (odd fixer:Graphics)
    Cc: Gerd Hoffmann <[email protected]> (odd fixer:Graphics)
    Signed-off-by: Laszlo Ersek <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    lersek authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    2c0c4c1 View commit details
    Browse the repository at this point in the history
  22. ui/console: sanitize search in qemu_graphic_console_is_multihead()

    qemu_graphic_console_is_multihead() declares the graphical console "c" a
    "multihead" console if there are two different graphical consoles in the
    system that (a) both reference "c->device", and (b) have different
    "c->head" numbers. In effect, if at least two graphical consoles exist
    that are different heads of the same device that underlies "c". In fact,
    "c" may be one of these two graphical consoles, or "c" may differ from
    both of those consoles (in case "c->device" has at least three heads).
    
    The loop currently uses this awkward "two different consoles" approach
    because the function used not to have access to "c", only to "c->device",
    which didn't allow for fetching (and comparing) "c->head". But, we've
    changed that in the last patch; we now pass all of "c" to
    qemu_graphic_console_is_multihead().
    
    Thus, look for the *first* (and possibly *only*) graphical console, if
    any, that refers to the same "device" as "c", but by a different "head"
    number.
    
    Cc: "Marc-André Lureau" <[email protected]> (odd fixer:Graphics)
    Cc: Gerd Hoffmann <[email protected]> (odd fixer:Graphics)
    Signed-off-by: Laszlo Ersek <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    lersek authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    65d7ceb View commit details
    Browse the repository at this point in the history
  23. ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map

    Android uses XBGR8888 and ABGR8888 as default scanout buffer, But qemu
    does not support them for qemu_pixman_to_drm_format conversion within
    virtio_gpu_create_dmabuf for virtio gpu.
    
    so, add those 2 formats into drm_format_pixman_map.
    
    Signed-off-by: Ken Xue <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    firstbread authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    7db57a7 View commit details
    Browse the repository at this point in the history
  24. win32: avoid discarding the exception handler

    In all likelihood, the compiler with lto doesn't see the function being
    used, from assembly macro __try1. Help it by marking the function has
    being used.
    
    Resolves:
    https://gitlab.com/qemu-project/qemu/-/issues/1904
    
    Fixes: commit d89f30b ("win32: wrap socket close() with an exception handler")
    
    Signed-off-by: Marc-André Lureau <[email protected]>
    Reviewed-by: Thomas Huth <[email protected]>
    elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    75b773d View commit details
    Browse the repository at this point in the history
  25. ui/gtk: fix UI info precondition

    dpy_get_ui_info() shouldn't be called if the underlying GPU doesn't
    support it.
    
    Before the assert() was added and the regression introduced, GTK code
    used to get "zero" UI info, for ex with a simple VGA device. The assert
    was added to prevent from calling when there are no console too. The
    other display backend that calls dpy_get_ui_info() correctly checks that
    pre-condition.
    
    Calling dpy_set_ui_info() is "safe" in this case, it will simply return
    an error that can be generally ignored.
    
    Fixes: commit a92e7bb ("ui: add precondition for dpy_get_ui_info()")
    Signed-off-by: Marc-André Lureau <[email protected]>
    elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9bd4d3d View commit details
    Browse the repository at this point in the history
  26. analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH

    Traceback (most recent call last):
      File "scripts/analyze-migration.py", line 605, in <module>
        dump.read(dump_memory = args.memory)
      File "scripts/analyze-migration.py", line 542, in read
        section.read()
      File "scripts/analyze-migration.py", line 214, in read
        raise Exception("Unknown RAM flags: %x" % flags)
    Exception: Unknown RAM flags: 200
    
    See commit 77c259a ("multifd: Create property multifd-flush-after-each-section")
    
    Signed-off-by: Marc-André Lureau <[email protected]>
    Reviewed-by: Fabiano Rosas <[email protected]>
    elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    f1de309 View commit details
    Browse the repository at this point in the history
  27. hw/core: remove needless includes

    The include list is large, make it smaller.
    
    Signed-off-by: Marc-André Lureau <[email protected]>
    Acked-by: Laszlo Ersek <[email protected]>
    elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    314e0a8 View commit details
    Browse the repository at this point in the history
  28. hw/pc: remove needless includes

    The include list is gigantic, make it smaller.
    
    Signed-off-by: Marc-André Lureau <[email protected]>
    Acked-by: Laszlo Ersek <[email protected]>
    elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    bf7e521 View commit details
    Browse the repository at this point in the history
  29. hw/display/ramfb: plug slight guest-triggerable leak on mode setting

    The fw_cfg DMA write callback in ramfb prepares a new display surface in
    QEMU; this new surface is put to use ("swapped in") upon the next display
    update. At that time, the old surface (if any) is released.
    
    If the guest triggers the fw_cfg DMA write callback at least twice between
    two adjacent display updates, then the second callback (and further such
    callbacks) will leak the previously prepared (but not yet swapped in)
    display surface.
    
    The issue can be shown by:
    
    (1) starting QEMU with "-trace displaysurface_free", and
    
    (2) running the following program in the guest UEFI shell:
    
    > #include <Library/ShellCEntryLib.h>           // ShellAppMain()
    > #include <Library/UefiBootServicesTableLib.h> // gBS
    > #include <Protocol/GraphicsOutput.h>          // EFI_GRAPHICS_OUTPUT_PROTOCOL
    >
    > INTN
    > EFIAPI
    > ShellAppMain (
    >   IN UINTN   Argc,
    >   IN CHAR16  **Argv
    >   )
    > {
    >   EFI_STATUS                    Status;
    >   VOID                          *Interface;
    >   EFI_GRAPHICS_OUTPUT_PROTOCOL  *Gop;
    >   UINT32                        Mode;
    >
    >   Status = gBS->LocateProtocol (
    >                   &gEfiGraphicsOutputProtocolGuid,
    >                   NULL,
    >                   &Interface
    >                   );
    >   if (EFI_ERROR (Status)) {
    >     return 1;
    >   }
    >
    >   Gop = Interface;
    >
    >   Mode = 1;
    >   for ( ; ;) {
    >     Status = Gop->SetMode (Gop, Mode);
    >     if (EFI_ERROR (Status)) {
    >       break;
    >     }
    >
    >     Mode = 1 - Mode;
    >   }
    >
    >   return 1;
    > }
    
    The symptom is then that:
    
    - only one trace message appears periodically,
    
    - the time between adjacent messages keeps increasing -- implying that
      some list structure (containing the leaked resources) keeps growing,
    
    - the "surface" pointer is ever different.
    
    > [email protected]:displaysurface_free surface=0x7f2fcc09a7c0
    > [email protected]:displaysurface_free surface=0x7f2fcc9dac10
    > [email protected]:displaysurface_free surface=0x7f2fcc441dd0
    > [email protected]:displaysurface_free surface=0x7f2fcc0363d0
    > [email protected]:displaysurface_free surface=0x7f2fcc413a80
    > [email protected]:displaysurface_free surface=0x7f2fcc09cd00
    > [email protected]:displaysurface_free surface=0x7f2fcc1395f0
    > [email protected]:displaysurface_free surface=0x7f2fcc1cae50
    > [email protected]:displaysurface_free surface=0x7f2fcc42fc50
    > [email protected]:displaysurface_free surface=0x7f2fcc45dcc0
    > [email protected]:displaysurface_free surface=0x7f2fcc70b9d0
    > [email protected]:displaysurface_free surface=0x7f2fcc82acc0
    > [email protected]:displaysurface_free surface=0x7f2fcc369c00
    > [email protected]:displaysurface_free surface=0x7f2fcc32b910
    > [email protected]:displaysurface_free surface=0x7f2fcc0d5a20
    > [email protected]:displaysurface_free surface=0x7f2fcc086c40
    > [email protected]:displaysurface_free surface=0x7f2fccc72020
    > [email protected]:displaysurface_free surface=0x7f2fcc185160
    > [email protected]:displaysurface_free surface=0x7f2fcc23a7e0
    > [email protected]:displaysurface_free surface=0x7f2fcc3ec870
    > [email protected]:displaysurface_free surface=0x7f2fcc634960
    > [email protected]:displaysurface_free surface=0x7f2fcc26b140
    > [email protected]:displaysurface_free surface=0x7f2fcc321700
    > [email protected]:displaysurface_free surface=0x7f2fccaad100
    
    We figured this wasn't a CVE-worthy problem, as only small amounts of
    memory were leaked (the framebuffer itself is mapped from guest RAM, QEMU
    only allocates administrative structures), plus libvirt restricts QEMU
    memory footprint anyway, thus the guest can only DoS itself.
    
    Plug the leak, by releasing the last prepared (not yet swapped in) display
    surface, if any, in the fw_cfg DMA write callback.
    
    Regarding the "reproducer", with the fix in place, the log is flooded with
    trace messages (one per fw_cfg write), *and* the trace message alternates
    between just two "surface" pointer values (i.e., nothing is leaked, the
    allocator flip-flops between two objects in effect).
    
    This issue appears to date back to the introducion of ramfb (995b301,
    "hw/display: add ramfb, a simple boot framebuffer living in guest ram",
    2018-06-18).
    
    Cc: Gerd Hoffmann <[email protected]> (maintainer:ramfb)
    Cc: [email protected]
    Fixes: 995b301
    Signed-off-by: Laszlo Ersek <[email protected]>
    Acked-by: Laszlo Ersek <[email protected]>
    Reviewed-by: Gerd Hoffmann <[email protected]>
    Reviewed-by: Marc-André Lureau <[email protected]>
    Message-ID: <[email protected]>
    lersek authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    e0288a7 View commit details
    Browse the repository at this point in the history
  30. chardev/char-pty: Avoid losing bytes when the other side just (re-)co…

    …nnected
    
    When starting a guest via libvirt with "virsh start --console ...",
    the first second of the console output is missing. This is especially
    annoying on s390x that only has a text console by default and no graphical
    output - if the bios fails to boot here, the information about what went
    wrong is completely lost.
    
    One part of the problem (there is also some things to be done on the
    libvirt side) is that QEMU only checks with a 1 second timer whether
    the other side of the pty is already connected, so the first second of
    the console output is always lost.
    
    This likely used to work better in the past, since the code once checked
    for a re-connection during write, but this has been removed in commit
    f8278c7 ("char-pty: remove the check for connection on write") to avoid
    some locking.
    
    To ease the situation here at least a little bit, let's check with g_poll()
    whether we could send out the data anyway, even if the connection has not
    been marked as "connected" yet. The file descriptor is marked as non-blocking
    anyway since commit fac6688 ("Do not hang on full PTY"), so this should
    not cause any trouble if the other side is not ready for receiving yet.
    
    With this patch applied, I can now successfully see the bios output of
    a s390x guest when running it with "virsh start --console" (with a patched
    version of virsh that fixes the remaining issues there, too).
    
    Reported-by: Marc Hartmayer <[email protected]>
    Signed-off-by: Thomas Huth <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Message-Id: <[email protected]>
    huth authored and elmarco committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4f7689f View commit details
    Browse the repository at this point in the history
  31. Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

    * fix from optionrom build
    * fix for KVM on Apple M2
    * introduce machine property "audiodev"
    * ui/vnc: Require audiodev= to enable audio
    * audio: remove QEMU_AUDIO_* and -audio-help support
    * audio: forbid using default audiodev backend with -audiodev and -nodefaults
    * remove compatibility code for old machine types
    * make-release: do not ship dtc sources
    * build system cleanups
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmUb0QgUHHBib256aW5p
    # QHJlZGhhdC5jb20ACgkQv/vSX3jHroOpnAf9EFXfGkXpqQ5Q8ZbVlVc5GQKofMHW
    # OZwamTBlp/c07+QcQiMxwLhIW0iyDhrfdCjoFSUaTA8O10FM1YrFv4SkUryYb9B3
    # bmoTl4NeLvmkxpC47GEeaaBfjyM0G/9Ip9Zsuqx3u+gSzwTbkEstA2u7gcsN0tL9
    # VlhMSiV82uHhRC/DJYLxr+8bRYSIm1AeuI8K/O1yags85Kztf3UiQUhePIKLznMH
    # BdORjD+i46xM1dE8ifpdsunm462cDWz/faAnIH0YVKBlshnQHXKTO+GDA/Fbfl51
    # wFfupZXo93wwgawS7elAUzI+gwaKCPRHA8NDcukeO91hTzk6i14y04u5SQ==
    # =nv64
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 03 Oct 2023 04:30:00 EDT
    # gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
    # gpg:                issuer "[email protected]"
    # gpg: Good signature from "Paolo Bonzini <[email protected]>" [full]
    # gpg:                 aka "Paolo Bonzini <[email protected]>" [full]
    # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
    #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
    
    * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (24 commits)
      audio: forbid default audiodev backend with -nodefaults
      audio: propagate Error * out of audio_init
      vt82c686 machines: Support machine-default audiodev with fallback
      hw/ppc: Support machine-default audiodev with fallback
      hw/arm: Support machine-default audiodev with fallback
      Introduce machine property "audiodev"
      audio: remove QEMU_AUDIO_* and -audio-help support
      audio: simplify flow in audio_init
      audio: commonize voice initialization
      audio: return Error ** from audio_state_by_name
      audio: allow returning an error from the driver init
      audio: Require AudioState in AUD_add_capture
      ui/vnc: Require audiodev= to enable audio
      crypto: only include tls-cipher-suites in emulators
      scsi-disk: ensure that FORMAT UNIT commands are terminated
      esp: restrict non-DMA transfer length to that of available data
      esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux()
      Makefile: build plugins before running TCG tests
      meson: clean up static_library keyword arguments
      make-release: do not ship dtc sources
      ...
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    da10340 View commit details
    Browse the repository at this point in the history
  32. bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, …

    …and fix RLIM_INFINITY
    
    RLIM_INFINITY on FreeBSD, OpenBSD and NetBSD has value of ~(1<<63), caculated
    one way or another.
    
    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5783a53 View commit details
    Browse the repository at this point in the history
  33. bsd-user: Define procctl(2) related structs

    Implement procctl flags and related structs:
    struct target_procctl_reaper_status
    struct target_procctl_reaper_pidinfo
    struct target_procctl_reaper_pids
    struct target_procctl_reaper_kill
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    d314ae9 View commit details
    Browse the repository at this point in the history
  34. bsd-user: Implement host_to_target_siginfo.

    Used in wait6 system call
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3f254cf View commit details
    Browse the repository at this point in the history
  35. bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    cc47390 View commit details
    Browse the repository at this point in the history
  36. bsd-user: add extern declarations for bsd-proc.c conversion functions

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    00bff01 View commit details
    Browse the repository at this point in the history
  37. bsd-user: Implement target_to_host_resource conversion function

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0caa376 View commit details
    Browse the repository at this point in the history
  38. bsd-user: Implement target_to_host_rlim and host_to_target_rlim conve…

    …rsion.
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    550fc70 View commit details
    Browse the repository at this point in the history
  39. bsd-user: Implement host_to_target_rusage and host_to_target_wrusage.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    66c51d6 View commit details
    Browse the repository at this point in the history
  40. bsd-user: Implement host_to_target_waitstatus conversion.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3f44e27 View commit details
    Browse the repository at this point in the history
  41. bsd-user: Get number of cpus.

    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    kevans91 authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    b623031 View commit details
    Browse the repository at this point in the history
  42. bsd-user: Implement getgroups(2) and setgroups(2) system calls.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    a478416 View commit details
    Browse the repository at this point in the history
  43. bsd-user: Implement umask(2), setlogin(2) and getlogin(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    82fe5f3 View commit details
    Browse the repository at this point in the history
  44. bsd-user: Implement getrusage(2).

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    59e801e View commit details
    Browse the repository at this point in the history
  45. bsd-user: Implement getrlimit(2) and setrlimit(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    faba8e1 View commit details
    Browse the repository at this point in the history
  46. bsd-user: Implement several get/set system calls:

    getpid(2), getppid(2), getpgrp(2)
    setreuid(2), setregid(2)
    getuid(2), geteuid(2), getgid(2), getegid(2), getpgid(2)
    setuid(2), seteuid(2), setgid(2), setegid(2), setpgid(2)
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    e4446e0 View commit details
    Browse the repository at this point in the history
  47. bsd-user: Implement get/set[resuid/resgid/sid] and issetugid.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    932683c View commit details
    Browse the repository at this point in the history
  48. bsd-user: Add stubs for profil(2), ktrace(2), utrace(2) and ptrace(2).

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    615ad41 View commit details
    Browse the repository at this point in the history
  49. bsd-user: Implement getpriority(2) and setpriority(2).

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ff26637 View commit details
    Browse the repository at this point in the history
  50. bsd-user: Implement get_filename_from_fd.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    84d41c5 View commit details
    Browse the repository at this point in the history
  51. bsd-user: Implement freebsd_exec_common, used in implementing execve/…

    …fexecve.
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    8632729 View commit details
    Browse the repository at this point in the history
  52. bsd-user: Implement procctl(2) along with necessary conversion functi…

    …ons.
    
    Implement t2h_procctl_cmd, h2t_reaper_status, h2t_reaper_pidinfo and h2t/t2h reaper_kill conversion functions.
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    dcaa3df View commit details
    Browse the repository at this point in the history
  53. bsd-user: Implement execve(2) and fexecve(2) system calls.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    36999e6 View commit details
    Browse the repository at this point in the history
  54. bsd-user: Implement wait4(2) and wait6(2) system calls.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ae50288 View commit details
    Browse the repository at this point in the history
  55. bsd-user: Implement setloginclass(2) and getloginclass(2) system calls.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    159e5b0 View commit details
    Browse the repository at this point in the history
  56. bsd-user: Implement pdgetpid(2) and the undocumented setugid.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0571e3f View commit details
    Browse the repository at this point in the history
  57. bsd-user: Implement fork(2) and vfork(2) system calls.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    831a5a7 View commit details
    Browse the repository at this point in the history
  58. bsd-user: Implement rfork(2) system call.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    510eecb View commit details
    Browse the repository at this point in the history
  59. bsd-user: Implement pdfork(2) system call.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Acked-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    6756ae2 View commit details
    Browse the repository at this point in the history
  60. bsd-user: Implement struct target_ipc_perm

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    61a8f11 View commit details
    Browse the repository at this point in the history
  61. bsd-user: Implement struct target_shmid_ds

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    695cb91 View commit details
    Browse the repository at this point in the history
  62. bsd-user: Declarations for ipc_perm and shmid_ds conversion functions

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    1d4c402 View commit details
    Browse the repository at this point in the history
  63. bsd-user: Introduce freebsd/os-misc.h to the source tree

    To preserve the copyright notice and help with the 'Author' info for
    subsequent changes to the file.
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    137d963 View commit details
    Browse the repository at this point in the history
  64. bsd-user: Implement shm_open2(2) system call

    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0c35298 View commit details
    Browse the repository at this point in the history
  65. bsd-user: Implement shm_rename(2) system call

    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    kevans91 authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    182ea72 View commit details
    Browse the repository at this point in the history
  66. bsd-user: Add bsd-mem.c to meson.build

    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    dde5f40 View commit details
    Browse the repository at this point in the history
  67. bsd-user: Implement target_set_brk function in bsd-mem.c instead of o…

    …s-syscall.c
    
    The definitions and variables names matches the corresponding ones in
    linux-user/syscall.c, for making later implementation of do_obreak easier
    
    Co-authored-by: Mikaël Urankar <[email protected]>
    Signed-off-by: Mikaël Urankar <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    2 people authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    c9cdf0a View commit details
    Browse the repository at this point in the history
  68. bsd-user: Implement ipc_perm conversion between host and target.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    86fbb44 View commit details
    Browse the repository at this point in the history
  69. bsd-user: Implement shmid_ds conversion between host and target.

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    bd2b731 View commit details
    Browse the repository at this point in the history
  70. bsd-user: Introduce bsd-mem.h to the source tree

    Preserve the copyright notice and help with the 'Author' info for
    subsequent changes to the file.
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    6765e98 View commit details
    Browse the repository at this point in the history
  71. bsd-user: Implement mmap(2) and munmap(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    87dcb4a View commit details
    Browse the repository at this point in the history
  72. bsd-user: Implement mprotect(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ecbe224 View commit details
    Browse the repository at this point in the history
  73. bsd-user: Implement msync(2)

    Co-authored-by: Kyle Evans <[email protected]>
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    2 people authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    f28a1e4 View commit details
    Browse the repository at this point in the history
  74. bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2),…

    … minherit(2)
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0a49ef0 View commit details
    Browse the repository at this point in the history
  75. bsd-user: Implment madvise(2) to match the linux-user implementation.

    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    Kariiem authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0c1ced4 View commit details
    Browse the repository at this point in the history
  76. bsd-user: Implement mincore(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    83b045a View commit details
    Browse the repository at this point in the history
  77. bsd-user: Implement do_obreak function

    Match linux-user, by manually applying the following commits, in order:
    
    d28b3c9   linux-user: Make sure initial brk(0) is page-aligned
    15ad985   linux-user: Fix qemu brk() to not zero bytes on current page
    dfe4986   linux-user: Prohibit brk() to to shrink below initial heap address
    eac78a4   linux-user: Fix signed math overflow in brk() syscall
    c6cc059   linux-user: Do not call get_errno() in do_brk()
    e69e032   linux-user: Use MAP_FIXED_NOREPLACE for do_brk()
    cb9d5d1   linux-user: Do nothing if too small brk is specified
    2aea137   linux-user: Do not align brk with host page size
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    a99d740 View commit details
    Browse the repository at this point in the history
  78. bsd-user: Implement shm_open(2)

    Co-authored-by: Kyle Evans <[email protected]>
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Kyle Evans <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4f0be68 View commit details
    Browse the repository at this point in the history
  79. bsd-user: Implement shm_unlink(2) and shmget(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Warner Losh <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9d14db1 View commit details
    Browse the repository at this point in the history
  80. bsd-user: Implement shmctl(2)

    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    f9bbe3c View commit details
    Browse the repository at this point in the history
  81. bsd-user: Implement shmat(2) and shmdt(2)

    Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(),
    to match linux-user implementation, according to the following commits:
    
    69fa270 linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt}
    ceda568 linux-user: Fix shmdt
    
    Signed-off-by: Stacey Son <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Message-Id: <[email protected]>
    staceyson authored and bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4e00b7d View commit details
    Browse the repository at this point in the history
  82. bsd-user: Add stubs for vadvise(), sbrk() and sstk()

    The above system calls are not supported by qemu.
    
    Signed-off-by: Warner Losh <[email protected]>
    Signed-off-by: Karim Taha <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Message-Id: <[email protected]>
    bsdimp committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    dfa1d91 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. migration/vmstate: Introduce vmstate_save_state_with_err

    Currently, a few code paths exist in the function vmstate_save_state_v,
    which ultimately leads to a migration failure. However, an update in the
    current MigrationState for the error description is never done.
    
    vmstate.c somehow doesn't seem to allow	the use	of migrate_set_error due
    to some	dependencies for unit tests. Hence, this patch introduces a new
    function vmstate_save_state_with_err, which will eventually propagate
    the error message to savevm.c where a migrate_set_error	call can be
    eventually done.
    
    Acked-by: Peter Xu <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Tejus GK <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    gktejus authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    969298f View commit details
    Browse the repository at this point in the history
  2. migration: Update error description outside migration.c

    A few code paths exist in the source code,where a migration is
    marked as failed via MIGRATION_STATUS_FAILED, but the failure happens
    outside	of migration.c
    
    In such	cases, an error_report() call is made, however the current
    MigrationState is never	updated	with the error description, and	hence
    clients	like libvirt never know	the actual reason for the failure.
    
    This patch covers such cases outside of	migration.c and	updates	the
    error description at the appropriate places.
    
    Acked-by: Peter Xu <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Tejus GK <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    gktejus authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    848a050 View commit details
    Browse the repository at this point in the history
  3. MAINTAINERS: Add entry for rdma migration

    It's not obvious to many that RDMA migration is in Odd Fixes stage for a
    long time.  Add an explicit sub entry for it (besides migration, which
    already covers the rdma files) to be clear on that, meanwhile add Zhijian
    as Reviewer, so Zhijian can see the patches and review when he still has
    the bandwidth.
    
    Cc: Daniel P. Berrangé <[email protected]>
    Cc: Juan Quintela <[email protected]>
    Cc: Markus Armbruster <[email protected]>
    Cc: Zhijian Li (Fujitsu) <[email protected]>
    Cc: Fabiano Rosas <[email protected]>
    
    Acked-by: Li Zhijian <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Peter Xu <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    xzpeter authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    8ebcb4b View commit details
    Browse the repository at this point in the history
  4. migration: Add co-maintainers for migration

    Per the qemu upstream call a few hours ago, proposing Fabiano and myself as
    the co-maintainer for migration subsystem to help Juan.
    
    Cc: Fabiano Rosas <[email protected]>
    Cc: Juan Quintela <[email protected]>
    Acked-by: Fabiano Rosas <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Signed-off-by: Peter Xu <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    xzpeter authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    2bace55 View commit details
    Browse the repository at this point in the history
  5. migration/rdma: zore out head.repeat to make the error more clear

    Previously, we got a confusion error that complains
    the RDMAControlHeader.repeat:
    qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing.
    
    Actually, it's caused by an unexpected RDMAControlHeader.type.
    After this patch, error will become:
    qemu-system-x86_64: Unknown control message QEMU FILE
    
    Reviewed-by: Fabiano Rosas <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Li Zhijian <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    zhijianli88 authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    2ada4b6 View commit details
    Browse the repository at this point in the history
  6. i386/a-b-bootblock: factor test memory addresses out into constants

    So that we have less magic numbers to deal with. This also allows us to
    reuse these in the following commits.
    
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Daniil Tatianin <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    d-tatianin authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    67aeae7 View commit details
    Browse the repository at this point in the history
  7. i386/a-b-bootblock: zero the first byte of each page on start

    The migration qtest all the way up to this point used to work by sheer
    luck relying on the contents of all pages from 1MiB to 100MiB to contain
    the same one value in the first byte initially.
    
    This easily breaks if we reduce the amount of RAM for the test instances
    from 150MiB to e.g 110MiB since that makes SeaBIOS dirty some of the
    pages starting at about 0x5dd2000 (~93 MiB) as it reuses those for the
    HighMemory allocator since commit dc88f9b72df ("malloc: use large
    ZoneHigh when there is enough memory").
    
    This would result in the following errors:
        12/60 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test                 ERROR           2.74s   killed by signal 6 SIGABRT
        stderr:
        Memory content inconsistency at 5dd2000 first_byte = cc last_byte = cb current = 9e hit_edge = 1
        Memory content inconsistency at 5dd3000 first_byte = cc last_byte = cb current = 89 hit_edge = 1
        Memory content inconsistency at 5dd4000 first_byte = cc last_byte = cb current = 23 hit_edge = 1
        Memory content inconsistency at 5dd5000 first_byte = cc last_byte = cb current = 31 hit_edge = 1
        Memory content inconsistency at 5dd6000 first_byte = cc last_byte = cb current = 70 hit_edge = 1
        Memory content inconsistency at 5dd7000 first_byte = cc last_byte = cb current = ff hit_edge = 1
        Memory content inconsistency at 5dd8000 first_byte = cc last_byte = cb current = 54 hit_edge = 1
        Memory content inconsistency at 5dd9000 first_byte = cc last_byte = cb current = 64 hit_edge = 1
        Memory content inconsistency at 5dda000 first_byte = cc last_byte = cb current = 1d hit_edge = 1
        Memory content inconsistency at 5ddb000 first_byte = cc last_byte = cb current = 1a hit_edge = 1
        and in another 26 pages**
        ERROR:../tests/qtest/migration-test.c:300:check_guests_ram: assertion failed: (bad == 0)
    
    Fix this by always zeroing the first byte of each page in the range so
    that we get consistent results no matter the initial contents.
    
    Fixes: ea0c6d6 ("test: Postcopy")
    Signed-off-by: Daniil Tatianin <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    d-tatianin authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    adc1914 View commit details
    Browse the repository at this point in the history
  8. s390x/a-b-bios: zero the first byte of each page on start

    Same as with the x86 verison of this test, we relied on the contents of
    all pages in RAM to be the same across the entire test range, which is
    very fragile. Zero the first byte of each page before running the
    increment loop to fix this.
    
    Fixes: 5571dc8 ("tests/migration: Enable the migration test on s390x, too")
    Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Daniil Tatianin <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    d-tatianin authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    b28e3ec View commit details
    Browse the repository at this point in the history
  9. migration: file URI

    Extend the migration URI to support file:<filename>.  This can be used for
    any migration scenario that does not require a reverse path.  It can be
    used as an alternative to 'exec:cat > file' in minimized containers that
    do not contain /bin/sh, and it is easier to use than the fd:<fdname> URI.
    It can be used in HMP commands, and as a qemu command-line parameter.
    
    For best performance, guest ram should be shared and x-ignore-shared
    should be true, so guest pages are not written to the file, in which case
    the guest may remain running.  If ram is not so configured, then the user
    is advised to stop the guest first.  Otherwise, a busy guest may re-dirty
    the same page, causing it to be appended to the file multiple times,
    and the file may grow unboundedly.  That issue is being addressed in the
    "fixed-ram" patch series.
    
    Signed-off-by: Steve Sistare <[email protected]>
    Tested-by: Michael Galaxy <[email protected]>
    Reviewed-by: Michael Galaxy <[email protected]>
    Reviewed-by: Fabiano Rosas <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    Steve Sistare authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    2a9e2e5 View commit details
    Browse the repository at this point in the history
  10. migration: file URI offset

    Allow an offset option to be specified as part of the file URI, in
    the form "file:filename,offset=offset", where offset accepts the common
    size suffixes, or the 0x prefix, but not both.  Migration data is written
    to and read from the file starting at offset.  If unspecified, it defaults
    to 0.
    
    This is needed by libvirt to store its own data at the head of the file.
    
    Suggested-by: Daniel P. Berrange <[email protected]>
    Reviewed-by: Peter Xu <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Steve Sistare <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    Steve Sistare authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    385f510 View commit details
    Browse the repository at this point in the history
  11. migration: Unify and trace vmstate field_exists() checks

    For both save/load we actually share the logic on deciding whether a field
    should exist.  Merge the checks into a helper and use it for both save and
    load.  When doing so, add documentations and reformat the code to make it
    much easier to read.
    
    The real benefit here (besides code cleanups) is we add a trace-point for
    this; this is a known spot where we can easily break migration
    compatibilities between binaries, and this trace point will be critical for
    us to identify such issues.
    
    For example, this will be handy when debugging things like:
    
    https://gitlab.com/qemu-project/qemu/-/issues/932
    
    Reviewed-by: Fabiano Rosas <[email protected]>
    Reviewed-by: Juan Quintela <[email protected]>
    Signed-off-by: Peter Xu <[email protected]>
    Signed-off-by: Juan Quintela <[email protected]>
    Message-ID: <[email protected]>
    xzpeter authored and Juan Quintela committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    579cedf View commit details
    Browse the repository at this point in the history
  12. osdep: set _FORTIFY_SOURCE=2 when optimization is enabled

    Currently we set _FORTIFY_SOURCE=2 as a compiler argument when the
    meson 'optimization' setting is non-zero, the compiler is GCC and
    the target is Linux.
    
    While the default QEMU optimization level is 2, user could override
    this by setting CFLAGS="-O0" or --extra-cflags="-O0" when running
    configure and this won't be reflected in the meson 'optimization'
    setting. As a result we try to enable _FORTIFY_SOURCE=2 and then the
    user gets compile errors as it only works with optimization.
    
    Rather than trying to improve detection in meson, it is simpler to
    just check the __OPTIMIZE__ define from osdep.h.
    
    The comment about being incompatible with clang appears to be
    outdated, as compilation works fine without excluding clang.
    
    In the coroutine code we must set _FORTIFY_SOURCE=0 to stop the
    logic in osdep.h then enabling it.
    
    Signed-off-by: Daniel P. Berrangé <[email protected]>
    Message-id: [email protected]
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    berrange authored and stefanhaRH committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    9afa888 View commit details
    Browse the repository at this point in the history
  13. Merge tag 'misc-pull-request' of https://gitlab.com/marcandre.lureau/…

    …qemu into staging
    
    Misc fixes and cleanups
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmUcClAcHG1hcmNhbmRy
    # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5R5FD/9oeCDGXVzkm52K0DoW
    # 90N5Blda/3exvnS49TEz+rbIxXcy9IBxEKV3aPesCDw0V7Vxy6ZijPA/aHKzQEeP
    # DOX+0sELWLFRKvNNuXLxPlZcEQDgXkgqoCKf+0jp5oH7TAL2upezMhIr4XlUwG3v
    # rKQstpmr0Jm9sjsBTL9uIZCJpzglWk7CIbgAlBjOX6MFz0HAManrhBBuguvSZtrW
    # wYWrdkBEdTK6ranBvRA3IKi4ux/pmNsCpCtuOVT+WOLjC/wmJIE8+pBzlK9eOdqW
    # bPaxuu4XK1qao1+z6EyoaUtH/UW50EUInGq7aR2Z31/S1BLxqEpFCCnPAw7RGYZO
    # VlAuiR2U7K7AHFDfp8fJaUNH8a3Zh2wzpba5cyQ7LqVNRVbDhx65sQZw0pA3pjfi
    # JG0brIpWldD7auJtZTdCxXcoHWxeyfqqzH3a6GpeZzrRwuuAwxv0+yGF3Y2cMJ7+
    # lV9JVcei5M+Acq1UfO4BCC77UpXs4Jl0+zyRq02vOJFnfwcLMQ7VjD2A3e00yodj
    # F5cPnbacI212ynNm925RNv45svaY1hD2Z8kJRV/15/04m9dRv4WHOOTuF3iwZjt1
    # 9gp/p949tcEL/rBbDF+9QZiVHTWurVCQ0ZFnNhVnbKm+Hm5nHk5slc2p+VXQ0KB0
    # E2mN1irWzLov0K1YZTfetiXo8A==
    # =3ol2
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 03 Oct 2023 08:34:24 EDT
    # gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
    # gpg:                issuer "[email protected]"
    # gpg: Good signature from "Marc-André Lureau <[email protected]>" [full]
    # gpg:                 aka "Marc-André Lureau <[email protected]>" [full]
    # Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5
    
    * tag 'misc-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
      chardev/char-pty: Avoid losing bytes when the other side just (re-)connected
      hw/display/ramfb: plug slight guest-triggerable leak on mode setting
      hw/pc: remove needless includes
      hw/core: remove needless includes
      analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH
      ui/gtk: fix UI info precondition
      win32: avoid discarding the exception handler
      ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map
      ui/console: sanitize search in qemu_graphic_console_is_multihead()
      ui/console: eliminate QOM properties from qemu_console_is_multihead()
      ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead()
      ui/console: make qemu_console_is_multihead() static
      input: Allow to choose console with qemu_input_is_absolute
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    c7c907b View commit details
    Browse the repository at this point in the history
  14. Merge tag 'bsd-user-mmap-pull-request' of https://gitlab.com/bsdimp/qemu

     into staging
    
    bsd-user mmap and exec branches from gsoc
    
    This pull request represents the mmap and exec changes from Karim Taha
    for his GSoC project.
    
    They represent all the mmap and exec related system calls and get bsd-user to
    the point that a dynamic hello-world works (at least for armv7).
    
    There are a couple of patch check errors, but they are the lessor evil: I made
    purposely bad style choices to ensure all the commits compiled (and i undid the
    style choices in subsequent commits).
    
    I pushed an earlier version to gitlab, and all but the riscv64 pipelines were
    green.  Since bsd-user doesn't change anything related to ricsv64 (there's no
    support in qemu-project repo, though we do have it in the bsd-user fork: coming
    soon).
    
    I think this is good to go.
    
    https://gitlab.com/bsdimp/qemu.git
    
    Warner
    
    # -----BEGIN PGP SIGNATURE-----
    # Comment: GPGTools - https://gpgtools.org
    #
    # iQIzBAABCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmUcpC4ACgkQbBzRKH2w
    # EQDD9xAA3Rg0AnfnFrd+AoWRb/1/gOuO0v+dEGXj50qnGY8OmHeYtg3XecYPArBq
    # EicZzL/OG7UZKMl5OfrmGP9tbr32yfeRUTe3AGGHfmnSb11q0yeSaEFZI7felLHj
    # 9nlq4H/2EDRrY+7EnG1TWqtnuqDJAJf/7M0giiVxIk77XGX+USUNPOSG4NP/yc8E
    # D5p2GN23pUsvnI0jBZkyP3gyeXVNCNG5+KobwqJM3r6OjEiTRmLEVBw98YzG12bh
    # OY9ekMtVUKHi4Cvsf+2TtkDGRya0wX4uqm4UB1TtV1VUDoCWhYgEKBHp3ozCoVjB
    # J+ygbx7/jNfY53cpgEpKUBFH7rnOq1yQQ+ad5Ap5hbp4j6WSvPwdp1N3RCnkZzd/
    # L50VIaySd+P6enAgPO5Mbt3kMMVd/eDGhQDWdzNToIjyhXBb5hUNfumg9AgdEwTh
    # rW/kKT39YLYWLO123hIJCy2CKU9nvoea9588ExkKb22v0ltrtDcAlWfCbZvZYxNN
    # wRzh+MFBt7Cd/bqk7HaJ0J/YyPToqImoUjNuBnBSDPqZQP2H4U8v/FoICQ0mm5kR
    # jZCmGLMEP1PiDlusjUjaW0iamHvXiSP8KEzaAbIxx5UUiTWTTkQm4CKY/xPxC9VQ
    # 0ygJqJVrKHlNrAY9u6ggJAXtorVwmC55z4ZqIVQH6cbzUYFMuJU=
    # =WpL4
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 03 Oct 2023 19:30:54 EDT
    # gpg:                using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100
    # gpg: Good signature from "Warner Losh <[email protected]>" [unknown]
    # gpg:                 aka "Warner Losh <[email protected]>" [unknown]
    # gpg:                 aka "Warner Losh <[email protected]>" [unknown]
    # gpg:                 aka "Warner Losh <[email protected]>" [unknown]
    # gpg:                 aka "Warner Losh <[email protected]>" [unknown]
    # gpg: WARNING: This key is not certified with a trusted signature!
    # gpg:          There is no indication that the signature belongs to the owner.
    # Primary key fingerprint: 2035 F894 B00A A3CF 7CCD  E1B7 6C1C D128 7DB0 1100
    
    * tag 'bsd-user-mmap-pull-request' of https://gitlab.com/bsdimp/qemu: (51 commits)
      bsd-user: Add stubs for vadvise(), sbrk() and sstk()
      bsd-user: Implement shmat(2) and shmdt(2)
      bsd-user: Implement shmctl(2)
      bsd-user: Implement shm_unlink(2) and shmget(2)
      bsd-user: Implement shm_open(2)
      bsd-user: Implement do_obreak function
      bsd-user: Implement mincore(2)
      bsd-user: Implment madvise(2) to match the linux-user implementation.
      bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2), minherit(2)
      bsd-user: Implement msync(2)
      bsd-user: Implement mprotect(2)
      bsd-user: Implement mmap(2) and munmap(2)
      bsd-user: Introduce bsd-mem.h to the source tree
      bsd-user: Implement shmid_ds conversion between host and target.
      bsd-user: Implement ipc_perm conversion between host and target.
      bsd-user: Implement target_set_brk function in bsd-mem.c instead of os-syscall.c
      bsd-user: Add bsd-mem.c to meson.build
      bsd-user: Implement shm_rename(2) system call
      bsd-user: Implement shm_open2(2) system call
      bsd-user: Introduce freebsd/os-misc.h to the source tree
      ...
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    80dcaf6 View commit details
    Browse the repository at this point in the history
  15. Merge tag 'migration-20231004-pull-request' of https://gitlab.com/jua…

    …n.quintela/qemu into staging
    
    Migration Pull request (20231004)
    
    Hi
    
    In this series:
    
    * make sure migration-tests get 0's (daniil)
      Notice that this creates a checkpatch negative, everything on that
      file is volatile, no need to add a comment.
    
    * RDMA fix from li
    * MAINTAINERS
      Get peter and fabiano to become co-maintainers of migration
      Get Entry fro migration-rdma for Li Zhijian
    * Create field_exists() (peterx)
    * Improve error messages (Tejus)
    
    Please apply.
    
    s
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmUdXTwACgkQ9IfvGFhy
    # 1yPFPg//awd8HpoLs1Cq6zquBRivZOS88+tstwlBIODoU3lwPlriGU9Wquv8MqxG
    # NGvcUKVsv1XXsRWYsqN3OPV6m+uRZpKrFfXEnIGNpHptf/e6KrrDGAttukalhx4n
    # hJXCAActe9DlujSu+QI0L/j7R9S33zvLS46sjq7jaYLQLMzuEf5i+hiEPWfPP7AT
    # 0SjrtpFaqIOGY4+VKteDirP7zJtu1+WEMVFgtAUeh3c0R8UAOsxVzBjfM3+KagIx
    # NnYesFZoaOjVi1Xi1cRII7FmeKZ2OU7VBdYN9h3Y+dRIRjzF/YZOdt6Ypgb1c4gw
    # ohpWJWT2tHU1z7nguSFpnqtu8xCeGhwAy+HUn/Az0TP6SCtpKRh23bZpwbfWIrHs
    # eSZB6tO/eC/noQ5/d2cSs6pz7P77MkhTfxwD2+n9R4O36vSHEj3dGF0JbgCPr/Kw
    # 0qfch9BQkFkAec3kiaZO/JOQ1rJuIMTbdER9gDzIODpUIc5QExs1dFwLoz5IRcpQ
    # A1kOqVatMmm8jrvC3lEw76FjMX5pv11DKcS75ogWsSZHGk/jpXWABPEtiamzloqv
    # c6owc5f09etkQCzT5ME8AZyZRjt7eeqIxZDZlGCjHbqZ+w/xuDsFJrEdg8YJvRLw
    # AmsU5rRT2JV4lDNgZ1XG+xY9HF5LhAXYet5+UrCMBpFGk7JnHIw=
    # =il/A
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 04 Oct 2023 08:40:28 EDT
    # gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
    # gpg: Good signature from "Juan Quintela <[email protected]>" [full]
    # gpg:                 aka "Juan Quintela <[email protected]>" [full]
    # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
    
    * tag 'migration-20231004-pull-request' of https://gitlab.com/juan.quintela/qemu:
      migration: Unify and trace vmstate field_exists() checks
      migration: file URI offset
      migration: file URI
      s390x/a-b-bios: zero the first byte of each page on start
      i386/a-b-bootblock: zero the first byte of each page on start
      i386/a-b-bootblock: factor test memory addresses out into constants
      migration/rdma: zore out head.repeat to make the error more clear
      migration: Add co-maintainers for migration
      MAINTAINERS: Add entry for rdma migration
      migration: Update error description outside migration.c
      migration/vmstate: Introduce vmstate_save_state_with_err
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    6dcf8a9 View commit details
    Browse the repository at this point in the history
  16. Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu in…

    …to staging
    
    Pull request
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmUdbkgACgkQnKSrs4Gr
    # c8j03Af/Ww5CrGjvcTefvm6W65zTh6Di6ymUn59eqIpjpDbWTPruhnsrJFtNEo3Z
    # wv8hcxgc+wP8Y7BbZiwiNrSZsjQ1y8rReeO+Eoe9YZoRTMy8aJYaASXvs9TWZoMT
    # IjqPR6YEAEzh+30zLaPje/Lfy49Ni2Lqsg/fKsozl0b2LrZoEN5xJMHqI8CuRrzB
    # JmtX4nCkaf/P0yvW1MAp4Dxiuqgk3Z7n2+F1Qrjklw1eSZsc6Mi9QmEwuzX4rnKO
    # tzU2EApDWNvFQ604H86XHqWqXIw4C+7nNl81kOIZhUqIRamPD8bCNAeijkthmdLF
    # l4EIOqSDX8nkxuddRS7jQmHxlIw18g==
    # =26iN
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 04 Oct 2023 09:53:12 EDT
    # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
    # gpg: Good signature from "Stefan Hajnoczi <[email protected]>" [ultimate]
    # gpg:                 aka "Stefan Hajnoczi <[email protected]>" [ultimate]
    # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
    
    * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
      osdep: set _FORTIFY_SOURCE=2 when optimization is enabled
    
    Signed-off-by: Stefan Hajnoczi <[email protected]>
    stefanhaRH committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    7598971 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. target/hexagon: move GETPC() calls to top level helpers

    As docs/devel/loads-stores.rst states:
    
      ``GETPC()`` should be used with great care: calling
      it in other functions that are *not* the top level
      ``HELPER(foo)`` will cause unexpected behavior. Instead, the
      value of ``GETPC()`` should be read from the helper and passed
      if needed to the functions that the helper calls.
    
    Let's fix the GETPC() usage in Hexagon, making sure it's always called
    from top level helpers and passed down to the places where it's
    needed. There are a few snippets where that is not currently the case:
    
    - probe_store(), which is only called from two helpers, so it's easy to
      move GETPC() up.
    
    - mem_load*() functions, which are also called directly from helpers,
      but through the MEM_LOAD*() set of macros. Note that this are only
      used when compiling with --disable-hexagon-idef-parser.
    
      In this case, we also take this opportunity to simplify the code,
      unifying the mem_load*() functions.
    
    - HELPER(probe_hvx_stores), when called from another helper, ends up
      using its own GETPC() expansion instead of the top level caller.
    
    Signed-off-by: Matheus Tavares Bernardino <[email protected]>
    Reviewed-by: Taylor Simpson <[email protected]>
    Message-Id: <2c74c3696946edba7cc5b2942cf296a5af532052.1689070412.git.quic_mathbern@quicinc.com>-ne
    Reviewed-by: Brian Cain <[email protected]>
    quic-mathbern authored and androm3da committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    4b64ad4 View commit details
    Browse the repository at this point in the history
  2. target/hexagon: fix some occurrences of -Wshadow=local

    Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()`
    are less obvious.  They are required because of some macro invocations like
    SCATTER_OP_WRITE_TO_MEM().
    
    e.g.:
    
        In file included from ../target/hexagon/op_helper.c:31:
        ../target/hexagon/mmvec/macros.h:205:18: error: declaration of ‘i’ shadows a previous local [-Werror=shadow=compatible-local]
          205 |         for (int i = 0; i < sizeof(MMVector); i += sizeof(TYPE)) { \
              |                  ^
        ../target/hexagon/op_helper.c:157:17: note: in expansion of macro ‘SCATTER_OP_WRITE_TO_MEM’
          157 |                 SCATTER_OP_WRITE_TO_MEM(uint16_t);
              |                 ^~~~~~~~~~~~~~~~~~~~~~~
        ../target/hexagon/op_helper.c:135:9: note: shadowed declaration is here
          135 |     int i;
              |         ^
        In file included from ../target/hexagon/op_helper.c:31:
        ../target/hexagon/mmvec/macros.h:204:19: error: declaration of ‘ra’ shadows a previous local [-Werror=shadow=compatible-local]
          204 |         uintptr_t ra = GETPC(); \
              |                   ^~
        ../target/hexagon/op_helper.c:160:17: note: in expansion of macro ‘SCATTER_OP_WRITE_TO_MEM’
          160 |                 SCATTER_OP_WRITE_TO_MEM(uint32_t);
              |                 ^~~~~~~~~~~~~~~~~~~~~~~
        ../target/hexagon/op_helper.c:134:15: note: shadowed declaration is here
          134 |     uintptr_t ra = GETPC();
              |               ^~
    
    Reviewed-by: Matheus Tavares Bernardino <[email protected]>
    Signed-off-by: Brian Cain <[email protected]>
    androm3da committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    a5bc4c2 View commit details
    Browse the repository at this point in the history
  3. target/hexagon: avoid shadowing "vaddr" type

    The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the
    identifiers to avoid shadowing the type name.
    
    Signed-off-by: Brian Cain <[email protected]>
    androm3da committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    28a2c4c View commit details
    Browse the repository at this point in the history