summaryrefslogtreecommitdiff
path: root/arch/x86/xen/time.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-03-31 11:15:09 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2023-03-31 11:15:09 -0400
commit85b475a4502d45380c1b9223c01954daa228eeb0 (patch)
tree2f37f9ea8519f7a101decd8a1e9ec13db051363b /arch/x86/xen/time.c
parent80962ec912db56d323883154efc2297473e692cb (diff)
parent21f27df854008b86349a203bf97fef79bb11f53e (diff)
Merge tag 'kvm-s390-master-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
A small fix that repairs the external loop detection code for PV guests.
Diffstat (limited to 'arch/x86/xen/time.c')
-rw-r--r--arch/x86/xen/time.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 1d597364b49d..b74ac2562cfb 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -20,6 +20,7 @@
#include <asm/pvclock.h>
#include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h>
+#include <asm/xen/cpuid.h>
#include <xen/events.h>
#include <xen/features.h>
@@ -503,11 +504,7 @@ static int __init xen_tsc_safe_clocksource(void)
/* Leaf 4, sub-leaf 0 (0x40000x03) */
cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx);
- /* tsc_mode = no_emulate (2) */
- if (ebx != 2)
- return 0;
-
- return 1;
+ return ebx == XEN_CPUID_TSC_MODE_NEVER_EMULATE;
}
static void __init xen_time_init(void)