qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f3c637: target/m68k: Fix exception frame form


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] f3c637: target/m68k: Fix exception frame format for 68010
Date: Sun, 25 Feb 2024 03:52:22 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f3c6376c8475388e5218a9503f0c545ca26492a5
      
https://github.com/qemu/qemu/commit/f3c6376c8475388e5218a9503f0c545ca26492a5
  Author: Daniel Palmer <daniel@0x0f.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M target/m68k/cpu.c
    M target/m68k/cpu.h
    M target/m68k/op_helper.c

  Log Message:
  -----------
  target/m68k: Fix exception frame format for 68010

>From the 68010 a word with the frame format and exception vector
are placed on the stack before the PC and SR.

M68K_FEATURE_QUAD_MULDIV is currently checked to workout if to do
this or not for the configured CPU but that flag isn't set for
68010 so currently the exception stack when 68010 is configured
is incorrect.

It seems like checking M68K_FEATURE_MOVEFROMSR_PRIV would do but
adding a new flag that shows exactly what is going on here is
maybe clearer.

Add a new flag for the behaviour, M68K_FEATURE_EXCEPTION_FORMAT_VEC,
and set it for 68010 and above, and then use it to control if the
format and vector word are pushed/pop during exception entry/exit.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2164
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Message-ID: <20240115101643.2165387-1-daniel@0x0f.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 0b76a1a959ef1ea35f543babfb89baf2a6545c1a
      
https://github.com/qemu/qemu/commit/0b76a1a959ef1ea35f543babfb89baf2a6545c1a
  Author: Bibo Mao <maobibo@loongson.cn>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M tests/qtest/cdrom-test.c

  Log Message:
  -----------
  tests/cdrom-test: Add cdrom test for LoongArch virt machine

The cdrom test skips to execute on LoongArch system with command
"make check", this patch enables cdrom test for LoongArch virt
machine platform.

With this patch, cdrom test passes to run on LoongArch virt
machine type.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20240217100230.134042-1-maobibo@loongson.cn>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 1172428fb1486ae2fd2c033efd5c3875f664422d
      
https://github.com/qemu/qemu/commit/1172428fb1486ae2fd2c033efd5c3875f664422d
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M tests/qtest/boot-serial-test.c

  Log Message:
  -----------
  tests/qtest: Fix boot-serial-test when using --without-default-devices

If "configure" has been run with "--without-default-devices", there is
no e1000 device in the binaries, so the boot-serial-test currently fails
in that case since it tries to use the e1000 with the sam460ex machine.

Since we're testing the serial output here, and not the NIC, let's
simply switch to the "pci-bridge" device here instead, which should
always be there for PCI-based machines like the sam460ex.

Message-ID: <20240219111030.384158-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 0e9a89193d06a3b03b1332c4115d8b822e5ab96c
      
https://github.com/qemu/qemu/commit/0e9a89193d06a3b03b1332c4115d8b822e5ab96c
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M tests/qtest/dbus-display-test.c

  Log Message:
  -----------
  tests: skip dbus-display tests that need a console

When compiling with "configure --without-default-devices", the
dbus-display-test fails since it implicitly assumes that the
machine comes with a default console.

There doesn't seem to be an easy way to figure this during build time,
so skip the tests requiring the Console interface at runtime.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20240221073759.171443-1-marcandre.lureau@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: aba594da9645aa6bdb4e2729df2755c186023ca3
      
https://github.com/qemu/qemu/commit/aba594da9645aa6bdb4e2729df2755c186023ca3
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M target/ppc/kvm.c

  Log Message:
  -----------
  target/ppc/kvm: Replace variable length array in kvmppc_save_htab()

To be able to compile QEMU with -Wvla (to prevent potential security
issues), we need to get rid of the variable length array in the
kvmppc_save_htab() function. Replace it with a heap allocation instead.

Message-ID: <20240221162636.173136-2-thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 97c2fc5076be1fb37e7af5287289c3ee023faabd
      
https://github.com/qemu/qemu/commit/97c2fc5076be1fb37e7af5287289c3ee023faabd
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M target/ppc/kvm.c

  Log Message:
  -----------
  target/ppc/kvm: Replace variable length array in kvmppc_read_hptes()

HPTES_PER_GROUP is 8 and HASH_PTE_SIZE_64 is 16, so we don't waste
too many bytes by always allocating the maximum amount of bytes on
the stack here to get rid of the variable length array.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240221162636.173136-3-thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 64c1a5443528ac09d8cd50f365d6a2fb8375b90c
      
https://github.com/qemu/qemu/commit/64c1a5443528ac09d8cd50f365d6a2fb8375b90c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: Enable -Wvla

QEMU has historically used variable length arrays only very rarely.
Variable length arrays are a potential security issue where an
on-stack dynamic allocation isn't correctly size-checked, especially
when the size comes from the guest.  (An example problem of this kind
from the past is CVE-2021-3527).  Forbidding them entirely is a
defensive measure against further bugs of this kind.

Enable -Wvla to prevent any new uses from sneaking into the codebase.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240125173211.1786196-3-peter.maydell@linaro.org>
[thuth: rebased to current master branch]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240221162636.173136-4-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 34fabc85e0c626999768995ec3eff1c5a5143354
      
https://github.com/qemu/qemu/commit/34fabc85e0c626999768995ec3eff1c5a5143354
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M docs/about/build-platforms.rst
    M docs/about/removed-features.rst

  Log Message:
  -----------
  docs: Document that 32-bit Windows is unsupported

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240222130920.362517-2-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 8b47ec7abe4f91b89c6a411f384ef3e8d663841c
      
https://github.com/qemu/qemu/commit/8b47ec7abe4f91b89c6a411f384ef3e8d663841c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M .gitlab-ci.d/container-cross.yml
    M .gitlab-ci.d/crossbuilds.yml
    R tests/docker/dockerfiles/fedora-win32-cross.docker
    M tests/lcitool/refresh

  Log Message:
  -----------
  .gitlab-ci.d: Drop cross-win32-system job

We don't support 32-bit Windows any more, so we don't need to defend it
with this CI job.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20240222130920.362517-3-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: b7b1596da5886490e5e7a627e504f215bc593d54
      
https://github.com/qemu/qemu/commit/b7b1596da5886490e5e7a627e504f215bc593d54
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M .gitlab-ci.d/windows.yml

  Log Message:
  -----------
  .gitlab-ci.d/windows.yml: Remove shared-msys2 abstraction

Now we don't build msys2-32bit we don't need the abstraction out of the
common msys2 handling from the 32-vs-64-bit specifics. Collapse it
down into the msys2-64bit job definition.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240222130920.362517-4-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 028ade14da9eb31a8c5dde48dd5b140e49888908
      
https://github.com/qemu/qemu/commit/028ade14da9eb31a8c5dde48dd5b140e49888908
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: do not filter processor tracing features except on KVM

The processor tracing features in cpu_x86_cpuid() are hardcoded to a set
that should be safe on all processor that support PT virtualization.
But as an additional check, x86_cpu_filter_features() also checks
that the accelerator supports that safe subset, and if not it marks
CPUID_7_0_EBX_INTEL_PT as unavailable.

This check fails on accelerators other than KVM, but it is actually
unnecessary to do it because KVM is the only accelerator that uses the
safe subset.  Everything else just provides nonzero values for CPUID
leaf 0x14 (TCG/HVF because processor tracing is not supported; qtest
because nothing is able to read CPUID anyway).  Restricting the check
to KVM fixes a warning with the qtest accelerator:

    $ qemu-system-x86_64 -display none -cpu max,mmx=off -accel qtest
    qemu-system-x86_64: warning: TCG doesn't support requested feature: 
CPUID.07H:EBX.intel-pt [bit 25]

The warning also happens in the test-x86-cpuid-compat qtest.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2096
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240221162910.101327-1-pbonzini@redhat.com>
Fixes: d047402436 ("target/i386: Call accel-agnostic 
x86_cpu_get_supported_cpuid()")
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: dd88d696ccecc0f3018568f8e281d3d526041e6f
      
https://github.com/qemu/qemu/commit/dd88d696ccecc0f3018568f8e281d3d526041e6f
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-24 (Sat, 24 Feb 2024)

  Changed paths:
    M .gitlab-ci.d/container-cross.yml
    M .gitlab-ci.d/crossbuilds.yml
    M .gitlab-ci.d/windows.yml
    M docs/about/build-platforms.rst
    M docs/about/removed-features.rst
    M meson.build
    M target/i386/cpu.c
    M target/m68k/cpu.c
    M target/m68k/cpu.h
    M target/m68k/op_helper.c
    M target/ppc/kvm.c
    R tests/docker/dockerfiles/fedora-win32-cross.docker
    M tests/lcitool/refresh
    M tests/qtest/boot-serial-test.c
    M tests/qtest/cdrom-test.c
    M tests/qtest/dbus-display-test.c

  Log Message:
  -----------
  Merge tag 'pull-request-2024-02-23' of https://gitlab.com/thuth/qemu into 
staging

* m68k: Fix exception frame format for 68010
* Add cdrom test for LoongArch virt machine
* Fix qtests when using --without-default-devices
* Enable -Wvla
* Windows 32-bit removal
* Silence warnings in the test-x86-cpuid-compat qtest

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmXY7MMRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbWkRg//TCprQ7Gesex/yvMFIZuZk+poEaibxGXU
# cWp6hneV8selTzBKzBC3VS1n31shd9astNRE95N2fSIfCV6R22y2tfZF2rSOoeog
# bvqX7KoaEnSsrDS054EGAnuvYQpOGLGth/3Mc9Z791r5I1tYZPJocVnAyi/OB+3q
# Gr5WzXj6Z/QD7c0f6vZ943wRBO/zc1729KikDUSyfS3Tua+15mAuUIUQdlLNNPct
# 6aT5e6c967mAYh93AUevd3hgVYXH2W4fH7s1q2pap2hMBw2a43XvlMKJ9CvXPFPg
# eU6knRPES16BSC2TTphNCBQi9n3rQdion01VsoQEetVBfFa4yA1Ys7ofF5vCa2l8
# 5EO5X3VQfZeq0ktmrLM7qAO0OMnolIqbeNS97ggOiyL0Q3YXim6cNWf8+OZbGoFR
# OK88ndmzEXrZq+5w4QBDGLHFU3u8ZeWAM6p7Ht/ZN89ndDYT5bGBwkjVRW5hVgck
# fmGhgutSqP2/DN5/4nMn8jtmGc65H/rBRilttW8W2JF72rQJYduDnx/A4KUatkHT
# tC58NwLarF3kF7cebhWvNQDD74ia/35n+fEAmtIHF42YHE6aifss91QrgT+qGG5+
# GG12JIoFVDCgE1pkNU7GO53Uqo94Ej8TUOxwF9QfftxnqiktMG7Y/KQRcSA5VvHr
# laagGgDzHP0=
# =1hu9
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 23 Feb 2024 19:06:43 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-2024-02-23' of https://gitlab.com/thuth/qemu:
  target/i386: do not filter processor tracing features except on KVM
  .gitlab-ci.d/windows.yml: Remove shared-msys2 abstraction
  .gitlab-ci.d: Drop cross-win32-system job
  docs: Document that 32-bit Windows is unsupported
  meson: Enable -Wvla
  target/ppc/kvm: Replace variable length array in kvmppc_read_hptes()
  target/ppc/kvm: Replace variable length array in kvmppc_save_htab()
  tests: skip dbus-display tests that need a console
  tests/qtest: Fix boot-serial-test when using --without-default-devices
  tests/cdrom-test: Add cdrom test for LoongArch virt machine
  target/m68k: Fix exception frame format for 68010

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/91e3bf2e9256...dd88d696ccec

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

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