All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: kvm@vger.kernel.org
Cc: thuth@redhat.com
Subject: [PATCH kvm-unit-tests] x86: disable SSE on 32-bit hosts
Date: Tue, 16 Jun 2020 10:02:17 -0400	[thread overview]
Message-ID: <20200616140217.104362-1-pbonzini@redhat.com> (raw)

On 64-bit hosts we are disabling SSE and SSE2.  Depending on the
compiler however it may use movq instructions for 64-bit transfers
even when targeting 32-bit processors; when CR4.OSFXSR is not set,
this results in an undefined opcode exception, so tell the compiler
to avoid those instructions on 32-bit hosts as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/Makefile.i386 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/x86/Makefile.i386 b/x86/Makefile.i386
index d801b80..be9d6bc 100644
--- a/x86/Makefile.i386
+++ b/x86/Makefile.i386
@@ -1,6 +1,7 @@
 cstart.o = $(TEST_DIR)/cstart.o
 bits = 32
 ldarch = elf32-i386
+COMMON_CFLAGS += -mno-sse -mno-sse2
 
 cflatobjs += lib/x86/setjmp32.o
 
-- 
2.26.2


             reply	other threads:[~2020-06-16 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 14:02 Paolo Bonzini [this message]
2020-06-16 15:17 ` [PATCH kvm-unit-tests] x86: disable SSE on 32-bit hosts Thomas Huth
2020-06-23  9:45   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200616140217.104362-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.