[PATCH 06/12] Add compat version of native_read_tsc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---

 x86/external-module-compat.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 2545ce9..a1a21a5 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -90,6 +90,13 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
 	return EAX_EDX_VAL(val, low, high);
 }
 
+static inline unsigned long long native_read_tsc(void)
+{
+	unsigned long long val;
+	asm volatile("rdtsc" : "=A" (val));
+	return val;
+}
+
 #endif
 
 #endif

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux