qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] Fixes for x86 TCG and CirrusCI
@ 2023-08-04 20:07 Paolo Bonzini
  2023-08-04 20:07 ` [PULL 1/2] target/i386: Check CR0.TS before enter_mmx Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2023-08-04 20:07 UTC (permalink / raw)
  To: qemu-devel

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(-)
-- 
2.41.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PULL 1/2] target/i386: Check CR0.TS before enter_mmx
  2023-08-04 20:07 [PULL 0/2] Fixes for x86 TCG and CirrusCI Paolo Bonzini
@ 2023-08-04 20:07 ` Paolo Bonzini
  2023-08-04 20:07 ` [PULL 2/2] ci: install meson in CirrusCI KVM build environment Paolo Bonzini
  2023-08-05 17:42 ` [PULL 0/2] Fixes for x86 TCG and CirrusCI Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2023-08-04 20:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Matt Borgerson, qemu-stable

From: Matt Borgerson <contact@mborgerson.com>

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.

Signed-off-by: Matt Borgerson <contact@mborgerson.com>
Message-ID: <CADc=-s5F10muEhLs4f3mxqsEPAHWj0XFfOC2sfFMVHrk9fcpMg@mail.gmail.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/decode-new.c.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 46afd9960bb..8f93a239ddb 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -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);
     }
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PULL 2/2] ci: install meson in CirrusCI KVM build environment
  2023-08-04 20:07 [PULL 0/2] Fixes for x86 TCG and CirrusCI Paolo Bonzini
  2023-08-04 20:07 ` [PULL 1/2] target/i386: Check CR0.TS before enter_mmx Paolo Bonzini
@ 2023-08-04 20:07 ` Paolo Bonzini
  2023-08-05 17:42 ` [PULL 0/2] Fixes for x86 TCG and CirrusCI Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2023-08-04 20:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P . Berrangé

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)
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 .gitlab-ci.d/cirrus/kvm-build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/cirrus/kvm-build.yml b/.gitlab-ci.d/cirrus/kvm-build.yml
index 4334fabf39e..a93881aa8b5 100644
--- a/.gitlab-ci.d/cirrus/kvm-build.yml
+++ b/.gitlab-ci.d/cirrus/kvm-build.yml
@@ -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"
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PULL 0/2] Fixes for x86 TCG and CirrusCI
  2023-08-04 20:07 [PULL 0/2] Fixes for x86 TCG and CirrusCI Paolo Bonzini
  2023-08-04 20:07 ` [PULL 1/2] target/i386: Check CR0.TS before enter_mmx Paolo Bonzini
  2023-08-04 20:07 ` [PULL 2/2] ci: install meson in CirrusCI KVM build environment Paolo Bonzini
@ 2023-08-05 17:42 ` Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-08-05 17:42 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 8/4/23 13:07, Paolo Bonzini wrote:
> 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
> 
> 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~



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-05 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 20:07 [PULL 0/2] Fixes for x86 TCG and CirrusCI Paolo Bonzini
2023-08-04 20:07 ` [PULL 1/2] target/i386: Check CR0.TS before enter_mmx Paolo Bonzini
2023-08-04 20:07 ` [PULL 2/2] ci: install meson in CirrusCI KVM build environment Paolo Bonzini
2023-08-05 17:42 ` [PULL 0/2] Fixes for x86 TCG and CirrusCI Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).