Skip to content
Snippets Groups Projects
  1. Oct 24, 2022
  2. Oct 20, 2022
  3. Oct 18, 2022
    • Stefan Hajnoczi's avatar
      Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging · 214a8da2
      Stefan Hajnoczi authored
      * configure: don't enable firmware for targets that are not built
      * configure: don't use strings(1)
      * scsi, target/i386: switch from device_legacy_reset() to device_cold_reset()
      * target/i386: AVX support for TCG
      * target/i386: fix SynIC SINT assertion failure on guest reset
      * target/i386: Use atomic operations for pte updates and other cleanups
      * tests/tcg: extend SSE tests to AVX
      * virtio-scsi: send "REPORTED LUNS CHANGED" sense data upon disk hotplug events
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmNOlOcUHHBib256aW5p
      # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNuvwgAj/Z5pI9KU33XiWKFR3bZf2lHh21P
      # xmTzNtPmnP1WHDY1DNug/UB+BLg3c+carpTf5n3B8aKI4X3FfxGSJvYlXy4BONFD
      # XqYMH3OZB5GaR8Wza9trNYjDs/9hOZus/0R6Hqdl/T38PlMjf8mmayULJIGdcFcJ
      # WJvITVntbcCwwbpyJbRC5BNigG8ZXTNRoKBgtFVGz6Ox+n0YydwKX5qU5J7xRfCU
      # lW41LjZ0Fk5lonH16+xuS4WD5EyrNt8cMKCGsxnyxhI7nehe/OGnYr9l+xZJclrh
      # inQlSwJv0IpUJcrGCI4Xugwux4Z7ZXv3JQ37FzsdZcv/ZXpGonXMeXNJ9A==
      # =o6x7
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 18 Oct 2022 07:58:31 EDT
      # gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
      # gpg:                issuer "pbonzini@redhat.com"
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [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
      
      : (53 commits)
        target/i386: remove old SSE decoder
        target/i386: move 3DNow to the new decoder
        tests/tcg: extend SSE tests to AVX
        target/i386: Enable AVX cpuid bits when using TCG
        target/i386: implement VLDMXCSR/VSTMXCSR
        target/i386: implement XSAVE and XRSTOR of AVX registers
        target/i386: reimplement 0x0f 0x28-0x2f, add AVX
        target/i386: reimplement 0x0f 0x10-0x17, add AVX
        target/i386: reimplement 0x0f 0xc2, 0xc4-0xc6, add AVX
        target/i386: reimplement 0x0f 0x38, add AVX
        target/i386: Use tcg gvec ops for pmovmskb
        target/i386: reimplement 0x0f 0x3a, add AVX
        target/i386: clarify (un)signedness of immediates from 0F3Ah opcodes
        target/i386: reimplement 0x0f 0xd0-0xd7, 0xe0-0xe7, 0xf0-0xf7, add AVX
        target/i386: reimplement 0x0f 0x70-0x77, add AVX
        target/i386: reimplement 0x0f 0x78-0x7f, add AVX
        target/i386: reimplement 0x0f 0x50-0x5f, add AVX
        target/i386: reimplement 0x0f 0xd8-0xdf, 0xe8-0xef, 0xf8-0xff, add AVX
        target/i386: reimplement 0x0f 0x60-0x6f, add AVX
        target/i386: Introduce 256-bit vector helpers
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      214a8da2
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-ppc-20221017' of https://gitlab.com/danielhb/qemu into staging · 2c65091f
      Stefan Hajnoczi authored
      ppc patch queue for 2022-10-18:
      
      This queue contains improvements in the e500 and ppc4xx boards, changes
      in the maintainership of the project, a new QMP/HMP command and bug
      fixes:
      
      - Cedric is stepping back from qemu-ppc maintainership;
      - ppc4xx_sdram: QOMification and clean ups;
      - e500: add new types of flash and clean ups;
      - QMP/HMP: introduce dumpdtb command;
      - spapr_pci, booke doorbell interrupt and xvcmp* bit fixes;
      
      The 'dumpdtb' implementation is also making changes to RISC-V files that
      were acked by Alistair Francis and are being included in this queue.
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCY02qEgAKCRA82cqW3gMx
      # ZIadAQCYY9f+NFrSJBm3z4JjUaP+GmbgEjibjZW05diyKwbqzQEAjE1KXFCcd40D
      # 3Brs2Dm4YruaJCwb68vswVQAYteXaQ8=
      # =hl94
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 17 Oct 2022 15:16:34 EDT
      # gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
      # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [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: 17EB FF99 23D0 1800 AF28  3819 3CD9 CA96 DE03 3164
      
      * tag 'pull-ppc-20221017' of https://gitlab.com/danielhb/qemu
      
      : (38 commits)
        hw/riscv: set machine->fdt in spike_board_init()
        hw/riscv: set machine->fdt in sifive_u_machine_init()
        hw/ppc: set machine->fdt in spapr machine
        hw/ppc: set machine->fdt in pnv_reset()
        hw/ppc: set machine->fdt in pegasos2_machine_reset()
        hw/ppc: set machine->fdt in xilinx_load_device_tree()
        hw/ppc: set machine->fdt in sam460ex_load_device_tree()
        hw/ppc: set machine->fdt in bamboo_load_device_tree()
        hw/nios2: set machine->fdt in nios2_load_dtb()
        qmp/hmp, device_tree.c: introduce dumpdtb
        hw/ppc/spapr_pci.c: Use device_cold_reset() rather than device_legacy_reset()
        target/ppc: Fix xvcmp* clearing FI bit
        hw/ppc/e500: Remove if statement which is now always true
        hw/ppc/mpc8544ds: Add platform bus
        hw/ppc/mpc8544ds: Rename wrongly named method
        hw/ppc/e500: Reduce usage of sysbus API
        docs/system/ppc/ppce500: Add heading for networking chapter
        hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx
        hw/ppc/meson: Allow e500 boards to be enabled separately
        ppc440_uc.c: Remove unneeded parenthesis
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      2c65091f
    • Paolo Bonzini's avatar
      target/i386: remove old SSE decoder · 653fad24
      Paolo Bonzini authored
      
      With all SSE (and AVX!) instructions now implemented in disas_insn_new,
      it's possible to remove gen_sse, as well as the helpers for instructions
      that now use gvec.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      653fad24
    • Paolo Bonzini's avatar
      target/i386: move 3DNow to the new decoder · 71a0891d
      Paolo Bonzini authored
      
      This adds another kind of weirdness when you thought you had seen it all:
      an opcode byte that comes _after_ the address, not before.  It's not
      worth adding a new X86_SPECIAL_* constant for it, but it's actually
      not unlike VCMP; so, forgive me for exploiting the similarity and just
      deciding to dispatch to the right gen_helper_* call in a single code
      generation function.
      
      In fact, the old decoder had a bug where s->rip_offset should have
      been set to 1 for 3DNow! instructions, and it's fixed now.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      71a0891d
    • Paolo Bonzini's avatar
      tests/tcg: extend SSE tests to AVX · 0339ddfa
      Paolo Bonzini authored
      
      Extracted from a patch by Paul Brook <paul@nowt.org>.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0339ddfa
    • Paul Brook's avatar
      target/i386: Enable AVX cpuid bits when using TCG · 2f8a21d8
      Paul Brook authored
      
      Include AVX, AVX2 and VAES in the guest cpuid features supported by TCG.
      
      Signed-off-by: default avatarPaul Brook <paul@nowt.org>
      Message-Id: <20220424220204.2493824-40-paul@nowt.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2f8a21d8
    • Paolo Bonzini's avatar
      target/i386: implement VLDMXCSR/VSTMXCSR · 57f6bba0
      Paolo Bonzini authored
      
      These are exactly the same as the non-VEX version, but one has to be careful
      that only VEX.L=0 is allowed.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      57f6bba0
    • Paolo Bonzini's avatar
    • Paolo Bonzini's avatar
      target/i386: reimplement 0x0f 0x28-0x2f, add AVX · f8d19eec
      Paolo Bonzini authored
      
      Here the code is a bit uglier due to the truncation and extension
      of registers to and from 32-bit.  There is also a mistake in the
      manual with respect to the size of the memory operand of CVTPS2PI
      and CVTTPS2PI, reported by Ricky Zhou.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      f8d19eec
    • Paolo Bonzini's avatar
      target/i386: reimplement 0x0f 0x10-0x17, add AVX · 7170a17e
      Paolo Bonzini authored
      
      These are mostly moves, and yet are a total pain.  The main issue
      is that:
      
      1) some instructions are selected by mod==11 (register operand)
      vs. mod=00/01/10 (memory operand)
      
      2) stores to memory are two-operand operations, while the 3-register
      and load-from-memory versions operate on the entire contents of the
      destination; this makes it easier to separate the gen_* function for
      the store case
      
      3) it's inefficient to load into xmm_T0 only to move the value out
      again, so the gen_* function for the load case is separated too
      
      The manual also has various mistakes in the operands here, for example
      the store case of MOVHPS operates on a 128-bit source (albeit discarding
      the bottom 64 bits) and therefore should be Mq,Vdq rather than Mq,Vq.
      Likewise for the destination and source of MOVHLPS.
      
      VUNPCK?PS and VUNPCK?PD are the same as VUNPCK?DQ and VUNPCK?QDQ,
      but encoded as prefixes rather than separate operands.  The helpers
      can be reused however.
      
      For MOVSLDUP, MOVSHDUP and MOVDDUP I chose to reimplement them as
      helpers.  I named the helper for MOVDDUP "movdldup" in preparation
      for possible future introduction of MOVDHDUP and to clarify the
      similarity with MOVSLDUP.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7170a17e
    • Paolo Bonzini's avatar
      target/i386: reimplement 0x0f 0xc2, 0xc4-0xc6, add AVX · aba2b8ec
      Paolo Bonzini authored
      
      Nothing special going on here, for once.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      aba2b8ec
    • Paolo Bonzini's avatar
      target/i386: reimplement 0x0f 0x38, add AVX · 16fc5726
      Paolo Bonzini authored
      
      There are several special cases here:
      
      1) extending moves have different widths for the helpers vs. for the
      memory loads, and the width for memory loads depends on VEX.L too.
      This is represented by X86_SPECIAL_AVXExtMov.
      
      2) some instructions, such as variable-width shifts, select the vector element
      size via REX.W.
      
      3) VSIB instructions (VGATHERxPy, VPGATHERxy) are also part of this group,
      and they have (among other things) two output operands.
      
      3) the macros for 4-operand blends (which are under 0x0f 0x3a) have to be
      extended to support 2-operand blends.  The 2-operand variant actually
      came a few years earlier, but it is clearer to implement them in the
      opposite order.
      
      X86_TYPE_WM, introduced earlier for unaligned loads, is reused for helpers
      that accept a Reg* but have a M argument.
      
      These three-byte opcodes also include AVX new instructions, for which
      the helpers were originally implemented by Paul Brook <paul@nowt.org>.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      16fc5726
    • Richard Henderson's avatar
      target/i386: Use tcg gvec ops for pmovmskb · d4af67a2
      Richard Henderson authored
      
      As pmovmskb is used by strlen et al, this is the third
      highest overhead sse operation at %0.8.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      [Reorganize to generate code for any vector size. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d4af67a2
    • Paolo Bonzini's avatar
      target/i386: reimplement 0x0f 0x3a, add AVX · 79068477
      Paolo Bonzini authored
      
      The more complicated operations here are insertions and extractions.
      Otherwise, there are just more entries than usual because the PS/PD/SS/SD
      variations are encoded in the opcode rater than in the prefixes.
      
      These three-byte opcodes also include AVX new instructions, whose
      implementation in the helpers was originally done by Paul Brook
      <paul@nowt.org>.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      79068477
Loading