Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: a279ca4ea073
Choose a base ref
...
head repository: qemu/qemu
compare: 0b58dc456191
Choose a head ref
  • 20 commits
  • 90 files changed
  • 9 contributors

Commits on Jul 25, 2023

  1. hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

    Since commit c0a55a0 "hw/sd/sdhci: Support big endian SD host controller
    interfaces" sdhci_common_realize() forces all SD card controllers to use either
    sdhci_mmio_le_ops or sdhci_mmio_be_ops, depending on the "endianness" property.
    However, there are device models which use different MMIO ops: TYPE_IMX_USDHC
    uses usdhc_mmio_ops and TYPE_S3C_SDHCI uses sdhci_s3c_mmio_ops.
    
    Forcing sdhci_mmio_le_ops breaks SD card handling on the "sabrelite" board, for
    example. Fix this by defaulting the io_ops to little endian and switch to big
    endian in sdhci_common_realize() only if there is a matchig big endian variant
    available.
    
    Fixes: c0a55a0 ("hw/sd/sdhci: Support big endian SD host controller
    interfaces")
    
    Signed-off-by: Bernhard Beschow <shentey@gmail.com>
    Tested-by: Guenter Roeck <linux@roeck-us.net>
    Message-Id: <20230709080950.92489-1-shentey@gmail.com>
    shentok authored and philmd committed Jul 25, 2023
    Copy the full SHA
    3b83079 View commit details
    Browse the repository at this point in the history
  2. hw/mips: Improve the default USB settings in the loongson3-virt machine

    It's possible to compile QEMU without the USB devices (e.g. when using
    "--without-default-devices" as option for the "configure" script).
    To be still able to run the loongson3-virt machine in default mode with
    such a QEMU binary, we have to check here for the availability of the
    OHCI controller first before instantiating the USB devices.
    
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Message-Id: <20230714104903.284845-1-thuth@redhat.com>
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    huth authored and philmd committed Jul 25, 2023
    Copy the full SHA
    5fc1a68 View commit details
    Browse the repository at this point in the history
  3. hw/char/escc: Implement loopback mode

    The firmware of the m68k next-cube machine uses the loopback mode
    for self-testing the hardware and currently fails during this step.
    By implementing the loopback mode, we can make the firmware pass
    to the next step.
    
    Signed-off-by: Thomas Huth <huth@tuxfamily.org>
    Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Message-Id: <20230716153519.31722-1-huth@tuxfamily.org>
    huth authored and philmd committed Jul 25, 2023
    Copy the full SHA
    02388b5 View commit details
    Browse the repository at this point in the history
  4. target/mips/mxu: Replace magic array size by its definition

    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Message-Id: <20230712060806.82323-2-philmd@linaro.org>
    philmd committed Jul 25, 2023
    Copy the full SHA
    d4eda54 View commit details
    Browse the repository at this point in the history
  5. target/mips/mxu: Avoid overrun in gen_mxu_S32SLT()

    Coverity reports a potential overrun (CID 1517769):
    
      Overrunning array "mxu_gpr" of 15 8-byte elements at
      element index 4294967295 (byte offset 34359738367)
      using index "XRb - 1U" (which evaluates to 4294967295).
    
    Use gen_load_mxu_gpr() to safely load MXU registers.
    
    Fixes: ff7936f ("target/mips/mxu: Add S32SLT ... insns")
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Message-Id: <20230712060806.82323-3-philmd@linaro.org>
    philmd committed Jul 25, 2023
    Copy the full SHA
    e37fdc7 View commit details
    Browse the repository at this point in the history
  6. target/mips/mxu: Avoid overrun in gen_mxu_q8adde()

    Coverity reports a potential overruns (CID 1517770):
    
      Overrunning array "mxu_gpr" of 15 8-byte elements at
      element index 4294967295 (byte offset 34359738367)
      using index "XRb - 1U" (which evaluates to 4294967295).
    
    Add a gen_extract_mxu_gpr() helper similar to
    gen_load_mxu_gpr() to safely extract MXU registers.
    
    Fixes: eb79951 ("target/mips/mxu: Add Q8ADDE ... insns")
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Message-Id: <20230712060806.82323-4-philmd@linaro.org>
    philmd committed Jul 25, 2023
    Copy the full SHA
    fb51df0 View commit details
    Browse the repository at this point in the history
  7. target/mips: Pass directory/leaf shift values to walk_directory()

    We already evaluated directory_shift and leaf_shift in
    page_table_walk_refill(), no need to do that again: pass
    as argument.
    
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Message-Id: <20230717213504.24777-2-philmd@linaro.org>
    philmd committed Jul 25, 2023
    Copy the full SHA
    60a38a3 View commit details
    Browse the repository at this point in the history
  8. target/mips: Avoid shift by negative number in page_table_walk_refill()

    Coverity points out that in page_table_walk_refill() we can
    shift by a negative number, which is undefined behaviour
    (CID 1452918, 1452920, 1452922).  We already catch the
    negative directory_shift and leaf_shift as being a "bail
    out early" case, but not until we've already used them to
    calculated some offset values.
    
    The shifts can be negative only if ptew > 1, so make the
    bail-out-early check look directly at that, and only
    calculate the shift amounts and the offsets based on them
    after we have done that check. This allows
    us to simplify the expressions used to calculate the
    shift amounts, use an unsigned type, and avoids the
    undefined behaviour.
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    [PMD: Check for ptew > 1, use unsigned type]
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Message-Id: <20230717213504.24777-3-philmd@linaro.org>
    pm215 authored and philmd committed Jul 25, 2023
    Copy the full SHA
    0fe4cac View commit details
    Browse the repository at this point in the history
  9. target/sparc: Handle FPRS correctly on big-endian hosts

    In CPUSparcState we define the fprs field as uint64_t.  However we
    then refer to it in translate.c via a TCGv_i32 which we set up with
    tcg_global_mem_new_ptr().  This means that on a big-endian host when
    the guest does something to writo te the FPRS register this value
    ends up in the wrong half of the uint64_t, and the QEMU C code that
    refers to env->fprs sees the wrong value.  The effect of this is that
    guest code that enables the FPU crashes with spurious FPU Disabled
    exceptions.  In particular, this is why
     tests/avocado/machine_sparc64_sun4u.py:Sun4uMachine.test_sparc64_sun4u
    times out on an s390 host.
    
    There are multiple ways we could fix this; since there are actually
    only three bits in the FPRS register and the code in translate.c
    would be a bit painful to convert to dealing with a TCGv_i64, change
    the type of the CPU state struct field to match what translate.c is
    expecting.
    
    (None of the other fields referenced by the r32[] array in
    sparc_tcg_init() have the wrong type.)
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
    Message-Id: <20230717103544.637453-1-peter.maydell@linaro.org>
    pm215 authored and philmd committed Jul 25, 2023
    Copy the full SHA
    ca4d5d8 View commit details
    Browse the repository at this point in the history
  10. target/tricore: Rename tricore_feature

    this name is used by capstone and will lead to a build failure of QEMU,
    when capstone is enabled. So we rename it to tricore_has_feature(), to
    match has_feature() in translate.c.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774
    Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Message-Id: <20230721060605.76636-1-kbastian@mail.uni-paderborn.de>
    bkoppelmann authored and philmd committed Jul 25, 2023
    Copy the full SHA
    f8cfdd2 View commit details
    Browse the repository at this point in the history
  11. migration: spelling fixes

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Reviewed-by: Fabiano Rosas <farosas@suse.de>
    Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    d8b71d9 View commit details
    Browse the repository at this point in the history
  12. s390x: spelling fixes

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    cced0d6 View commit details
    Browse the repository at this point in the history
  13. arm: spelling fixes

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    673d821 View commit details
    Browse the repository at this point in the history
  14. other architectures: spelling fixes

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    8b81968 View commit details
    Browse the repository at this point in the history
  15. hw/9pfs: spelling fixes

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
    Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    28cbbdd View commit details
    Browse the repository at this point in the history
  16. target/tricore: Rename tricore_feature

    this name is used by capstone and will lead to a build failure of QEMU,
    when capstone is enabled. So we rename it to tricore_has_feature(), to
    match has_feature() in translate.c.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774
    Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    bkoppelmann authored and Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    8c0e8ed View commit details
    Browse the repository at this point in the history
  17. hw/pci: add comment to explain checking for available function 0 in p…

    …ci hotplug
    
    This change is cosmetic. A comment is added explaining why we need to check for
    the availability of function 0 when we hotplug a device.
    
    CC: mst@redhat.com
    CC: mjt@tls.msk.ru
    Signed-off-by: Ani Sinha <anisinha@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    ani-sinha authored and Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    67d045a View commit details
    Browse the repository at this point in the history
  18. qapi: Correct "eg." to "e.g." in documentation

    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Markus Armbruster authored and Michael Tokarev committed Jul 25, 2023
    Copy the full SHA
    ff62c21 View commit details
    Browse the repository at this point in the history
  19. Merge tag 'misc-fixes-20230725' of https://github.com/philmd/qemu int…

    …o staging
    
    Misc patches queue
    
    hw/sd/sdhci: Default I/O ops to little endian
    hw/mips/loongson3-virt: Only use default USB if available
    hw/char/escc: Implement loopback mode to allow self-testing
    target/mips: Avoid overruns and shifts by negative number
    target/sparc: Handle FPRS correctly on big-endian hosts
    target/tricore: Rename tricore_feature to avoid clash with libcapstone
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmS/4ksACgkQ4+MsLN6t
    # wN6OSg//cZY9C6fRXNNaIqkmnhjbaV6KLtjE7mOKp0RUyh3aN0dtTwWIjdJc0O5C
    # iipHESYhcbHTiN/TxK0zXg4KgtKmtwqGsa3QTXGdTlSkTY/dMNioSpb7p82becu0
    # fhCvGRLJ97j7/mhebiBNT/urrcG5h3n7CjA5IoFMMA4f+cajsGZHwmq5TTzc2ehy
    # 4FuchjFUw+cgqU1peNYoqt2dfnxFg0EgKBSRikl8MyPf9lFzTlXOKbgd+qppG6hI
    # 2fAUHyMqBkU22sAoK0eB0077LjgjPPQfmn8UPGkpGD5QZQcvBRNArg4fyHxCKTS7
    # zOsO1Qc+4D2l2RJlIHgct2pmcHdT29TlTn2T4Lg900Hm09KelZh1XF+1BemCC13z
    # cGWjPcYozvGFFiHlhazINtbGpB6XaP/Z3OwroRHRn+Mn3ss+FaU+j/p+4YlEVyFi
    # 4yoEyjhNma6/hssmstifSQsaOf6XthzpS+XdKNB6G1b2WuRSc1Z59b2gcPBTwbXY
    # B52lfI61nzSrP9pLuS8c/6hQXQvADIEndeWEcWZ50h3WW2Cemj9jTDVgfjWC4Vg9
    # wV2U6NeTr+g54cSU5vcKiZrqsQHUoLiKbZFRJkXF7EEMbOErIQnyIS5l8xf71Pay
    # YPxuPf1VprRiR07d+ZaA+wmEaBxLCUPEl1CEuu5NPVA9S4yIIWE=
    # =F+Wb
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 25 Jul 2023 15:55:07 BST
    # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
    # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
    # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
    
    * tag 'misc-fixes-20230725' of https://github.com/philmd/qemu:
      target/tricore: Rename tricore_feature
      target/sparc: Handle FPRS correctly on big-endian hosts
      target/mips: Avoid shift by negative number in page_table_walk_refill()
      target/mips: Pass directory/leaf shift values to walk_directory()
      target/mips/mxu: Avoid overrun in gen_mxu_q8adde()
      target/mips/mxu: Avoid overrun in gen_mxu_S32SLT()
      target/mips/mxu: Replace magic array size by its definition
      hw/char/escc: Implement loopback mode
      hw/mips: Improve the default USB settings in the loongson3-virt machine
      hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    pm215 committed Jul 25, 2023
    Copy the full SHA
    d59f0c9 View commit details
    Browse the repository at this point in the history
  20. Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu int…

    …o staging
    
    trivial-patches 25-07-2023
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmS/2vgPHG1qdEB0bHMu
    # bXNrLnJ1AAoJEHAbT2saaT5ZT6MH/j5L3P9yLV6TqW+DkhCppbmBygqxz2SbQjwl
    # dVVfSLpJNbtpvLfEnvpb+ms+ZdaOCGj8IofAVf9w0VaIYJFP1srFphY/1x+RYVnw
    # kDjCLzuLNSCAdCV2HPqsrMKzdFctZ/MfK+QzfcGik9IvmCNPYWOhpmevs+xAIEJd
    # b0xk152zy2fIIC3vKK+3KcM7MFkqZWJ6z0pzUZAyEBS+aQyuZNPJ/cO8xMXotbP2
    # jqv12SNGV2GLH1acvsd8GQwDB9MamstB4r8NWpSpT/AyPwOgmMR+j5B8a/WEBJCs
    # OcEW/pEyrumSygqf9z01YoNJQUCSvSpg5aq4+S2cRDslmUgFDmw=
    # =wCoQ
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 25 Jul 2023 15:23:52 BST
    # gpg:                using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59
    # gpg:                issuer "mjt@tls.msk.ru"
    # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" [full]
    # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>" [full]
    # gpg:                 aka "Michael Tokarev <mjt@debian.org>" [full]
    # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
    #      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59
    
    * tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu:
      qapi: Correct "eg." to "e.g." in documentation
      hw/pci: add comment to explain checking for available function 0 in pci hotplug
      target/tricore: Rename tricore_feature
      hw/9pfs: spelling fixes
      other architectures: spelling fixes
      arm: spelling fixes
      s390x: spelling fixes
      migration: spelling fixes
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    pm215 committed Jul 25, 2023
    Copy the full SHA
    0b58dc4 View commit details
    Browse the repository at this point in the history