From: vsntk18@gmail.com
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, seanjc@google.com, jroedel@suse.de,
papaluri@amd.com, zxwang42@gmail.com,
Vasant Karasulli <vkarasulli@suse.de>,
Varad Gautam <varad.gautam@suse.com>
Subject: [kvm-unit-tests PATCH v6 03/11] lib: Define unlikely()/likely() macros in libcflat.h
Date: Thu, 11 Apr 2024 19:29:36 +0200 [thread overview]
Message-ID: <20240411172944.23089-4-vsntk18@gmail.com> (raw)
In-Reply-To: <20240411172944.23089-1-vsntk18@gmail.com>
From: Vasant Karasulli <vkarasulli@suse.de>
So that they can be shared across testcases and lib/.
Linux's x86 instruction decoder refrences them.
Signed-off-by: Varad Gautam <varad.gautam@suse.com>
Signed-off-by: Vasant Karasulli <vkarasulli@suse.de>
---
lib/libcflat.h | 3 +++
x86/kvmclock.c | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/libcflat.h b/lib/libcflat.h
index 700f4352..283da08a 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -167,4 +167,7 @@ extern void setup_vm(void);
#define SZ_1G (1 << 30)
#define SZ_2G (1ul << 31)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#define likely(x) __builtin_expect(!!(x), 1)
+
#endif
diff --git a/x86/kvmclock.c b/x86/kvmclock.c
index f9f21032..487c12af 100644
--- a/x86/kvmclock.c
+++ b/x86/kvmclock.c
@@ -5,10 +5,6 @@
#include "kvmclock.h"
#include "asm/barrier.h"
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#define likely(x) __builtin_expect(!!(x), 1)
-
-
struct pvclock_vcpu_time_info __attribute__((aligned(4))) hv_clock[MAX_CPU];
struct pvclock_wall_clock wall_clock;
static unsigned char valid_flags = 0;
--
2.34.1
next prev parent reply other threads:[~2024-04-11 17:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 17:29 [PATCH v6 00/11] Add #VC exception handling for AMD SEV-ES vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 01/11] x86: AMD SEV-ES: Setup #VC exception handler " vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 02/11] x86: Move svm.h to lib/x86/ vsntk18
2024-04-11 17:29 ` vsntk18 [this message]
2024-04-12 6:31 ` [kvm-unit-tests PATCH v6 03/11] lib: Define unlikely()/likely() macros in libcflat.h Andrew Jones
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 04/11] lib: x86: Import insn decoder from Linux vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 05/11] x86: AMD SEV-ES: Pull related GHCB definitions and helpers " vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 06/11] x86: AMD SEV-ES: Prepare for #VC processing vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 07/11] lib/x86: Move xsave helpers to lib/ vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 08/11] x86: AMD SEV-ES: Handle CPUID #VC vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 09/11] x86: AMD SEV-ES: Handle MSR #VC vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 10/11] x86: AMD SEV-ES: Handle IOIO #VC vsntk18
2024-04-11 17:29 ` [kvm-unit-tests PATCH v6 11/11] x86: AMD SEV-ES: Handle string IO for " vsntk18
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=20240411172944.23089-4-vsntk18@gmail.com \
--to=vsntk18@gmail.com \
--cc=jroedel@suse.de \
--cc=kvm@vger.kernel.org \
--cc=papaluri@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=varad.gautam@suse.com \
--cc=vkarasulli@suse.de \
--cc=zxwang42@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox