All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edwin Török" <edwin.torok@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Edwin Török" <edwin.torok@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>
Subject: [PATCH 0/4] Fix building tools/tests/x86_emulator with clang-21
Date: Mon, 23 Feb 2026 10:04:51 +0000	[thread overview]
Message-ID: <cover.1771840208.git.edwin.torok@citrix.com> (raw)

While working on another patch series I noticed that `clang-21` cannot
build `tools/tests/x86_emulator`. Once I fixed that `xmm0` related tests
failed, because `clang` doesn't support `-ffixed-xmm0`.

This series fixes building and running the test with `clang`.

There might still be some latent bugs in the tests though, i.e. `xmm0` may not
be the only reason it fails on clang: the `fxsave` tests have
2 overlapping areas of memory at `res + 0x80`, and `res + 0x100` of length `0x200`.
Instead the 2nd area should start at `0x280`, and the memset should
clear an area of `0x480`.
I didn't attempt to fix all those, because attempting to do so caused
the tests to start failing on GCC.

For convenience this patch series is also available at:
https://gitlab.com/xen-project/people/edwintorok/xen/-/compare/staging...private%2Fedvint%2Femulator?from_project_id=2336572
https://gitlab.com/xen-project/people/edwintorok/xen/-/pipelines/2343355874

Edwin Török (4):
  tools/tests/x86_emulator: fix 'shifting a negative signed value is
    undefined'
  tools/tests/x86_emulator: avoid duplicating loop body
  tools/tests/x86_emulator: fix build on clang-21
  tools/tests/x86_emulator: disable xmm* tests on clang

 tools/tests/x86_emulator/Makefile            |  1 +
 tools/tests/x86_emulator/test_x86_emulator.c | 48 +++++++++++++++++++-
 2 files changed, 47 insertions(+), 2 deletions(-)

-- 
2.47.3



             reply	other threads:[~2026-02-23 10:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 10:04 Edwin Török [this message]
2026-02-23 10:04 ` [PATCH 1/4] tools/tests/x86_emulator: fix 'shifting a negative signed value is undefined' Edwin Török
2026-02-23 15:42   ` Jan Beulich
2026-02-24 10:12     ` Edwin Torok
2026-02-24 10:25       ` Jan Beulich
2026-02-23 10:04 ` [PATCH 2/4] tools/tests/x86_emulator: avoid duplicating loop body Edwin Török
2026-02-23 15:57   ` Jan Beulich
2026-02-24  9:21     ` Edwin Torok
2026-02-23 10:04 ` [PATCH 3/4] tools/tests/x86_emulator: fix build on clang-21 Edwin Török
2026-02-23 16:02   ` Jan Beulich
2026-02-23 16:06     ` Andrew Cooper
2026-02-23 16:21       ` Jan Beulich
2026-02-23 16:36         ` Andrew Cooper
2026-02-23 16:40           ` Jan Beulich
2026-02-23 10:04 ` [PATCH 4/4] tools/tests/x86_emulator: disable xmm* tests on clang Edwin Török
2026-02-23 16:10   ` Jan Beulich
2026-02-24  9:34     ` Edwin Torok
2026-02-24  9:48       ` Jan Beulich
2026-02-27 11:02         ` Edwin Torok

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=cover.1771840208.git.edwin.torok@citrix.com \
    --to=edwin.torok@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.