[PATCH v2] kvm-kmod: x86: Add MCE compat defines

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

 



Changes in v2:
 - added empty mce.h for 32-bit kernels
 - fixed redefinition issue by pulling in mce.h early

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

 include-compat/asm-x86/mce.h |    1 +
 x86/external-module-compat.h |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
 create mode 100644 include-compat/asm-x86/mce.h

diff --git a/include-compat/asm-x86/mce.h b/include-compat/asm-x86/mce.h
new file mode 100644
index 0000000..1eb03c6
--- /dev/null
+++ b/include-compat/asm-x86/mce.h
@@ -0,0 +1 @@
+/* empty file to keep #include happy */
diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index c33eb2e..5add5c9 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -540,3 +540,13 @@ struct mtrr_state_type {
 #ifndef CONFIG_HAVE_KVM_IRQCHIP
 #define CONFIG_HAVE_KVM_IRQCHIP 1
 #endif
+
+#include <asm/mce.h>
+
+#ifndef MCG_CTL_P
+#define MCG_CTL_P        (1ULL<<8)
+#define MCG_STATUS_MCIP  (1ULL<<2)
+#define MCI_STATUS_VAL   (1ULL<<63)
+#define MCI_STATUS_OVER  (1ULL<<62)
+#define MCI_STATUS_UC    (1ULL<<61)
+#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