Skip to contentSkip to conversation

Fixes for x86 TCG and CirrusCI

GIT PULL Applied Paolo Bonzini 2 participants 4 messages Aug 4, 2023 – Aug 5, 2023

lore
Share & tools
lore
#0 lore raw

The following changes since commit c26d005e62f4fd177dae0cd70c24cb96761edebc:

Merge tag 'hppa-linux-user-speedup-pull-request' of https://github.com/hdeller/qemu-hppa into staging (2023-08-03 18:49:45 -0700)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to d9ab1f1f4d79683b2db00b0995fa65530c535972:

ci: install meson in CirrusCI KVM build environment (2023-08-04 13:56:17 +0200)

----------------------------------------------------------------
* fix VM build jobs on CirrusCI
* fix MMX instructions clobbering x87 state before raising #NM

----------------------------------------------------------------
Matt Borgerson (1):
target/i386: Check CR0.TS before enter_mmx

Paolo Bonzini (1):
ci: install meson in CirrusCI KVM build environment

 .gitlab-ci.d/cirrus/kvm-build.yml |  2 +-
 target/i386/tcg/decode-new.c.inc  | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

[PULL 2/2] ci: install meson in CirrusCI KVM build environment

scripts/archive-source.sh needs meson in order to download the subprojects, therefore meson needs to be part of the host environment in which VM-based build jobs run.

Fixes 2019cabfee0 ("meson: subprojects: replace submodules with wrap files", 2023-06-06)
---
 .gitlab-ci.d/cirrus/kvm-build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/cirrus/kvm-build.yml +1 -1
index 4334fabf39e..a93881aa8b5 100644
@@ -15,7 +15,7 @@ env:
     folder: $HOME/.cache/qemu-vm
   install_script:
     - dnf update -y
-    - dnf install -y git make openssh-clients qemu-img qemu-system-x86 wget
+    - dnf install -y git make openssh-clients qemu-img qemu-system-x86 wget meson
   clone_script:
     - git clone --depth 100 "$CI_REPOSITORY_URL" .
     - git fetch origin "$CI_COMMIT_REF_NAME"
Signature · 1 line
2.41.0
#2 lore raw

[PULL 1/2] target/i386: Check CR0.TS before enter_mmx

In reply to Paolo Bonzini

From: Matt Borgerson <[email protected]>

When CR0.TS=1, execution of x87 FPU, MMX, and some SSE instructions will cause a Device Not Available (DNA) exception (#NM). System software uses this exception event to lazily context switch FPU state.

Before this patch, enter_mmx helpers may be generated just before #NM generation, prematurely resetting FPU state before the guest has a chance to save it.

Message-ID: <CADc=-s5F10muEhLs4f3mxqsEPAHWj0XFfOC2sfFMVHrk9fcpMg@mail.gmail.com>

---
 target/i386/tcg/decode-new.c.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
target/i386/tcg/decode-new.c.inc +6 -4
index 46afd9960bb..8f93a239ddb 100644
@@ -1803,16 +1803,18 @@ static void disas_insn_new(DisasContext *s, CPUState *cpu, int b)
         }
         break;
 
-    case X86_SPECIAL_MMX:
-        if (!(s->prefix & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))) {
-            gen_helper_enter_mmx(cpu_env);
-        }
+    default:
         break;
     }
 
     if (!validate_vex(s, &decode)) {
         return;
     }
+    if (decode.e.special == X86_SPECIAL_MMX &&
+        !(s->prefix & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))) {
+        gen_helper_enter_mmx(cpu_env);
+    }
+
     if (decode.op[0].has_ea || decode.op[1].has_ea || decode.op[2].has_ea) {
         gen_load_ea(s, &decode.mem, decode.e.vex_class == 12);
     }
Signature · 1 line
2.41.0
#3 lore raw
In reply to Paolo Bonzini
Quoted 8 lines · Paolo Bonzini

The following changes since commit c26d005e62f4fd177dae0cd70c24cb96761edebc:

   Merge tag 'hppa-linux-user-speedup-pull-request' ofhttps://github.com/hdeller/qemu-hppa  into staging (2023-08-03 18:49:45 -0700)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

Quoted 7 lines

for you to fetch changes up to d9ab1f1f4d79683b2db00b0995fa65530c535972:

ci: install meson in CirrusCI KVM build environment (2023-08-04 13:56:17 +0200)

----------------------------------------------------------------
* fix VM build jobs on CirrusCI
* fix MMX instructions clobbering x87 state before raising #NM

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/8.1 as appropriate.

r~