* Simplify device casting in w/vfio/ccw.c
* Fix memory corruption in the s390x dump code * Various s390x TCG clean-ups * s390x PV support for asynchronous teardown for reboot * qemu-keymap related fixes * Improvements for the duration of the gitlab-CI * Deprecate the "-no-acpi" command line switch -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmP8lVURHHRodXRoQHJl ZGhhdC5jb20ACgkQLtnXdP5wLbWYkg//RTKsG0+HGMtnKvjTA5NzLIJrWAQfSPfh ABkxNHoscReae8LGquFfeTy9cN/uA051e/P06WfPXAkg3Uj72JKHHs/ncm5VhApY 7moOCIHlvFRAsy5TKYoInM+Yo0jov7vgKqqJcS3AL3hwhmvEwPwKr0cpZLNfKV8p GD+XM453g0AFn2jDFoXDsnHX3zco+7sd4dQN4olSrkd/gDel2UQ5JE4gJ/o6Qgys GW4vb+NpxQ6W3mSlU+ClTr03ZljPkascBS7tZO8Fwn+J3Wv4UTNLlM1JFXQhC3v8 x9HpVpk4HW6C/hiPcsMpZRlXBb/HklkAhDxZ6tjTnQLRvbJ/o2uISJt+ZgeH9zeQ Ae4Ap7yPxsuGbx2twzbGoyEPAJj18hW7EUd6KromFqy877svmyRYs3NXQqSJOEmh Pv7VriUe6esyyVSXWjA6g2imo5pIhWxxRlsNVrrp8vOJNYT+ygBIFqu28ngwk86H jZOLqekEkQrNkwZZLuoxm8FyCAvzfMBeHQFlDnL4a3114dlC6X3/cJqCZ5htTaO+ t7CL6QcepRh0NQPw1jRlUCARZK+WocjwwcmzgVzSKKzGpdg/EJC8Sg54l7wdVQCp jY3HEUWHHHmrqe3IefrzadRQhsB9xKcNdUaZmetRUm+ohgSc9S0cfpVXNwT+G3+M a47dp9ueI6Q= =wDFZ -----END PGP SIGNATURE----- Merge tag 'pull-request-2023-02-27' of https://gitlab.com/thuth/qemu into staging * Simplify device casting in w/vfio/ccw.c * Fix memory corruption in the s390x dump code * Various s390x TCG clean-ups * s390x PV support for asynchronous teardown for reboot * qemu-keymap related fixes * Improvements for the duration of the gitlab-CI * Deprecate the "-no-acpi" command line switch # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmP8lVURHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbWYkg//RTKsG0+HGMtnKvjTA5NzLIJrWAQfSPfh # ABkxNHoscReae8LGquFfeTy9cN/uA051e/P06WfPXAkg3Uj72JKHHs/ncm5VhApY # 7moOCIHlvFRAsy5TKYoInM+Yo0jov7vgKqqJcS3AL3hwhmvEwPwKr0cpZLNfKV8p # GD+XM453g0AFn2jDFoXDsnHX3zco+7sd4dQN4olSrkd/gDel2UQ5JE4gJ/o6Qgys # GW4vb+NpxQ6W3mSlU+ClTr03ZljPkascBS7tZO8Fwn+J3Wv4UTNLlM1JFXQhC3v8 # x9HpVpk4HW6C/hiPcsMpZRlXBb/HklkAhDxZ6tjTnQLRvbJ/o2uISJt+ZgeH9zeQ # Ae4Ap7yPxsuGbx2twzbGoyEPAJj18hW7EUd6KromFqy877svmyRYs3NXQqSJOEmh # Pv7VriUe6esyyVSXWjA6g2imo5pIhWxxRlsNVrrp8vOJNYT+ygBIFqu28ngwk86H # jZOLqekEkQrNkwZZLuoxm8FyCAvzfMBeHQFlDnL4a3114dlC6X3/cJqCZ5htTaO+ # t7CL6QcepRh0NQPw1jRlUCARZK+WocjwwcmzgVzSKKzGpdg/EJC8Sg54l7wdVQCp # jY3HEUWHHHmrqe3IefrzadRQhsB9xKcNdUaZmetRUm+ohgSc9S0cfpVXNwT+G3+M # a47dp9ueI6Q= # =wDFZ # -----END PGP SIGNATURE----- # gpg: Signature made Mon 27 Feb 2023 11:34:45 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2023-02-27' of https://gitlab.com/thuth/qemu: (33 commits) Deprecate the "-no-acpi" command line switch gitlab-ci.d/base: Mark jobs as interruptible by default gitlab-ci.d: Build with --enable-fdt=system by default gitlab-ci.d/buildtest-template: Simplify the configure step gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job Updated the FSF address to <https://www.gnu.org/licenses/> meson: fix dependency on qemu-keymap qemu-keymap: Silence memory leak warning from Clang's sanitizer configure: Add 'mkdir build' check tests/tcg/s390x: Add sam.S tests/tcg/s390x: Add bal.S target/s390x: Use tcg_constant_* in translate_vx.c.inc target/s390x: Use tcg_constant_i32 for fpinst_extract_m34 target/s390x: Use tcg_constant_* for DisasCompare target/s390x: Use tcg_constant_* in local contexts s390x/pv: Add support for asynchronous teardown for reboot target/s390x: Hoist some computation in access_memmove target/s390x: Inline do_access_{get,set}_byte target/s390x: Remove TLB_NOTDIRTY workarounds ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3db629f03e
@ -11,6 +11,8 @@
|
|||||||
# and show the duration of each line.
|
# and show the duration of each line.
|
||||||
FF_SCRIPT_SECTIONS: 1
|
FF_SCRIPT_SECTIONS: 1
|
||||||
|
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
#############################################################
|
#############################################################
|
||||||
# Stage 1: exclude scenarios where we definitely don't
|
# Stage 1: exclude scenarios where we definitely don't
|
||||||
|
@ -11,12 +11,10 @@
|
|||||||
fi
|
fi
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- if test -n "$TARGETS";
|
- ../configure --enable-werror --disable-docs --enable-fdt=system
|
||||||
then
|
${LD_JOBS:+--meson=git} ${TARGETS:+--target-list="$TARGETS"}
|
||||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ;
|
$CONFIGURE_ARGS ||
|
||||||
else
|
{ cat config.log meson-logs/meson-log.txt && exit 1; }
|
||||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ;
|
|
||||||
fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
|
|
||||||
- if test -n "$LD_JOBS";
|
- if test -n "$LD_JOBS";
|
||||||
then
|
then
|
||||||
../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ;
|
../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ;
|
||||||
|
@ -41,8 +41,8 @@ build-system-ubuntu:
|
|||||||
job: amd64-ubuntu2004-container
|
job: amd64-ubuntu2004-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: ubuntu2004
|
IMAGE: ubuntu2004
|
||||||
CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-capstone
|
CONFIGURE_ARGS: --enable-docs
|
||||||
TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
|
TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
|
||||||
microblazeel-softmmu mips64el-softmmu
|
microblazeel-softmmu mips64el-softmmu
|
||||||
MAKE_CHECK_ARGS: check-build
|
MAKE_CHECK_ARGS: check-build
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -74,6 +74,7 @@ build-system-debian:
|
|||||||
job: amd64-debian-container
|
job: amd64-debian-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: debian-amd64
|
IMAGE: debian-amd64
|
||||||
|
CONFIGURE_ARGS: --with-coroutine=sigaltstack
|
||||||
TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
|
TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
|
||||||
riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
|
riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
|
||||||
MAKE_CHECK_ARGS: check-build
|
MAKE_CHECK_ARGS: check-build
|
||||||
@ -119,7 +120,6 @@ build-system-fedora:
|
|||||||
variables:
|
variables:
|
||||||
IMAGE: fedora
|
IMAGE: fedora
|
||||||
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
|
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
|
||||||
--enable-fdt=system --enable-slirp --enable-capstone
|
|
||||||
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
|
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
|
||||||
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
|
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
|
||||||
MAKE_CHECK_ARGS: check-build
|
MAKE_CHECK_ARGS: check-build
|
||||||
@ -165,9 +165,8 @@ build-system-centos:
|
|||||||
job: amd64-centos8-container
|
job: amd64-centos8-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: centos8
|
IMAGE: centos8
|
||||||
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
|
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
|
||||||
--enable-modules --enable-trace-backends=dtrace --enable-docs
|
--enable-modules --enable-trace-backends=dtrace --enable-docs
|
||||||
--enable-vfio-user-server
|
|
||||||
TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
|
TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
|
||||||
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
|
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
|
||||||
MAKE_CHECK_ARGS: check-build
|
MAKE_CHECK_ARGS: check-build
|
||||||
@ -200,7 +199,6 @@ build-system-opensuse:
|
|||||||
job: amd64-opensuse-leap-container
|
job: amd64-opensuse-leap-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: opensuse-leap
|
IMAGE: opensuse-leap
|
||||||
CONFIGURE_ARGS: --enable-fdt=system
|
|
||||||
TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
|
TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
|
||||||
MAKE_CHECK_ARGS: check-build
|
MAKE_CHECK_ARGS: check-build
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -463,7 +461,7 @@ tsan-build:
|
|||||||
variables:
|
variables:
|
||||||
IMAGE: ubuntu2004
|
IMAGE: ubuntu2004
|
||||||
CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
|
CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
|
||||||
--enable-trace-backends=ust --enable-fdt=system --disable-slirp
|
--enable-trace-backends=ust --disable-slirp
|
||||||
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
|
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
|
||||||
MAKE_CHECK_ARGS: bench V=1
|
MAKE_CHECK_ARGS: bench V=1
|
||||||
|
|
||||||
@ -534,18 +532,6 @@ build-tci:
|
|||||||
- QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
|
- QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
|
||||||
- make check-tcg
|
- make check-tcg
|
||||||
|
|
||||||
# Alternate coroutines implementations are only really of interest to KVM users
|
|
||||||
# However we can't test against KVM on Gitlab-CI so we can only run unit tests
|
|
||||||
build-coroutine-sigaltstack:
|
|
||||||
extends: .native_build_job_template
|
|
||||||
needs:
|
|
||||||
job: amd64-ubuntu2004-container
|
|
||||||
variables:
|
|
||||||
IMAGE: ubuntu2004
|
|
||||||
CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
|
|
||||||
--enable-trace-backends=ftrace
|
|
||||||
MAKE_CHECK_ARGS: check-unit
|
|
||||||
|
|
||||||
# Check our reduced build configurations
|
# Check our reduced build configurations
|
||||||
build-without-defaults:
|
build-without-defaults:
|
||||||
extends: .native_build_job_template
|
extends: .native_build_job_template
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
script:
|
script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
|
- ../configure --enable-werror --disable-docs --enable-fdt=system
|
||||||
--disable-user --target-list-exclude="arm-softmmu cris-softmmu
|
--disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS
|
||||||
|
--target-list-exclude="arm-softmmu cris-softmmu
|
||||||
i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
|
i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
|
||||||
mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu
|
mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu
|
||||||
sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
|
sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
|
||||||
|
@ -159,7 +159,7 @@ cross-s390x-kvm-only:
|
|||||||
job: s390x-debian-cross-container
|
job: s390x-debian-cross-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: debian-s390x-cross
|
IMAGE: debian-s390x-cross
|
||||||
EXTRA_CONFIGURE_OPTS: --disable-tcg
|
EXTRA_CONFIGURE_OPTS: --disable-tcg --enable-trace-backends=ftrace
|
||||||
|
|
||||||
cross-mips64el-kvm-only:
|
cross-mips64el-kvm-only:
|
||||||
extends: .cross_accel_build_job
|
extends: .cross_accel_build_job
|
||||||
@ -175,6 +175,7 @@ cross-win32-system:
|
|||||||
job: win32-fedora-cross-container
|
job: win32-fedora-cross-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: fedora-win32-cross
|
IMAGE: fedora-win32-cross
|
||||||
|
EXTRA_CONFIGURE_OPTS: --enable-fdt=internal
|
||||||
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu
|
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu
|
||||||
microblazeel-softmmu mips64el-softmmu nios2-softmmu
|
microblazeel-softmmu mips64el-softmmu nios2-softmmu
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -187,6 +188,7 @@ cross-win64-system:
|
|||||||
job: win64-fedora-cross-container
|
job: win64-fedora-cross-container
|
||||||
variables:
|
variables:
|
||||||
IMAGE: fedora-win64-cross
|
IMAGE: fedora-win64-cross
|
||||||
|
EXTRA_CONFIGURE_OPTS: --enable-fdt=internal
|
||||||
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu
|
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu
|
||||||
m68k-softmmu microblazeel-softmmu nios2-softmmu
|
m68k-softmmu microblazeel-softmmu nios2-softmmu
|
||||||
or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu
|
or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu
|
||||||
|
@ -38,6 +38,7 @@ msys2-64bit:
|
|||||||
mingw-w64-x86_64-capstone
|
mingw-w64-x86_64-capstone
|
||||||
mingw-w64-x86_64-curl
|
mingw-w64-x86_64-curl
|
||||||
mingw-w64-x86_64-cyrus-sasl
|
mingw-w64-x86_64-cyrus-sasl
|
||||||
|
mingw-w64-x86_64-dtc
|
||||||
mingw-w64-x86_64-gcc
|
mingw-w64-x86_64-gcc
|
||||||
mingw-w64-x86_64-glib2
|
mingw-w64-x86_64-glib2
|
||||||
mingw-w64-x86_64-gnutls
|
mingw-w64-x86_64-gnutls
|
||||||
@ -71,7 +72,7 @@ msys2-64bit:
|
|||||||
# for the msys2 64-bit job, due to the build could not complete within
|
# for the msys2 64-bit job, due to the build could not complete within
|
||||||
# the project timeout.
|
# the project timeout.
|
||||||
- ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
|
- ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
|
||||||
--without-default-devices'
|
--without-default-devices --enable-fdt=system'
|
||||||
- ..\msys64\usr\bin\bash -lc 'make'
|
- ..\msys64\usr\bin\bash -lc 'make'
|
||||||
# qTests don't run successfully with "--without-default-devices",
|
# qTests don't run successfully with "--without-default-devices",
|
||||||
# so let's exclude the qtests from CI for now.
|
# so let's exclude the qtests from CI for now.
|
||||||
@ -86,6 +87,7 @@ msys2-32bit:
|
|||||||
mingw-w64-i686-capstone
|
mingw-w64-i686-capstone
|
||||||
mingw-w64-i686-curl
|
mingw-w64-i686-curl
|
||||||
mingw-w64-i686-cyrus-sasl
|
mingw-w64-i686-cyrus-sasl
|
||||||
|
mingw-w64-i686-dtc
|
||||||
mingw-w64-i686-gcc
|
mingw-w64-i686-gcc
|
||||||
mingw-w64-i686-glib2
|
mingw-w64-i686-glib2
|
||||||
mingw-w64-i686-gnutls
|
mingw-w64-i686-gnutls
|
||||||
@ -113,7 +115,8 @@ msys2-32bit:
|
|||||||
- $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
|
- $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
|
||||||
- mkdir output
|
- mkdir output
|
||||||
- cd output
|
- cd output
|
||||||
- ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu'
|
- ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu
|
||||||
|
--enable-fdt=system'
|
||||||
- ..\msys64\usr\bin\bash -lc 'make'
|
- ..\msys64\usr\bin\bash -lc 'make'
|
||||||
- ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=\"--no-suite qtest\" ||
|
- ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=\"--no-suite qtest\" ||
|
||||||
{ cat meson-logs/testlog.txt; exit 1; }'
|
{ cat meson-logs/testlog.txt; exit 1; }'
|
||||||
|
8
configure
vendored
8
configure
vendored
@ -31,8 +31,12 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir build
|
if ! mkdir build || ! touch $MARKER
|
||||||
touch $MARKER
|
then
|
||||||
|
echo "ERROR: Could not create ./build directory. Check the permissions on"
|
||||||
|
echo "your source directory, or try doing an out-of-tree build."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cat > GNUmakefile <<'EOF'
|
cat > GNUmakefile <<'EOF'
|
||||||
# This file is auto-generated by configure to support in-source tree
|
# This file is auto-generated by configure to support in-source tree
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
# GNU Library General Public License for more details.
|
# GNU Library General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
#
|
#
|
||||||
# Authors : Gregorio Robles <grex@gsyc.escet.urjc.es>
|
# Authors : Gregorio Robles <grex@gsyc.escet.urjc.es>
|
||||||
# Authors : Germán Póo-Caamaño <gpoo@gnome.org>
|
# Authors : Germán Póo-Caamaño <gpoo@gnome.org>
|
||||||
|
@ -99,6 +99,12 @@ form is preferred.
|
|||||||
The HPET setting has been turned into a machine property.
|
The HPET setting has been turned into a machine property.
|
||||||
Use ``-machine hpet=off`` instead.
|
Use ``-machine hpet=off`` instead.
|
||||||
|
|
||||||
|
``-no-acpi`` (since 8.0)
|
||||||
|
''''''''''''''''''''''''
|
||||||
|
|
||||||
|
The ``-no-acpi`` setting has been turned into a machine property.
|
||||||
|
Use ``-machine acpi=off`` instead.
|
||||||
|
|
||||||
``-accel hax`` (since 8.0)
|
``-accel hax`` (since 8.0)
|
||||||
''''''''''''''''''''''''''
|
''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
@ -306,6 +306,6 @@ variable::
|
|||||||
|
|
||||||
host_kconfig = \
|
host_kconfig = \
|
||||||
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
|
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
|
||||||
('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
|
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
|
||||||
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
|
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
|
||||||
...
|
...
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/units.h"
|
#include "qemu/units.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "hw/hw.h"
|
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/pci/pci_device.h"
|
#include "hw/pci/pci_device.h"
|
||||||
#include "hw/pci/pci_host.h"
|
#include "hw/pci/pci_host.h"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/units.h"
|
#include "qemu/units.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "hw/hw.h"
|
|
||||||
#include "hw/ppc/ppc.h"
|
#include "hw/ppc/ppc.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/pci/pci_host.h"
|
#include "hw/pci/pci_host.h"
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "sysemu/kvm.h"
|
#include "sysemu/kvm.h"
|
||||||
|
#include "sysemu/cpus.h"
|
||||||
#include "qom/object_interfaces.h"
|
#include "qom/object_interfaces.h"
|
||||||
#include "exec/confidential-guest-support.h"
|
#include "exec/confidential-guest-support.h"
|
||||||
#include "hw/s390x/ipl.h"
|
#include "hw/s390x/ipl.h"
|
||||||
@ -108,6 +109,33 @@ void s390_pv_vm_disable(void)
|
|||||||
s390_pv_cmd_exit(KVM_PV_DISABLE, NULL);
|
s390_pv_cmd_exit(KVM_PV_DISABLE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *s390_pv_do_unprot_async_fn(void *p)
|
||||||
|
{
|
||||||
|
s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool s390_pv_vm_try_disable_async(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* t is only needed to create the thread; once qemu_thread_create
|
||||||
|
* returns, it can safely be discarded.
|
||||||
|
*/
|
||||||
|
QemuThread t;
|
||||||
|
|
||||||
|
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISABLE)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (s390_pv_cmd(KVM_PV_ASYNC_CLEANUP_PREPARE, NULL) != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
qemu_thread_create(&t, "async_cleanup", s390_pv_do_unprot_async_fn, NULL,
|
||||||
|
QEMU_THREAD_DETACHED);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length)
|
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length)
|
||||||
{
|
{
|
||||||
struct kvm_s390_pv_sec_parm args = {
|
struct kvm_s390_pv_sec_parm args = {
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "hw/qdev-properties.h"
|
#include "hw/qdev-properties.h"
|
||||||
#include "hw/s390x/tod.h"
|
#include "hw/s390x/tod.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
|
#include "sysemu/cpus.h"
|
||||||
#include "hw/s390x/pv.h"
|
#include "hw/s390x/pv.h"
|
||||||
#include "migration/blocker.h"
|
#include "migration/blocker.h"
|
||||||
#include "qapi/visitor.h"
|
#include "qapi/visitor.h"
|
||||||
@ -329,7 +330,9 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on_cpu_data arg)
|
|||||||
|
|
||||||
static void s390_machine_unprotect(S390CcwMachineState *ms)
|
static void s390_machine_unprotect(S390CcwMachineState *ms)
|
||||||
{
|
{
|
||||||
|
if (!s390_pv_vm_try_disable_async()) {
|
||||||
s390_pv_vm_disable();
|
s390_pv_vm_disable();
|
||||||
|
}
|
||||||
ms->pv = false;
|
ms->pv = false;
|
||||||
migrate_del_blocker(pv_mig_blocker);
|
migrate_del_blocker(pv_mig_blocker);
|
||||||
error_free_or_abort(&pv_mig_blocker);
|
error_free_or_abort(&pv_mig_blocker);
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
/* GNU General Public License for more details. */
|
/* GNU General Public License for more details. */
|
||||||
/* */
|
/* */
|
||||||
/* You should have received a copy of the GNU General Public License */
|
/* You should have received a copy of the GNU General Public License */
|
||||||
/* along with this program; if not, write to the Free Software */
|
/* along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains structures and definitions for IBM RPA (RS/6000 */
|
/* This file contains structures and definitions for IBM RPA (RS/6000 */
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
#include "hw/hw.h"
|
|
||||||
#include "hw/i2c/i2c.h"
|
#include "hw/i2c/i2c.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qapi/visitor.h"
|
#include "qapi/visitor.h"
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details. You should have received
|
* General Public License for more details. You should have received
|
||||||
* a copy of the GNU General Public License along with RTEMS; see
|
* a copy of the GNU General Public License along with RTEMS; see
|
||||||
* file COPYING. If not, write to the Free Software Foundation, 675
|
* file COPYING. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*
|
*
|
||||||
* As a special exception, including RTEMS header files in a file,
|
* As a special exception, including RTEMS header files in a file,
|
||||||
* instantiating RTEMS generics or templates, or linking other files
|
* instantiating RTEMS generics or templates, or linking other files
|
||||||
|
@ -76,8 +76,7 @@ struct VFIODeviceOps vfio_ccw_ops = {
|
|||||||
|
|
||||||
static IOInstEnding vfio_ccw_handle_request(SubchDev *sch)
|
static IOInstEnding vfio_ccw_handle_request(SubchDev *sch)
|
||||||
{
|
{
|
||||||
S390CCWDevice *cdev = sch->driver_data;
|
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
struct ccw_io_region *region = vcdev->io_region;
|
struct ccw_io_region *region = vcdev->io_region;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -125,8 +124,7 @@ again:
|
|||||||
|
|
||||||
static IOInstEnding vfio_ccw_handle_store(SubchDev *sch)
|
static IOInstEnding vfio_ccw_handle_store(SubchDev *sch)
|
||||||
{
|
{
|
||||||
S390CCWDevice *cdev = sch->driver_data;
|
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
SCHIB *schib = &sch->curr_status;
|
SCHIB *schib = &sch->curr_status;
|
||||||
struct ccw_schib_region *region = vcdev->schib_region;
|
struct ccw_schib_region *region = vcdev->schib_region;
|
||||||
SCHIB *s;
|
SCHIB *s;
|
||||||
@ -170,8 +168,7 @@ static IOInstEnding vfio_ccw_handle_store(SubchDev *sch)
|
|||||||
|
|
||||||
static int vfio_ccw_handle_clear(SubchDev *sch)
|
static int vfio_ccw_handle_clear(SubchDev *sch)
|
||||||
{
|
{
|
||||||
S390CCWDevice *cdev = sch->driver_data;
|
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -210,8 +207,7 @@ again:
|
|||||||
|
|
||||||
static int vfio_ccw_handle_halt(SubchDev *sch)
|
static int vfio_ccw_handle_halt(SubchDev *sch)
|
||||||
{
|
{
|
||||||
S390CCWDevice *cdev = sch->driver_data;
|
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -251,9 +247,7 @@ again:
|
|||||||
|
|
||||||
static void vfio_ccw_reset(DeviceState *dev)
|
static void vfio_ccw_reset(DeviceState *dev)
|
||||||
{
|
{
|
||||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
VFIOCCWDevice *vcdev = VFIO_CCW(dev);
|
||||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
|
|
||||||
ioctl(vcdev->vdev.fd, VFIO_DEVICE_RESET);
|
ioctl(vcdev->vdev.fd, VFIO_DEVICE_RESET);
|
||||||
}
|
}
|
||||||
@ -315,8 +309,7 @@ static void vfio_ccw_io_notifier_handler(void *opaque)
|
|||||||
{
|
{
|
||||||
VFIOCCWDevice *vcdev = opaque;
|
VFIOCCWDevice *vcdev = opaque;
|
||||||
struct ccw_io_region *region = vcdev->io_region;
|
struct ccw_io_region *region = vcdev->io_region;
|
||||||
S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
|
CcwDevice *ccw_dev = CCW_DEVICE(vcdev);
|
||||||
CcwDevice *ccw_dev = CCW_DEVICE(cdev);
|
|
||||||
SubchDev *sch = ccw_dev->sch;
|
SubchDev *sch = ccw_dev->sch;
|
||||||
SCHIB *schib = &sch->curr_status;
|
SCHIB *schib = &sch->curr_status;
|
||||||
SCSW s;
|
SCSW s;
|
||||||
@ -588,9 +581,10 @@ static void vfio_ccw_put_device(VFIOCCWDevice *vcdev)
|
|||||||
static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
char *name = g_strdup_printf("%x.%x.%04x", vcdev->cdev.hostid.cssid,
|
S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
|
||||||
vcdev->cdev.hostid.ssid,
|
char *name = g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid,
|
||||||
vcdev->cdev.hostid.devid);
|
cdev->hostid.ssid,
|
||||||
|
cdev->hostid.devid);
|
||||||
VFIODevice *vbasedev;
|
VFIODevice *vbasedev;
|
||||||
|
|
||||||
QLIST_FOREACH(vbasedev, &group->device_list, next) {
|
QLIST_FOREACH(vbasedev, &group->device_list, next) {
|
||||||
@ -611,14 +605,14 @@ static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
|||||||
*/
|
*/
|
||||||
vcdev->vdev.ram_block_discard_allowed = true;
|
vcdev->vdev.ram_block_discard_allowed = true;
|
||||||
|
|
||||||
if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) {
|
if (vfio_get_device(group, cdev->mdevid, &vcdev->vdev, errp)) {
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
vcdev->vdev.ops = &vfio_ccw_ops;
|
vcdev->vdev.ops = &vfio_ccw_ops;
|
||||||
vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
|
vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
|
||||||
vcdev->vdev.name = name;
|
vcdev->vdev.name = name;
|
||||||
vcdev->vdev.dev = &vcdev->cdev.parent_obj.parent_obj;
|
vcdev->vdev.dev = DEVICE(vcdev);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -656,9 +650,8 @@ static VFIOGroup *vfio_ccw_get_group(S390CCWDevice *cdev, Error **errp)
|
|||||||
static void vfio_ccw_realize(DeviceState *dev, Error **errp)
|
static void vfio_ccw_realize(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
VFIOGroup *group;
|
VFIOGroup *group;
|
||||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
S390CCWDevice *cdev = S390_CCW_DEVICE(dev);
|
||||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
VFIOCCWDevice *vcdev = VFIO_CCW(cdev);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
@ -728,9 +721,8 @@ out_err_propagate:
|
|||||||
|
|
||||||
static void vfio_ccw_unrealize(DeviceState *dev)
|
static void vfio_ccw_unrealize(DeviceState *dev)
|
||||||
{
|
{
|
||||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
S390CCWDevice *cdev = S390_CCW_DEVICE(dev);
|
||||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
VFIOCCWDevice *vcdev = VFIO_CCW(cdev);
|
||||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
|
||||||
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
||||||
VFIOGroup *group = vcdev->vdev.group;
|
VFIOGroup *group = vcdev->vdev.group;
|
||||||
|
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
*
|
||||||
* Various undocumented addresses and names come from Herman Hermitage's VC4
|
* Various undocumented addresses and names come from Herman Hermitage's VC4
|
||||||
* documentation:
|
* documentation:
|
||||||
|
@ -41,6 +41,7 @@ static inline bool s390_is_pv(void)
|
|||||||
int s390_pv_query_info(void);
|
int s390_pv_query_info(void);
|
||||||
int s390_pv_vm_enable(void);
|
int s390_pv_vm_enable(void);
|
||||||
void s390_pv_vm_disable(void);
|
void s390_pv_vm_disable(void);
|
||||||
|
bool s390_pv_vm_try_disable_async(void);
|
||||||
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length);
|
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length);
|
||||||
int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak);
|
int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak);
|
||||||
void s390_pv_prep_reset(void);
|
void s390_pv_prep_reset(void);
|
||||||
@ -60,6 +61,7 @@ static inline bool s390_is_pv(void) { return false; }
|
|||||||
static inline int s390_pv_query_info(void) { return 0; }
|
static inline int s390_pv_query_info(void) { return 0; }
|
||||||
static inline int s390_pv_vm_enable(void) { return 0; }
|
static inline int s390_pv_vm_enable(void) { return 0; }
|
||||||
static inline void s390_pv_vm_disable(void) {}
|
static inline void s390_pv_vm_disable(void) {}
|
||||||
|
static inline bool s390_pv_vm_try_disable_async(void) { return false; }
|
||||||
static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) { return 0; }
|
static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) { return 0; }
|
||||||
static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak) { return 0; }
|
static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak) { return 0; }
|
||||||
static inline void s390_pv_prep_reset(void) {}
|
static inline void s390_pv_prep_reset(void) {}
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#define IBEX_SPI_HOST_H
|
#define IBEX_SPI_HOST_H
|
||||||
|
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/hw.h"
|
|
||||||
#include "hw/ssi/ssi.h"
|
#include "hw/ssi/ssi.h"
|
||||||
#include "qemu/fifo8.h"
|
#include "qemu/fifo8.h"
|
||||||
#include "qom/object.h"
|
#include "qom/object.h"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#define HW_TRICORE_TESTDEVICE_H
|
#define HW_TRICORE_TESTDEVICE_H
|
||||||
|
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/hw.h"
|
|
||||||
|
|
||||||
#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice"
|
#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice"
|
||||||
#define TRICORE_TESTDEVICE(obj) \
|
#define TRICORE_TESTDEVICE(obj) \
|
||||||
|
@ -41,8 +41,7 @@
|
|||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Richard W.M. Jones <rjones@redhat.com>
|
* Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
@ -33,7 +33,7 @@ keymaps = {
|
|||||||
'tr': '-l tr',
|
'tr': '-l tr',
|
||||||
}
|
}
|
||||||
|
|
||||||
if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
|
if meson.is_cross_build() or not xkbcommon.found()
|
||||||
native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true)
|
native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true)
|
||||||
else
|
else
|
||||||
native_qemu_keymap = qemu_keymap
|
native_qemu_keymap = qemu_keymap
|
||||||
|
@ -226,6 +226,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
state = xkb_state_new(map);
|
state = xkb_state_new(map);
|
||||||
xkb_keymap_key_for_each(map, walk_map, state);
|
xkb_keymap_key_for_each(map, walk_map, state);
|
||||||
|
xkb_state_unref(state);
|
||||||
|
state = NULL;
|
||||||
|
|
||||||
/* add quirks */
|
/* add quirks */
|
||||||
fprintf(outfile,
|
fprintf(outfile,
|
||||||
|
@ -3264,6 +3264,7 @@ void qemu_init(int argc, char **argv)
|
|||||||
vnc_parse(optarg);
|
vnc_parse(optarg);
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_no_acpi:
|
case QEMU_OPTION_no_acpi:
|
||||||
|
warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
|
||||||
qdict_put_str(machine_opts_dict, "acpi", "off");
|
qdict_put_str(machine_opts_dict, "acpi", "off");
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_no_hpet:
|
case QEMU_OPTION_no_hpet:
|
||||||
|
@ -227,28 +227,28 @@ static int s390x_write_elf64_notes(const char *note_name,
|
|||||||
DumpState *s,
|
DumpState *s,
|
||||||
const NoteFuncDesc *funcs)
|
const NoteFuncDesc *funcs)
|
||||||
{
|
{
|
||||||
Note note, *notep;
|
g_autofree Note *notep = NULL;
|
||||||
const NoteFuncDesc *nf;
|
const NoteFuncDesc *nf;
|
||||||
int note_size, content_size;
|
int note_size, prev_size = 0, content_size;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
assert(strlen(note_name) < sizeof(note.name));
|
assert(strlen(note_name) < sizeof(notep->name));
|
||||||
|
|
||||||
for (nf = funcs; nf->note_contents_func; nf++) {
|
for (nf = funcs; nf->note_contents_func; nf++) {
|
||||||
notep = ¬e;
|
|
||||||
if (nf->pvonly && !s390_is_pv()) {
|
if (nf->pvonly && !s390_is_pv()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
content_size = nf->note_size_func ? nf->note_size_func() : nf->contents_size;
|
content_size = nf->note_size_func ? nf->note_size_func() : nf->contents_size;
|
||||||
note_size = sizeof(note) - sizeof(notep->contents) + content_size;
|
note_size = sizeof(Note) - sizeof(notep->contents) + content_size;
|
||||||
|
|
||||||
/* Notes with dynamic sizes need to allocate a note */
|
if (prev_size < note_size) {
|
||||||
if (nf->note_size_func) {
|
g_free(notep);
|
||||||
notep = g_malloc(note_size);
|
notep = g_malloc(note_size);
|
||||||
|
prev_size = note_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(notep, 0, sizeof(note));
|
memset(notep, 0, note_size);
|
||||||
|
|
||||||
/* Setup note header data */
|
/* Setup note header data */
|
||||||
notep->hdr.n_descsz = cpu_to_be32(content_size);
|
notep->hdr.n_descsz = cpu_to_be32(content_size);
|
||||||
@ -258,15 +258,9 @@ static int s390x_write_elf64_notes(const char *note_name,
|
|||||||
/* Get contents and write them out */
|
/* Get contents and write them out */
|
||||||
(*nf->note_contents_func)(notep, cpu, id);
|
(*nf->note_contents_func)(notep, cpu, id);
|
||||||
ret = f(notep, note_size, s);
|
ret = f(notep, note_size, s);
|
||||||
|
|
||||||
if (nf->note_size_func) {
|
|
||||||
g_free(notep);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -35,6 +35,12 @@
|
|||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
# define user_or_likely(X) true
|
||||||
|
#else
|
||||||
|
# define user_or_likely(X) likely(X)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Softmmu support */
|
/* Softmmu support */
|
||||||
|
|
||||||
@ -114,19 +120,15 @@ static inline void cpu_stsize_data_ra(CPUS390XState *env, uint64_t addr,
|
|||||||
typedef struct S390Access {
|
typedef struct S390Access {
|
||||||
target_ulong vaddr1;
|
target_ulong vaddr1;
|
||||||
target_ulong vaddr2;
|
target_ulong vaddr2;
|
||||||
char *haddr1;
|
void *haddr1;
|
||||||
char *haddr2;
|
void *haddr2;
|
||||||
uint16_t size1;
|
uint16_t size1;
|
||||||
uint16_t size2;
|
uint16_t size2;
|
||||||
/*
|
/*
|
||||||
* If we can't access the host page directly, we'll have to do I/O access
|
* If we can't access the host page directly, we'll have to do I/O access
|
||||||
* via ld/st helpers. These are internal details, so we store the
|
* via ld/st helpers. These are internal details, so we store the
|
||||||
* mmu idx to do the access here instead of passing it around in the
|
* mmu idx to do the access here instead of passing it around in the
|
||||||
* helpers. Maybe, one day we can get rid of ld/st access - once we can
|
* helpers.
|
||||||
* handle TLB_NOTDIRTY differently. We don't expect these special accesses
|
|
||||||
* to trigger exceptions - only if we would have TLB_NOTDIRTY on LAP
|
|
||||||
* pages, we might trigger a new MMU translation - very unlikely that
|
|
||||||
* the mapping changes in between and we would trigger a fault.
|
|
||||||
*/
|
*/
|
||||||
int mmu_idx;
|
int mmu_idx;
|
||||||
} S390Access;
|
} S390Access;
|
||||||
@ -138,23 +140,27 @@ typedef struct S390Access {
|
|||||||
* For !CONFIG_USER_ONLY, the TEC is stored stored to env->tlb_fill_tec.
|
* For !CONFIG_USER_ONLY, the TEC is stored stored to env->tlb_fill_tec.
|
||||||
* For CONFIG_USER_ONLY, the faulting address is stored to env->__excp_addr.
|
* For CONFIG_USER_ONLY, the faulting address is stored to env->__excp_addr.
|
||||||
*/
|
*/
|
||||||
static int s390_probe_access(CPUArchState *env, target_ulong addr, int size,
|
static inline int s390_probe_access(CPUArchState *env, target_ulong addr,
|
||||||
MMUAccessType access_type, int mmu_idx,
|
int size, MMUAccessType access_type,
|
||||||
bool nonfault, void **phost, uintptr_t ra)
|
int mmu_idx, bool nonfault,
|
||||||
|
void **phost, uintptr_t ra)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_USER_ONLY)
|
int flags = probe_access_flags(env, addr, access_type, mmu_idx,
|
||||||
return probe_access_flags(env, addr, access_type, mmu_idx,
|
|
||||||
nonfault, phost, ra);
|
nonfault, phost, ra);
|
||||||
#else
|
|
||||||
int flags;
|
|
||||||
|
|
||||||
env->tlb_fill_exc = 0;
|
if (unlikely(flags & TLB_INVALID_MASK)) {
|
||||||
flags = probe_access_flags(env, addr, access_type, mmu_idx, nonfault, phost,
|
assert(!nonfault);
|
||||||
ra);
|
#ifdef CONFIG_USER_ONLY
|
||||||
if (env->tlb_fill_exc) {
|
/* Address is in TEC in system mode; see s390_cpu_record_sigsegv. */
|
||||||
|
env->__excp_addr = addr & TARGET_PAGE_MASK;
|
||||||
|
return (page_get_flags(addr) & PAGE_VALID
|
||||||
|
? PGM_PROTECTION : PGM_ADDRESSING);
|
||||||
|
#else
|
||||||
return env->tlb_fill_exc;
|
return env->tlb_fill_exc;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
if (unlikely(flags & TLB_WATCHPOINT)) {
|
if (unlikely(flags & TLB_WATCHPOINT)) {
|
||||||
/* S390 does not presently use transaction attributes. */
|
/* S390 does not presently use transaction attributes. */
|
||||||
cpu_check_watchpoint(env_cpu(env), addr, size,
|
cpu_check_watchpoint(env_cpu(env), addr, size,
|
||||||
@ -162,8 +168,9 @@ static int s390_probe_access(CPUArchState *env, target_ulong addr, int size,
|
|||||||
(access_type == MMU_DATA_STORE
|
(access_type == MMU_DATA_STORE
|
||||||
? BP_MEM_WRITE : BP_MEM_READ), ra);
|
? BP_MEM_WRITE : BP_MEM_READ), ra);
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int access_prepare_nf(S390Access *access, CPUS390XState *env,
|
static int access_prepare_nf(S390Access *access, CPUS390XState *env,
|
||||||
@ -171,51 +178,46 @@ static int access_prepare_nf(S390Access *access, CPUS390XState *env,
|
|||||||
MMUAccessType access_type,
|
MMUAccessType access_type,
|
||||||
int mmu_idx, uintptr_t ra)
|
int mmu_idx, uintptr_t ra)
|
||||||
{
|
{
|
||||||
void *haddr1, *haddr2 = NULL;
|
|
||||||
int size1, size2, exc;
|
int size1, size2, exc;
|
||||||
vaddr vaddr2 = 0;
|
|
||||||
|
|
||||||
assert(size > 0 && size <= 4096);
|
assert(size > 0 && size <= 4096);
|
||||||
|
|
||||||
size1 = MIN(size, -(vaddr1 | TARGET_PAGE_MASK)),
|
size1 = MIN(size, -(vaddr1 | TARGET_PAGE_MASK)),
|
||||||
size2 = size - size1;
|
size2 = size - size1;
|
||||||
|
|
||||||
|
memset(access, 0, sizeof(*access));
|
||||||
|
access->vaddr1 = vaddr1;
|
||||||
|
access->size1 = size1;
|
||||||
|
access->size2 = size2;
|
||||||
|
access->mmu_idx = mmu_idx;
|
||||||
|
|
||||||
exc = s390_probe_access(env, vaddr1, size1, access_type, mmu_idx, nonfault,
|
exc = s390_probe_access(env, vaddr1, size1, access_type, mmu_idx, nonfault,
|
||||||
&haddr1, ra);
|
&access->haddr1, ra);
|
||||||
if (exc) {
|
if (unlikely(exc)) {
|
||||||
return exc;
|
return exc;
|
||||||
}
|
}
|
||||||
if (unlikely(size2)) {
|
if (unlikely(size2)) {
|
||||||
/* The access crosses page boundaries. */
|
/* The access crosses page boundaries. */
|
||||||
vaddr2 = wrap_address(env, vaddr1 + size1);
|
vaddr vaddr2 = wrap_address(env, vaddr1 + size1);
|
||||||
|
|
||||||
|
access->vaddr2 = vaddr2;
|
||||||
exc = s390_probe_access(env, vaddr2, size2, access_type, mmu_idx,
|
exc = s390_probe_access(env, vaddr2, size2, access_type, mmu_idx,
|
||||||
nonfault, &haddr2, ra);
|
nonfault, &access->haddr2, ra);
|
||||||
if (exc) {
|
if (unlikely(exc)) {
|
||||||
return exc;
|
return exc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*access = (S390Access) {
|
|
||||||
.vaddr1 = vaddr1,
|
|
||||||
.vaddr2 = vaddr2,
|
|
||||||
.haddr1 = haddr1,
|
|
||||||
.haddr2 = haddr2,
|
|
||||||
.size1 = size1,
|
|
||||||
.size2 = size2,
|
|
||||||
.mmu_idx = mmu_idx
|
|
||||||
};
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static S390Access access_prepare(CPUS390XState *env, vaddr vaddr, int size,
|
static inline void access_prepare(S390Access *ret, CPUS390XState *env,
|
||||||
|
vaddr vaddr, int size,
|
||||||
MMUAccessType access_type, int mmu_idx,
|
MMUAccessType access_type, int mmu_idx,
|
||||||
uintptr_t ra)
|
uintptr_t ra)
|
||||||
{
|
{
|
||||||
S390Access ret;
|
int exc = access_prepare_nf(ret, env, false, vaddr, size,
|
||||||
int exc = access_prepare_nf(&ret, env, false, vaddr, size,
|
|
||||||
access_type, mmu_idx, ra);
|
access_type, mmu_idx, ra);
|
||||||
assert(!exc);
|
assert(!exc);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper to handle memset on a single page. */
|
/* Helper to handle memset on a single page. */
|
||||||
@ -224,30 +226,16 @@ static void do_access_memset(CPUS390XState *env, vaddr vaddr, char *haddr,
|
|||||||
uintptr_t ra)
|
uintptr_t ra)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_USER_ONLY
|
#ifdef CONFIG_USER_ONLY
|
||||||
g_assert(haddr);
|
|
||||||
memset(haddr, byte, size);
|
memset(haddr, byte, size);
|
||||||
#else
|
#else
|
||||||
MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx);
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (likely(haddr)) {
|
if (likely(haddr)) {
|
||||||
memset(haddr, byte, size);
|
memset(haddr, byte, size);
|
||||||
} else {
|
} else {
|
||||||
/*
|
MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx);
|
||||||
* Do a single access and test if we can then get access to the
|
for (int i = 0; i < size; i++) {
|
||||||
* page. This is especially relevant to speed up TLB_NOTDIRTY.
|
|
||||||
*/
|
|
||||||
g_assert(size > 0);
|
|
||||||
cpu_stb_mmu(env, vaddr, byte, oi, ra);
|
|
||||||
haddr = tlb_vaddr_to_host(env, vaddr, MMU_DATA_STORE, mmu_idx);
|
|
||||||
if (likely(haddr)) {
|
|
||||||
memset(haddr + 1, byte, size - 1);
|
|
||||||
} else {
|
|
||||||
for (i = 1; i < size; i++) {
|
|
||||||
cpu_stb_mmu(env, vaddr + i, byte, oi, ra);
|
cpu_stb_mmu(env, vaddr + i, byte, oi, ra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,70 +252,43 @@ static void access_memset(CPUS390XState *env, S390Access *desta,
|
|||||||
desta->mmu_idx, ra);
|
desta->mmu_idx, ra);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, char **haddr,
|
|
||||||
int offset, int mmu_idx, uintptr_t ra)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_USER_ONLY
|
|
||||||
return ldub_p(*haddr + offset);
|
|
||||||
#else
|
|
||||||
MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx);
|
|
||||||
uint8_t byte;
|
|
||||||
|
|
||||||
if (likely(*haddr)) {
|
|
||||||
return ldub_p(*haddr + offset);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Do a single access and test if we can then get access to the
|
|
||||||
* page. This is especially relevant to speed up TLB_NOTDIRTY.
|
|
||||||
*/
|
|
||||||
byte = cpu_ldb_mmu(env, vaddr + offset, oi, ra);
|
|
||||||
*haddr = tlb_vaddr_to_host(env, vaddr, MMU_DATA_LOAD, mmu_idx);
|
|
||||||
return byte;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8_t access_get_byte(CPUS390XState *env, S390Access *access,
|
static uint8_t access_get_byte(CPUS390XState *env, S390Access *access,
|
||||||
int offset, uintptr_t ra)
|
int offset, uintptr_t ra)
|
||||||
{
|
{
|
||||||
if (offset < access->size1) {
|
target_ulong vaddr = access->vaddr1;
|
||||||
return do_access_get_byte(env, access->vaddr1, &access->haddr1,
|
void *haddr = access->haddr1;
|
||||||
offset, access->mmu_idx, ra);
|
|
||||||
}
|
|
||||||
return do_access_get_byte(env, access->vaddr2, &access->haddr2,
|
|
||||||
offset - access->size1, access->mmu_idx, ra);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, char **haddr,
|
if (unlikely(offset >= access->size1)) {
|
||||||
int offset, uint8_t byte, int mmu_idx,
|
offset -= access->size1;
|
||||||
uintptr_t ra)
|
vaddr = access->vaddr2;
|
||||||
{
|
haddr = access->haddr2;
|
||||||
#ifdef CONFIG_USER_ONLY
|
}
|
||||||
stb_p(*haddr + offset, byte);
|
|
||||||
#else
|
if (user_or_likely(haddr)) {
|
||||||
MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx);
|
return ldub_p(haddr + offset);
|
||||||
|
} else {
|
||||||
if (likely(*haddr)) {
|
MemOpIdx oi = make_memop_idx(MO_UB, access->mmu_idx);
|
||||||
stb_p(*haddr + offset, byte);
|
return cpu_ldb_mmu(env, vaddr + offset, oi, ra);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Do a single access and test if we can then get access to the
|
|
||||||
* page. This is especially relevant to speed up TLB_NOTDIRTY.
|
|
||||||
*/
|
|
||||||
cpu_stb_mmu(env, vaddr + offset, byte, oi, ra);
|
|
||||||
*haddr = tlb_vaddr_to_host(env, vaddr, MMU_DATA_STORE, mmu_idx);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void access_set_byte(CPUS390XState *env, S390Access *access,
|
static void access_set_byte(CPUS390XState *env, S390Access *access,
|
||||||
int offset, uint8_t byte, uintptr_t ra)
|
int offset, uint8_t byte, uintptr_t ra)
|
||||||
{
|
{
|
||||||
if (offset < access->size1) {
|
target_ulong vaddr = access->vaddr1;
|
||||||
do_access_set_byte(env, access->vaddr1, &access->haddr1, offset, byte,
|
void *haddr = access->haddr1;
|
||||||
access->mmu_idx, ra);
|
|
||||||
|
if (unlikely(offset >= access->size1)) {
|
||||||
|
offset -= access->size1;
|
||||||
|
vaddr = access->vaddr2;
|
||||||
|
haddr = access->haddr2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user_or_likely(haddr)) {
|
||||||
|
stb_p(haddr + offset, byte);
|
||||||
} else {
|
} else {
|
||||||
do_access_set_byte(env, access->vaddr2, &access->haddr2,
|
MemOpIdx oi = make_memop_idx(MO_UB, access->mmu_idx);
|
||||||
offset - access->size1, byte, access->mmu_idx, ra);
|
cpu_stb_mmu(env, vaddr + offset, byte, oi, ra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,16 +299,17 @@ static void access_set_byte(CPUS390XState *env, S390Access *access,
|
|||||||
static void access_memmove(CPUS390XState *env, S390Access *desta,
|
static void access_memmove(CPUS390XState *env, S390Access *desta,
|
||||||
S390Access *srca, uintptr_t ra)
|
S390Access *srca, uintptr_t ra)
|
||||||
{
|
{
|
||||||
|
int len = desta->size1 + desta->size2;
|
||||||
int diff;
|
int diff;
|
||||||
|
|
||||||
g_assert(desta->size1 + desta->size2 == srca->size1 + srca->size2);
|
assert(len == srca->size1 + srca->size2);
|
||||||
|
|
||||||
/* Fallback to slow access in case we don't have access to all host pages */
|
/* Fallback to slow access in case we don't have access to all host pages */
|
||||||
if (unlikely(!desta->haddr1 || (desta->size2 && !desta->haddr2) ||
|
if (unlikely(!desta->haddr1 || (desta->size2 && !desta->haddr2) ||
|
||||||
!srca->haddr1 || (srca->size2 && !srca->haddr2))) {
|
!srca->haddr1 || (srca->size2 && !srca->haddr2))) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < desta->size1 + desta->size2; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
uint8_t byte = access_get_byte(env, srca, i, ra);
|
uint8_t byte = access_get_byte(env, srca, i, ra);
|
||||||
|
|
||||||
access_set_byte(env, desta, i, byte, ra);
|
access_set_byte(env, desta, i, byte, ra);
|
||||||
@ -355,20 +317,20 @@ static void access_memmove(CPUS390XState *env, S390Access *desta,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srca->size1 == desta->size1) {
|
diff = desta->size1 - srca->size1;
|
||||||
|
if (likely(diff == 0)) {
|
||||||
memmove(desta->haddr1, srca->haddr1, srca->size1);
|
memmove(desta->haddr1, srca->haddr1, srca->size1);
|
||||||
if (unlikely(srca->size2)) {
|
if (unlikely(srca->size2)) {
|
||||||
memmove(desta->haddr2, srca->haddr2, srca->size2);
|
memmove(desta->haddr2, srca->haddr2, srca->size2);
|
||||||
}
|
}
|
||||||
} else if (srca->size1 < desta->size1) {
|
} else if (diff > 0) {
|
||||||
diff = desta->size1 - srca->size1;
|
|
||||||
memmove(desta->haddr1, srca->haddr1, srca->size1);
|
memmove(desta->haddr1, srca->haddr1, srca->size1);
|
||||||
memmove(desta->haddr1 + srca->size1, srca->haddr2, diff);
|
memmove(desta->haddr1 + srca->size1, srca->haddr2, diff);
|
||||||
if (likely(desta->size2)) {
|
if (likely(desta->size2)) {
|
||||||
memmove(desta->haddr2, srca->haddr2 + diff, desta->size2);
|
memmove(desta->haddr2, srca->haddr2 + diff, desta->size2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
diff = srca->size1 - desta->size1;
|
diff = -diff;
|
||||||
memmove(desta->haddr1, srca->haddr1, desta->size1);
|
memmove(desta->haddr1, srca->haddr1, desta->size1);
|
||||||
memmove(desta->haddr2, srca->haddr1 + desta->size1, diff);
|
memmove(desta->haddr2, srca->haddr1 + desta->size1, diff);
|
||||||
if (likely(srca->size2)) {
|
if (likely(srca->size2)) {
|
||||||
@ -407,9 +369,9 @@ static uint32_t do_helper_nc(CPUS390XState *env, uint32_t l, uint64_t dest,
|
|||||||
/* NC always processes one more byte than specified - maximum is 256 */
|
/* NC always processes one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca1 = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
const uint8_t x = access_get_byte(env, &srca1, i, ra) &
|
const uint8_t x = access_get_byte(env, &srca1, i, ra) &
|
||||||
access_get_byte(env, &srca2, i, ra);
|
access_get_byte(env, &srca2, i, ra);
|
||||||
@ -441,9 +403,9 @@ static uint32_t do_helper_xc(CPUS390XState *env, uint32_t l, uint64_t dest,
|
|||||||
/* XC always processes one more byte than specified - maximum is 256 */
|
/* XC always processes one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca1 = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
|
|
||||||
/* xor with itself is the same as memset(0) */
|
/* xor with itself is the same as memset(0) */
|
||||||
if (src == dest) {
|
if (src == dest) {
|
||||||
@ -482,9 +444,9 @@ static uint32_t do_helper_oc(CPUS390XState *env, uint32_t l, uint64_t dest,
|
|||||||
/* OC always processes one more byte than specified - maximum is 256 */
|
/* OC always processes one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca1 = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
const uint8_t x = access_get_byte(env, &srca1, i, ra) |
|
const uint8_t x = access_get_byte(env, &srca1, i, ra) |
|
||||||
access_get_byte(env, &srca2, i, ra);
|
access_get_byte(env, &srca2, i, ra);
|
||||||
@ -515,8 +477,8 @@ static uint32_t do_helper_mvc(CPUS390XState *env, uint32_t l, uint64_t dest,
|
|||||||
/* MVC always copies one more byte than specified - maximum is 256 */
|
/* MVC always copies one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "When the operands overlap, the result is obtained as if the operands
|
* "When the operands overlap, the result is obtained as if the operands
|
||||||
@ -554,8 +516,8 @@ void HELPER(mvcrl)(CPUS390XState *env, uint64_t l, uint64_t dest, uint64_t src)
|
|||||||
/* MVCRL always copies one more byte than specified - maximum is 256 */
|
/* MVCRL always copies one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
|
|
||||||
for (i = l - 1; i >= 0; i--) {
|
for (i = l - 1; i >= 0; i--) {
|
||||||
uint8_t byte = access_get_byte(env, &srca, i, ra);
|
uint8_t byte = access_get_byte(env, &srca, i, ra);
|
||||||
@ -575,8 +537,8 @@ void HELPER(mvcin)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src)
|
|||||||
l++;
|
l++;
|
||||||
|
|
||||||
src = wrap_address(env, src - l + 1);
|
src = wrap_address(env, src - l + 1);
|
||||||
srca = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
const uint8_t x = access_get_byte(env, &srca, l - i - 1, ra);
|
const uint8_t x = access_get_byte(env, &srca, l - i - 1, ra);
|
||||||
|
|
||||||
@ -595,9 +557,9 @@ void HELPER(mvn)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src)
|
|||||||
/* MVN always copies one more byte than specified - maximum is 256 */
|
/* MVN always copies one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca1 = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
const uint8_t x = (access_get_byte(env, &srca1, i, ra) & 0x0f) |
|
const uint8_t x = (access_get_byte(env, &srca1, i, ra) & 0x0f) |
|
||||||
(access_get_byte(env, &srca2, i, ra) & 0xf0);
|
(access_get_byte(env, &srca2, i, ra) & 0xf0);
|
||||||
@ -618,8 +580,8 @@ void HELPER(mvo)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src)
|
|||||||
S390Access srca, desta;
|
S390Access srca, desta;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
srca = access_prepare(env, src, len_src, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, src, len_src, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, len_dest, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, len_dest, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
|
|
||||||
/* Handle rightmost byte */
|
/* Handle rightmost byte */
|
||||||
byte_dest = cpu_ldub_data_ra(env, dest + len_dest - 1, ra);
|
byte_dest = cpu_ldub_data_ra(env, dest + len_dest - 1, ra);
|
||||||
@ -651,9 +613,9 @@ void HELPER(mvz)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src)
|
|||||||
/* MVZ always copies one more byte than specified - maximum is 256 */
|
/* MVZ always copies one more byte than specified - maximum is 256 */
|
||||||
l++;
|
l++;
|
||||||
|
|
||||||
srca1 = access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
srca2 = access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
const uint8_t x = (access_get_byte(env, &srca1, i, ra) & 0xf0) |
|
const uint8_t x = (access_get_byte(env, &srca1, i, ra) & 0xf0) |
|
||||||
(access_get_byte(env, &srca2, i, ra) & 0x0f);
|
(access_get_byte(env, &srca2, i, ra) & 0x0f);
|
||||||
@ -997,8 +959,8 @@ uint32_t HELPER(mvst)(CPUS390XState *env, uint32_t r1, uint32_t r2)
|
|||||||
* this point). We might over-indicate watchpoints within the pages
|
* this point). We might over-indicate watchpoints within the pages
|
||||||
* (if we ever care, we have to limit processing to a single byte).
|
* (if we ever care, we have to limit processing to a single byte).
|
||||||
*/
|
*/
|
||||||
srca = access_prepare(env, s, len, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, s, len, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, d, len, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, d, len, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
const uint8_t v = access_get_byte(env, &srca, i, ra);
|
const uint8_t v = access_get_byte(env, &srca, i, ra);
|
||||||
|
|
||||||
@ -1085,19 +1047,19 @@ static inline uint32_t do_mvcl(CPUS390XState *env,
|
|||||||
len = MIN(MIN(*srclen, -(*src | TARGET_PAGE_MASK)), len);
|
len = MIN(MIN(*srclen, -(*src | TARGET_PAGE_MASK)), len);
|
||||||
*destlen -= len;
|
*destlen -= len;
|
||||||
*srclen -= len;
|
*srclen -= len;
|
||||||
srca = access_prepare(env, *src, len, MMU_DATA_LOAD, mmu_idx, ra);
|
access_prepare(&srca, env, *src, len, MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
access_memmove(env, &desta, &srca, ra);
|
access_memmove(env, &desta, &srca, ra);
|
||||||
*src = wrap_address(env, *src + len);
|
*src = wrap_address(env, *src + len);
|
||||||
*dest = wrap_address(env, *dest + len);
|
*dest = wrap_address(env, *dest + len);
|
||||||
} else if (wordsize == 1) {
|
} else if (wordsize == 1) {
|
||||||
/* Pad the remaining area */
|
/* Pad the remaining area */
|
||||||
*destlen -= len;
|
*destlen -= len;
|
||||||
desta = access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
access_memset(env, &desta, pad, ra);
|
access_memset(env, &desta, pad, ra);
|
||||||
*dest = wrap_address(env, *dest + len);
|
*dest = wrap_address(env, *dest + len);
|
||||||
} else {
|
} else {
|
||||||
desta = access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
|
||||||
|
|
||||||
/* The remaining length selects the padding byte. */
|
/* The remaining length selects the padding byte. */
|
||||||
for (i = 0; i < len; (*destlen)--, i++) {
|
for (i = 0; i < len; (*destlen)--, i++) {
|
||||||
@ -1153,16 +1115,16 @@ uint32_t HELPER(mvcl)(CPUS390XState *env, uint32_t r1, uint32_t r2)
|
|||||||
while (destlen) {
|
while (destlen) {
|
||||||
cur_len = MIN(destlen, -(dest | TARGET_PAGE_MASK));
|
cur_len = MIN(destlen, -(dest | TARGET_PAGE_MASK));
|
||||||
if (!srclen) {
|
if (!srclen) {
|
||||||
desta = access_prepare(env, dest, cur_len, MMU_DATA_STORE, mmu_idx,
|
access_prepare(&desta, env, dest, cur_len,
|
||||||
ra);
|
MMU_DATA_STORE, mmu_idx, ra);
|
||||||
access_memset(env, &desta, pad, ra);
|
access_memset(env, &desta, pad, ra);
|
||||||
} else {
|
} else {
|
||||||
cur_len = MIN(MIN(srclen, -(src | TARGET_PAGE_MASK)), cur_len);
|
cur_len = MIN(MIN(srclen, -(src | TARGET_PAGE_MASK)), cur_len);
|
||||||
|
|
||||||
srca = access_prepare(env, src, cur_len, MMU_DATA_LOAD, mmu_idx,
|
access_prepare(&srca, env, src, cur_len,
|
||||||
ra);
|
MMU_DATA_LOAD, mmu_idx, ra);
|
||||||
desta = access_prepare(env, dest, cur_len, MMU_DATA_STORE, mmu_idx,
|
access_prepare(&desta, env, dest, cur_len,
|
||||||
ra);
|
MMU_DATA_STORE, mmu_idx, ra);
|
||||||
access_memmove(env, &desta, &srca, ra);
|
access_memmove(env, &desta, &srca, ra);
|
||||||
src = wrap_address(env, src + cur_len);
|
src = wrap_address(env, src + cur_len);
|
||||||
srclen -= cur_len;
|
srclen -= cur_len;
|
||||||
@ -2267,8 +2229,8 @@ uint32_t HELPER(mvcs)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2,
|
|||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
srca = access_prepare(env, a2, l, MMU_DATA_LOAD, MMU_PRIMARY_IDX, ra);
|
access_prepare(&srca, env, a2, l, MMU_DATA_LOAD, MMU_PRIMARY_IDX, ra);
|
||||||
desta = access_prepare(env, a1, l, MMU_DATA_STORE, MMU_SECONDARY_IDX, ra);
|
access_prepare(&desta, env, a1, l, MMU_DATA_STORE, MMU_SECONDARY_IDX, ra);
|
||||||
access_memmove(env, &desta, &srca, ra);
|
access_memmove(env, &desta, &srca, ra);
|
||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
@ -2301,9 +2263,8 @@ uint32_t HELPER(mvcp)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2,
|
|||||||
} else if (!l) {
|
} else if (!l) {
|
||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
|
access_prepare(&srca, env, a2, l, MMU_DATA_LOAD, MMU_SECONDARY_IDX, ra);
|
||||||
srca = access_prepare(env, a2, l, MMU_DATA_LOAD, MMU_SECONDARY_IDX, ra);
|
access_prepare(&desta, env, a1, l, MMU_DATA_STORE, MMU_PRIMARY_IDX, ra);
|
||||||
desta = access_prepare(env, a1, l, MMU_DATA_STORE, MMU_PRIMARY_IDX, ra);
|
|
||||||
access_memmove(env, &desta, &srca, ra);
|
access_memmove(env, &desta, &srca, ra);
|
||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
@ -2644,9 +2605,11 @@ uint32_t HELPER(mvcos)(CPUS390XState *env, uint64_t dest, uint64_t src,
|
|||||||
|
|
||||||
/* FIXME: Access using correct keys and AR-mode */
|
/* FIXME: Access using correct keys and AR-mode */
|
||||||
if (len) {
|
if (len) {
|
||||||
S390Access srca = access_prepare(env, src, len, MMU_DATA_LOAD,
|
S390Access srca, desta;
|
||||||
|
|
||||||
|
access_prepare(&srca, env, src, len, MMU_DATA_LOAD,
|
||||||
mmu_idx_from_as(src_as), ra);
|
mmu_idx_from_as(src_as), ra);
|
||||||
S390Access desta = access_prepare(env, dest, len, MMU_DATA_STORE,
|
access_prepare(&desta, env, dest, len, MMU_DATA_STORE,
|
||||||
mmu_idx_from_as(dest_as), ra);
|
mmu_idx_from_as(dest_as), ra);
|
||||||
|
|
||||||
access_memmove(env, &desta, &srca, ra);
|
access_memmove(env, &desta, &srca, ra);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -319,12 +319,10 @@ static void gen_gvec128_4_i64(gen_gvec128_4_i64_fn fn, uint8_t d, uint8_t a,
|
|||||||
static void gen_addi2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 ah,
|
static void gen_addi2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 ah,
|
||||||
uint64_t b)
|
uint64_t b)
|
||||||
{
|
{
|
||||||
TCGv_i64 bl = tcg_const_i64(b);
|
TCGv_i64 bl = tcg_constant_i64(b);
|
||||||
TCGv_i64 bh = tcg_const_i64(0);
|
TCGv_i64 bh = tcg_constant_i64(0);
|
||||||
|
|
||||||
tcg_gen_add2_i64(dl, dh, al, ah, bl, bh);
|
tcg_gen_add2_i64(dl, dh, al, ah, bl, bh);
|
||||||
tcg_temp_free_i64(bl);
|
|
||||||
tcg_temp_free_i64(bh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vbperm(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vbperm(DisasContext *s, DisasOps *o)
|
||||||
@ -609,9 +607,8 @@ static DisasJumpType op_vlei(DisasContext *s, DisasOps *o)
|
|||||||
return DISAS_NORETURN;
|
return DISAS_NORETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = tcg_const_i64((int16_t)get_field(s, i2));
|
tmp = tcg_constant_i64((int16_t)get_field(s, i2));
|
||||||
write_vec_element_i64(tmp, get_field(s, v1), enr, es);
|
write_vec_element_i64(tmp, get_field(s, v1), enr, es);
|
||||||
tcg_temp_free_i64(tmp);
|
|
||||||
return DISAS_NEXT;
|
return DISAS_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1107,11 +1104,13 @@ static DisasJumpType op_vseg(DisasContext *s, DisasOps *o)
|
|||||||
|
|
||||||
static DisasJumpType op_vst(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vst(DisasContext *s, DisasOps *o)
|
||||||
{
|
{
|
||||||
TCGv_i64 tmp = tcg_const_i64(16);
|
TCGv_i64 tmp;
|
||||||
|
|
||||||
/* Probe write access before actually modifying memory */
|
/* Probe write access before actually modifying memory */
|
||||||
gen_helper_probe_write_access(cpu_env, o->addr1, tmp);
|
gen_helper_probe_write_access(cpu_env, o->addr1,
|
||||||
|
tcg_constant_i64(16));
|
||||||
|
|
||||||
|
tmp = tcg_temp_new_i64();
|
||||||
read_vec_element_i64(tmp, get_field(s, v1), 0, ES_64);
|
read_vec_element_i64(tmp, get_field(s, v1), 0, ES_64);
|
||||||
tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ);
|
tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ);
|
||||||
gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
|
gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
|
||||||
@ -1270,9 +1269,10 @@ static DisasJumpType op_vstm(DisasContext *s, DisasOps *o)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Probe write access before actually modifying memory */
|
/* Probe write access before actually modifying memory */
|
||||||
tmp = tcg_const_i64((v3 - v1 + 1) * 16);
|
gen_helper_probe_write_access(cpu_env, o->addr1,
|
||||||
gen_helper_probe_write_access(cpu_env, o->addr1, tmp);
|
tcg_constant_i64((v3 - v1 + 1) * 16));
|
||||||
|
|
||||||
|
tmp = tcg_temp_new_i64();
|
||||||
for (;; v1++) {
|
for (;; v1++) {
|
||||||
read_vec_element_i64(tmp, v1, 0, ES_64);
|
read_vec_element_i64(tmp, v1, 0, ES_64);
|
||||||
tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ);
|
tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ);
|
||||||
@ -1359,7 +1359,7 @@ static DisasJumpType op_va(DisasContext *s, DisasOps *o)
|
|||||||
static void gen_acc(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, uint8_t es)
|
static void gen_acc(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, uint8_t es)
|
||||||
{
|
{
|
||||||
const uint8_t msb_bit_nr = NUM_VEC_ELEMENT_BITS(es) - 1;
|
const uint8_t msb_bit_nr = NUM_VEC_ELEMENT_BITS(es) - 1;
|
||||||
TCGv_i64 msb_mask = tcg_const_i64(dup_const(es, 1ull << msb_bit_nr));
|
TCGv_i64 msb_mask = tcg_constant_i64(dup_const(es, 1ull << msb_bit_nr));
|
||||||
TCGv_i64 t1 = tcg_temp_new_i64();
|
TCGv_i64 t1 = tcg_temp_new_i64();
|
||||||
TCGv_i64 t2 = tcg_temp_new_i64();
|
TCGv_i64 t2 = tcg_temp_new_i64();
|
||||||
TCGv_i64 t3 = tcg_temp_new_i64();
|
TCGv_i64 t3 = tcg_temp_new_i64();
|
||||||
@ -1416,7 +1416,7 @@ static void gen_acc2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al,
|
|||||||
{
|
{
|
||||||
TCGv_i64 th = tcg_temp_new_i64();
|
TCGv_i64 th = tcg_temp_new_i64();
|
||||||
TCGv_i64 tl = tcg_temp_new_i64();
|
TCGv_i64 tl = tcg_temp_new_i64();
|
||||||
TCGv_i64 zero = tcg_const_i64(0);
|
TCGv_i64 zero = tcg_constant_i64(0);
|
||||||
|
|
||||||
tcg_gen_add2_i64(tl, th, al, zero, bl, zero);
|
tcg_gen_add2_i64(tl, th, al, zero, bl, zero);
|
||||||
tcg_gen_add2_i64(tl, th, th, zero, ah, zero);
|
tcg_gen_add2_i64(tl, th, th, zero, ah, zero);
|
||||||
@ -1425,7 +1425,6 @@ static void gen_acc2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al,
|
|||||||
|
|
||||||
tcg_temp_free_i64(th);
|
tcg_temp_free_i64(th);
|
||||||
tcg_temp_free_i64(tl);
|
tcg_temp_free_i64(tl);
|
||||||
tcg_temp_free_i64(zero);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vacc(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vacc(DisasContext *s, DisasOps *o)
|
||||||
@ -1455,15 +1454,14 @@ static void gen_ac2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 ah,
|
|||||||
TCGv_i64 bl, TCGv_i64 bh, TCGv_i64 cl, TCGv_i64 ch)
|
TCGv_i64 bl, TCGv_i64 bh, TCGv_i64 cl, TCGv_i64 ch)
|
||||||
{
|
{
|
||||||
TCGv_i64 tl = tcg_temp_new_i64();
|
TCGv_i64 tl = tcg_temp_new_i64();
|
||||||
TCGv_i64 th = tcg_const_i64(0);
|
TCGv_i64 zero = tcg_constant_i64(0);
|
||||||
|
|
||||||
/* extract the carry only */
|
/* extract the carry only */
|
||||||
tcg_gen_extract_i64(tl, cl, 0, 1);
|
tcg_gen_extract_i64(tl, cl, 0, 1);
|
||||||
tcg_gen_add2_i64(dl, dh, al, ah, bl, bh);
|
tcg_gen_add2_i64(dl, dh, al, ah, bl, bh);
|
||||||
tcg_gen_add2_i64(dl, dh, dl, dh, tl, th);
|
tcg_gen_add2_i64(dl, dh, dl, dh, tl, zero);
|
||||||
|
|
||||||
tcg_temp_free_i64(tl);
|
tcg_temp_free_i64(tl);
|
||||||
tcg_temp_free_i64(th);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vac(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vac(DisasContext *s, DisasOps *o)
|
||||||
@ -1484,7 +1482,7 @@ static void gen_accc2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 ah,
|
|||||||
{
|
{
|
||||||
TCGv_i64 tl = tcg_temp_new_i64();
|
TCGv_i64 tl = tcg_temp_new_i64();
|
||||||
TCGv_i64 th = tcg_temp_new_i64();
|
TCGv_i64 th = tcg_temp_new_i64();
|
||||||
TCGv_i64 zero = tcg_const_i64(0);
|
TCGv_i64 zero = tcg_constant_i64(0);
|
||||||
|
|
||||||
tcg_gen_andi_i64(tl, cl, 1);
|
tcg_gen_andi_i64(tl, cl, 1);
|
||||||
tcg_gen_add2_i64(tl, th, tl, zero, al, zero);
|
tcg_gen_add2_i64(tl, th, tl, zero, al, zero);
|
||||||
@ -1495,7 +1493,6 @@ static void gen_accc2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 ah,
|
|||||||
|
|
||||||
tcg_temp_free_i64(tl);
|
tcg_temp_free_i64(tl);
|
||||||
tcg_temp_free_i64(th);
|
tcg_temp_free_i64(th);
|
||||||
tcg_temp_free_i64(zero);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vaccc(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vaccc(DisasContext *s, DisasOps *o)
|
||||||
@ -1597,14 +1594,13 @@ static void gen_avgl_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b)
|
|||||||
static void gen_avgl_i64(TCGv_i64 dl, TCGv_i64 al, TCGv_i64 bl)
|
static void gen_avgl_i64(TCGv_i64 dl, TCGv_i64 al, TCGv_i64 bl)
|
||||||
{
|
{
|
||||||
TCGv_i64 dh = tcg_temp_new_i64();
|
TCGv_i64 dh = tcg_temp_new_i64();
|
||||||
TCGv_i64 zero = tcg_const_i64(0);
|
TCGv_i64 zero = tcg_constant_i64(0);
|
||||||
|
|
||||||
tcg_gen_add2_i64(dl, dh, al, zero, bl, zero);
|
tcg_gen_add2_i64(dl, dh, al, zero, bl, zero);
|
||||||
gen_addi2_i64(dl, dh, dl, dh, 1);
|
gen_addi2_i64(dl, dh, dl, dh, 1);
|
||||||
tcg_gen_extract2_i64(dl, dl, dh, 1);
|
tcg_gen_extract2_i64(dl, dl, dh, 1);
|
||||||
|
|
||||||
tcg_temp_free_i64(dh);
|
tcg_temp_free_i64(dh);
|
||||||
tcg_temp_free_i64(zero);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vavgl(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vavgl(DisasContext *s, DisasOps *o)
|
||||||
@ -2440,7 +2436,7 @@ static void gen_scbi2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al,
|
|||||||
{
|
{
|
||||||
TCGv_i64 th = tcg_temp_new_i64();
|
TCGv_i64 th = tcg_temp_new_i64();
|
||||||
TCGv_i64 tl = tcg_temp_new_i64();
|
TCGv_i64 tl = tcg_temp_new_i64();
|
||||||
TCGv_i64 zero = tcg_const_i64(0);
|
TCGv_i64 zero = tcg_constant_i64(0);
|
||||||
|
|
||||||
tcg_gen_sub2_i64(tl, th, al, zero, bl, zero);
|
tcg_gen_sub2_i64(tl, th, al, zero, bl, zero);
|
||||||
tcg_gen_andi_i64(th, th, 1);
|
tcg_gen_andi_i64(th, th, 1);
|
||||||
@ -2452,7 +2448,6 @@ static void gen_scbi2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al,
|
|||||||
|
|
||||||
tcg_temp_free_i64(th);
|
tcg_temp_free_i64(th);
|
||||||
tcg_temp_free_i64(tl);
|
tcg_temp_free_i64(tl);
|
||||||
tcg_temp_free_i64(zero);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisasJumpType op_vscbi(DisasContext *s, DisasOps *o)
|
static DisasJumpType op_vscbi(DisasContext *s, DisasOps *o)
|
||||||
@ -2572,11 +2567,12 @@ static DisasJumpType op_vsumq(DisasContext *s, DisasOps *o)
|
|||||||
return DISAS_NORETURN;
|
return DISAS_NORETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
sumh = tcg_const_i64(0);
|
sumh = tcg_temp_new_i64();
|
||||||
suml = tcg_temp_new_i64();
|
suml = tcg_temp_new_i64();
|
||||||
zero = tcg_const_i64(0);
|
zero = tcg_constant_i64(0);
|
||||||
tmpl = tcg_temp_new_i64();
|
tmpl = tcg_temp_new_i64();
|
||||||
|
|
||||||
|
tcg_gen_mov_i64(sumh, zero);
|
||||||
read_vec_element_i64(suml, get_field(s, v3), max_idx, es);
|
read_vec_element_i64(suml, get_field(s, v3), max_idx, es);
|
||||||
for (idx = 0; idx <= max_idx; idx++) {
|
for (idx = 0; idx <= max_idx; idx++) {
|
||||||
read_vec_element_i64(tmpl, get_field(s, v2), idx, es);
|
read_vec_element_i64(tmpl, get_field(s, v2), idx, es);
|
||||||
@ -2587,7 +2583,6 @@ static DisasJumpType op_vsumq(DisasContext *s, DisasOps *o)
|
|||||||
|
|
||||||
tcg_temp_free_i64(sumh);
|
tcg_temp_free_i64(sumh);
|
||||||
tcg_temp_free_i64(suml);
|
tcg_temp_free_i64(suml);
|
||||||
tcg_temp_free_i64(zero);
|
|
||||||
tcg_temp_free_i64(tmpl);
|
tcg_temp_free_i64(tmpl);
|
||||||
return DISAS_NEXT;
|
return DISAS_NEXT;
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
||||||
# USA
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# creator
|
# creator
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "libqos/pci-pc.h"
|
#include "libqos/pci-pc.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
|
|
||||||
|
static int verbosity_level;
|
||||||
|
|
||||||
/* Tests only initialization so far. TODO: Replace with functional tests */
|
/* Tests only initialization so far. TODO: Replace with functional tests */
|
||||||
static void nop(void)
|
static void nop(void)
|
||||||
{
|
{
|
||||||
@ -45,12 +47,16 @@ static QPCIDevice *get_device(void)
|
|||||||
static unsigned __attribute__((unused)) in_##name(void) \
|
static unsigned __attribute__((unused)) in_##name(void) \
|
||||||
{ \
|
{ \
|
||||||
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
|
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
|
||||||
|
if (verbosity_level >= 2) { \
|
||||||
g_test_message("*%s -> %x", #name, res); \
|
g_test_message("*%s -> %x", #name, res); \
|
||||||
|
} \
|
||||||
return res; \
|
return res; \
|
||||||
} \
|
} \
|
||||||
static void out_##name(unsigned v) \
|
static void out_##name(unsigned v) \
|
||||||
{ \
|
{ \
|
||||||
|
if (verbosity_level >= 2) { \
|
||||||
g_test_message("%x -> *%s", v, #name); \
|
g_test_message("%x -> *%s", v, #name); \
|
||||||
|
} \
|
||||||
qpci_io_write##len(dev, dev_bar, (val), v); \
|
qpci_io_write##len(dev, dev_bar, (val), v); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,6 +201,11 @@ static void test_init(void)
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
char *v_env = getenv("V");
|
||||||
|
|
||||||
|
if (v_env) {
|
||||||
|
verbosity_level = atoi(v_env);
|
||||||
|
}
|
||||||
|
|
||||||
qtest_start("-device rtl8139");
|
qtest_start("-device rtl8139");
|
||||||
|
|
||||||
|
@ -7,3 +7,5 @@ QEMU_OPTS=-action panic=exit-failure -kernel
|
|||||||
-Wl,--build-id=none $< -o $@
|
-Wl,--build-id=none $< -o $@
|
||||||
|
|
||||||
TESTS += unaligned-lowcore
|
TESTS += unaligned-lowcore
|
||||||
|
TESTS += bal
|
||||||
|
TESTS += sam
|
||||||
|
24
tests/tcg/s390x/bal.S
Normal file
24
tests/tcg/s390x/bal.S
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
.org 0x200 /* lowcore padding */
|
||||||
|
.globl _start
|
||||||
|
_start:
|
||||||
|
lpswe start24_psw
|
||||||
|
_start24:
|
||||||
|
lgrl %r0,initial_r0
|
||||||
|
lgrl %r1,expected_r0
|
||||||
|
bal %r0,0f
|
||||||
|
0:
|
||||||
|
cgrjne %r0,%r1,1f
|
||||||
|
lpswe success_psw
|
||||||
|
1:
|
||||||
|
lpswe failure_psw
|
||||||
|
.align 8
|
||||||
|
start24_psw:
|
||||||
|
.quad 0x160000000000,_start24 /* 24-bit mode, cc = 1, pm = 6 */
|
||||||
|
initial_r0:
|
||||||
|
.quad 0x1234567887654321
|
||||||
|
expected_r0:
|
||||||
|
.quad 0x1234567896000000 + 0b /* ilc = 2, cc = 1, pm = 6 */
|
||||||
|
success_psw:
|
||||||
|
.quad 0x2000000000000,0xfff /* see is_special_wait_psw() */
|
||||||
|
failure_psw:
|
||||||
|
.quad 0x2000000000000,0 /* disabled wait */
|
67
tests/tcg/s390x/sam.S
Normal file
67
tests/tcg/s390x/sam.S
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/* DAT on, home-space mode, 64-bit mode */
|
||||||
|
#define DAT_PSWM 0x400c00180000000
|
||||||
|
#define VIRTUAL_BASE 0x123456789abcd000
|
||||||
|
|
||||||
|
.org 0x8e
|
||||||
|
program_interruption_code:
|
||||||
|
.org 0x150
|
||||||
|
program_old_psw:
|
||||||
|
.org 0x1d0 /* program new PSW */
|
||||||
|
.quad 0,pgm_handler
|
||||||
|
.org 0x200 /* lowcore padding */
|
||||||
|
|
||||||
|
.globl _start
|
||||||
|
_start:
|
||||||
|
lctlg %c13,%c13,hasce
|
||||||
|
lpswe dat_psw
|
||||||
|
start_dat:
|
||||||
|
sam24
|
||||||
|
sam24_suppressed:
|
||||||
|
/* sam24 should fail */
|
||||||
|
fail:
|
||||||
|
basr %r12,%r0
|
||||||
|
lpswe failure_psw-.(%r12)
|
||||||
|
pgm_handler:
|
||||||
|
chhsi program_interruption_code,6 /* specification exception? */
|
||||||
|
jne fail
|
||||||
|
clc suppressed_psw(16),program_old_psw /* correct location? */
|
||||||
|
jne fail
|
||||||
|
lpswe success_psw
|
||||||
|
|
||||||
|
.align 8
|
||||||
|
dat_psw:
|
||||||
|
.quad DAT_PSWM,VIRTUAL_BASE+start_dat
|
||||||
|
suppressed_psw:
|
||||||
|
.quad DAT_PSWM,VIRTUAL_BASE+sam24_suppressed
|
||||||
|
success_psw:
|
||||||
|
.quad 0x2000000000000,0xfff /* see is_special_wait_psw() */
|
||||||
|
failure_psw:
|
||||||
|
.quad 0x2000000000000,0 /* disabled wait */
|
||||||
|
hasce:
|
||||||
|
/* DT = 0b11 (region-first-table), TL = 3 (2k entries) */
|
||||||
|
.quad region_first_table + (3 << 2) + 3
|
||||||
|
.align 0x1000
|
||||||
|
region_first_table:
|
||||||
|
.org region_first_table + ((VIRTUAL_BASE >> 53) & 0x7ff) * 8
|
||||||
|
/* TT = 0b11 (region-first-table), TL = 3 (2k entries) */
|
||||||
|
.quad region_second_table + (3 << 2) + 3
|
||||||
|
.org region_first_table + 0x800 * 8
|
||||||
|
region_second_table:
|
||||||
|
.org region_second_table + ((VIRTUAL_BASE >> 42) & 0x7ff) * 8
|
||||||
|
/* TT = 0b10 (region-second-table), TL = 3 (2k entries) */
|
||||||
|
.quad region_third_table + (2 << 2) + 3
|
||||||
|
.org region_second_table + 0x800 * 8
|
||||||
|
region_third_table:
|
||||||
|
.org region_third_table + ((VIRTUAL_BASE >> 31) & 0x7ff) * 8
|
||||||
|
/* TT = 0b01 (region-third-table), TL = 3 (2k entries) */
|
||||||
|
.quad segment_table + (1 << 2) + 3
|
||||||
|
.org region_third_table + 0x800 * 8
|
||||||
|
segment_table:
|
||||||
|
.org segment_table + ((VIRTUAL_BASE >> 20) & 0x7ff) * 8
|
||||||
|
/* TT = 0b00 (segment-table) */
|
||||||
|
.quad page_table
|
||||||
|
.org segment_table + 0x800 * 8
|
||||||
|
page_table:
|
||||||
|
.org page_table + ((VIRTUAL_BASE >> 12) & 0xff) * 8
|
||||||
|
.quad 0
|
||||||
|
.org page_table + 0x100 * 8
|
@ -50,8 +50,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008 Paul E. McKenney, IBM Corporation.
|
* Copyright (c) 2008 Paul E. McKenney, IBM Corporation.
|
||||||
*/
|
*/
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 Mike D. Day, IBM Corporation.
|
* Copyright (c) 2013 Mike D. Day, IBM Corporation.
|
||||||
*/
|
*/
|
||||||
|
@ -43,8 +43,7 @@
|
|||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Richard W.M. Jones <rjones@redhat.com>
|
* Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user