qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 598018: target/s390x: Fix the "ignored match"


From: Thomas Huth
Subject: [Qemu-commits] [qemu/qemu] 598018: target/s390x: Fix the "ignored match" case in VSTRS
Date: Wed, 23 Aug 2023 07:01:24 -0700

  Branch: refs/heads/staging-8.1
  Home:   https://github.com/qemu/qemu
  Commit: 5980189e960ead2ee84c0c8053302ebfe982617f
      
https://github.com/qemu/qemu/commit/5980189e960ead2ee84c0c8053302ebfe982617f
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M target/s390x/tcg/vec_string_helper.c

  Log Message:
  -----------
  target/s390x: Fix the "ignored match" case in VSTRS

Currently the emulation of VSTRS recognizes partial matches in presence
of \0 in the haystack, which, according to PoP, is not correct:

    If the ZS flag is one and a zero byte was detected
    in the second operand, then there can not be a
    partial match ...

Add a check for this. While at it, fold a number of explicitly handled
special cases into the generic logic.

Cc: qemu-stable@nongnu.org
Reported-by: Claudio Fontana <cfontana@suse.de>
Closes: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00633.html
Fixes: 1d706f314191 ("target/s390x: vxeh2: vector string search")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804233748.218935-3-iii@linux.ibm.com>
Tested-by: Claudio Fontana <cfontana@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 791b2b6a930273db694b9ba48bbb406e78715927)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>


  Commit: 880e82ed786c0f9c99d777f2d9c8768c9b22cc43
      
https://github.com/qemu/qemu/commit/880e82ed786c0f9c99d777f2d9c8768c9b22cc43
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M target/s390x/tcg/translate_vx.c.inc

  Log Message:
  -----------
  target/s390x: Use a 16-bit immediate in VREP

Unlike most other instructions that contain an immediate element index,
VREP's one is 16-bit, and not 4-bit. The code uses only 8 bits, so
using, e.g., 0x101 does not lead to a specification exception.

Fix by checking all 16 bits.

Cc: qemu-stable@nongnu.org
Fixes: 28d08731b1d8 ("s390x/tcg: Implement VECTOR REPLICATE")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230807163459.849766-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 23e87d419f347b6b5f4da3bf70d222acc24cdb64)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>


  Commit: c12eddbd486b815307fe049664e3dbbaad7a1023
      
https://github.com/qemu/qemu/commit/c12eddbd486b815307fe049664e3dbbaad7a1023
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M target/s390x/tcg/vec_helper.c

  Log Message:
  -----------
  target/s390x: Fix VSTL with a large length

The length is always truncated to 16 bytes. Do not probe more than
that.

Cc: qemu-stable@nongnu.org
Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804235624.263260-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6db3518ba4fcddd71049718f138552999f0d97b4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>


  Commit: 14a8213b757a3049cf53ce570a8abc11f16dd602
      
https://github.com/qemu/qemu/commit/14a8213b757a3049cf53ce570a8abc11f16dd602
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M target/s390x/tcg/translate_vx.c.inc

  Log Message:
  -----------
  target/s390x: Check reserved bits of VFMIN/VFMAX's M5

VFMIN and VFMAX should raise a specification exceptions when bits 1-3
of M5 are set.

Cc: qemu-stable@nongnu.org
Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804234621.252522-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6a2ea6151835aa4f5fee29382a421c13b0e6619f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>


  Commit: 01f6417f1550fed6c458fbb49a25db3764dd8008
      
https://github.com/qemu/qemu/commit/01f6417f1550fed6c458fbb49a25db3764dd8008
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M include/hw/virtio/virtio-gpu-bswap.h

  Log Message:
  -----------
  include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts

Using "-device virtio-gpu,blob=true" currently does not work on big
endian hosts (like s390x). The guest kernel prints an error message
like:

 [drm:virtio_gpu_dequeue_ctrl_func [virtio_gpu]] *ERROR* response 0x1200 
(command 0x10c)

and the display stays black. When running QEMU with "-d guest_errors",
it shows an error message like this:

 virtio_gpu_create_mapping_iov: nr_entries is too big (83886080 > 16384)

which indicates that this value has not been properly byte-swapped.
And indeed, the virtio_gpu_create_blob_bswap() function (that should
swap the fields in the related structure) fails to swap some of the
entries. After correctly swapping all missing values here, too, the
virtio-gpu device is now also working with blob=true on s390x hosts.

Fixes: e0933d91b1 ("virtio-gpu: Add virtio_gpu_resource_create_blob")
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2230469
Message-Id: <20230815122007.928049-1-thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit d194362910138776e8abd6bb3c9fb3693254e95f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>


Compare: https://github.com/qemu/qemu/compare/5980189e960e%5E...01f6417f1550



reply via email to

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