qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b5e0d5: target/i386: Fix 32-bit wrapping of p


From: Alex Bennée
Subject: [Qemu-commits] [qemu/qemu] b5e0d5: target/i386: Fix 32-bit wrapping of pc/eip computa...
Date: Tue, 12 Dec 2023 13:55:13 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: b5e0d5d22fbffc3d8f7d3e86d7a2d05a1a974e27
      
https://github.com/qemu/qemu/commit/b5e0d5d22fbffc3d8f7d3e86d7a2d05a1a974e27
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M target/i386/cpu.h
    M target/i386/tcg/tcg-cpu.c
    M target/i386/tcg/translate.c

  Log Message:
  -----------
  target/i386: Fix 32-bit wrapping of pc/eip computation

In 32-bit mode, pc = eip + cs_base is also 32-bit, and must wrap.
Failure to do so results in incorrect memory exceptions to the guest.
Before 732d548732ed, this was implicitly done via truncation to
target_ulong but only in qemu-system-i386, not qemu-system-x86_64.

To fix this, we must add conditional zero-extensions.
Since we have to test for 32 vs 64-bit anyway, note that cs_base
is always zero in 64-bit mode.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2022
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20231212172510.103305-1-richard.henderson@linaro.org>


  Commit: cbb145567c21d2bc41e8197a243c7d5480c6fca0
      
https://github.com/qemu/qemu/commit/cbb145567c21d2bc41e8197a243c7d5480c6fca0
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M tcg/tcg-op-ldst.c
    M tcg/tcg.c

  Log Message:
  -----------
  tcg: Reduce serial context atomicity earlier

Reduce atomicity while emitting opcodes, instead of later
during code generation.  This ensures that any helper called
also sees the reduced atomicity requirement.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2034
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231212193542.149117-1-richard.henderson@linaro.org>


  Commit: 4fd8a954377fb9bd2c2f9a2181d90d767665f85f
      
https://github.com/qemu/qemu/commit/4fd8a954377fb9bd2c2f9a2181d90d767665f85f
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M target/i386/cpu.h
    M target/i386/tcg/tcg-cpu.c
    M target/i386/tcg/translate.c
    M tcg/tcg-op-ldst.c
    M tcg/tcg.c

  Log Message:
  -----------
  Merge tag 'pull-tcg-20231212' of https://gitlab.com/rth7680/qemu into staging

target/i386: Fix 32-bit wrapping of pc/eip computation (#2022)
tcg: Reduce serial context atomicity earlier (#2034)

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmV41IEdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+0DwgApqX4Ntaz1/eIbEmr
# sWTGlG7sQX28JrYm+Bd4MgtlE2+i06Vs3q1ZHThuZs9S6tQf8bcm1q1m0qZ486jk
# hgQqSMPAOJv1U+QhTRy1kW3l8UmZkw9YddfV5FjBHeuRWglVeSxDtqkc4fUffthb
# 82KvYIqo836HsYOOWtJqSuWVi60+q1RqYg+WZuygUmprf8Y+72Zu7ojjrizHoUNQ
# wTjGR8Jsf22ZrFi+B0MXL78oumMLTnjxCv1426+P+0zVclJAJZxS/7K+VhD4cG1q
# FG2zAphly+vuB248XSyzYxM8vgCVNAkLoUb2AAw1pdQpUzNaAEoTcAXIR7PJDord
# wZnmvw==
# =Fsyn
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Dec 2023 16:45:37 EST
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" 
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20231212' of https://gitlab.com/rth7680/qemu:
  tcg: Reduce serial context atomicity earlier
  target/i386: Fix 32-bit wrapping of pc/eip computation

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 039afc5ef7367fbc8fb475580c291c2655e856cb
      
https://github.com/qemu/qemu/commit/039afc5ef7367fbc8fb475580c291c2655e856cb
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for v8.2.0-rc4 release

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


Compare: https://github.com/qemu/qemu/compare/cc984a5d6ce8...039afc5ef736



reply via email to

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