summary refs log tree commit diff stats
path: root/include/qemu/cpuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/cpuid.h')
-rw-r--r--include/qemu/cpuid.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/qemu/cpuid.h b/include/qemu/cpuid.h
index 7adb12d320..1451e8ef2f 100644
--- a/include/qemu/cpuid.h
+++ b/include/qemu/cpuid.h
@@ -71,4 +71,11 @@
 #define bit_LZCNT       (1 << 5)
 #endif
 
+static inline unsigned xgetbv_low(unsigned c)
+{
+    unsigned a, d;
+    asm("xgetbv" : "=a"(a), "=d"(d) : "c"(c));
+    return a;
+}
+
 #endif /* QEMU_CPUID_H */