From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [PATCH 3/9] util: Add i386 CPUINFO_ATOMIC_VMOVDQU
Date: Wed, 17 May 2023 21:40:52 -0700 [thread overview]
Message-ID: <20230518044058.2777467-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230518044058.2777467-1-richard.henderson@linaro.org>
Add a bit to indicate when VMOVDQU is also atomic if aligned.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/host/i386/cpuinfo.h | 1 +
util/cpuinfo-i386.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/host/i386/cpuinfo.h b/include/host/i386/cpuinfo.h
index e6f7461378..a6537123cf 100644
--- a/include/host/i386/cpuinfo.h
+++ b/include/host/i386/cpuinfo.h
@@ -25,6 +25,7 @@
#define CPUINFO_AVX512DQ (1u << 14)
#define CPUINFO_AVX512VBMI2 (1u << 15)
#define CPUINFO_ATOMIC_VMOVDQA (1u << 16)
+#define CPUINFO_ATOMIC_VMOVDQU (1u << 17)
/* Initialized with a constructor. */
extern unsigned cpuinfo;
diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c
index cb9475c688..b72374362f 100644
--- a/util/cpuinfo-i386.c
+++ b/util/cpuinfo-i386.c
@@ -77,8 +77,10 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688
*/
__cpuid(0, a, b, c, d);
- if (c == signature_INTEL_ecx || c == signature_AMD_ecx) {
+ if (c == signature_INTEL_ecx) {
info |= CPUINFO_ATOMIC_VMOVDQA;
+ } else if (c == signature_AMD_ecx) {
+ info |= CPUINFO_ATOMIC_VMOVDQA | CPUINFO_ATOMIC_VMOVDQU;
}
}
}
--
2.34.1
next prev parent reply other threads:[~2023-05-18 4:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 4:40 [PATCH 0/9] Host-specific includes, begin cpuinfo.h Richard Henderson
2023-05-18 4:40 ` [PATCH 1/9] util: Introduce host-specific cpuinfo.h Richard Henderson
2023-05-18 9:30 ` Juan Quintela
2023-05-18 4:40 ` [PATCH 2/9] util: Add cpuinfo-i386.c Richard Henderson
2023-05-18 9:35 ` Juan Quintela
2023-05-18 12:45 ` Richard Henderson
2023-05-18 4:40 ` Richard Henderson [this message]
2023-05-18 15:52 ` [PATCH 3/9] util: Add i386 CPUINFO_ATOMIC_VMOVDQU Peter Maydell
2023-05-18 4:40 ` [PATCH 4/9] tcg/i386: Use cpuinfo.h Richard Henderson
2023-05-18 15:53 ` Peter Maydell
2023-05-18 4:40 ` [PATCH 5/9] util/bufferiszero: Use i386 cpuinfo.h Richard Henderson
2023-05-18 9:49 ` Juan Quintela
2023-05-18 12:48 ` Richard Henderson
2023-05-18 4:40 ` [PATCH 6/9] migration/xbzrle: Shuffle function order Richard Henderson
2023-05-18 9:19 ` Juan Quintela
2023-05-18 4:40 ` [PATCH 7/9] migration/xbzrle: Use i386 cacheinfo.h Richard Henderson
2023-05-18 9:44 ` Juan Quintela
2023-05-18 4:40 ` [PATCH 8/9] migration: Build migration_files once Richard Henderson
2023-05-18 9:20 ` Juan Quintela
2023-05-18 4:40 ` [PATCH 9/9] util: Add cpuinfo-aarch64.c Richard Henderson
2023-05-18 15:55 ` Peter Maydell
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=20230518044058.2777467-4-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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).