]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drivers/hv: share Hyper-V SynIC constants with userspace
authorAndrey Smetanin <asmetanin@virtuozzo.com>
Fri, 16 Oct 2015 07:07:50 +0000 (10:07 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Nov 2015 15:24:33 +0000 (16:24 +0100)
Moved Hyper-V synic contants from guest Hyper-V drivers private
header into x86 arch uapi Hyper-V header.

Added Hyper-V synic msr's flags into x86 arch uapi Hyper-V header.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/hyperv.h
drivers/hv/hyperv_vmbus.h
include/linux/hyperv.h

index 2677a0aac2ccbcddd1f59770424ab32ba4a44587..040d4083c24fb1190df2d9377b6396dc4e2b8b3c 100644 (file)
@@ -257,4 +257,16 @@ typedef struct _HV_REFERENCE_TSC_PAGE {
        __s64 tsc_offset;
 } HV_REFERENCE_TSC_PAGE, *PHV_REFERENCE_TSC_PAGE;
 
+/* Define the number of synthetic interrupt sources. */
+#define HV_SYNIC_SINT_COUNT            (16)
+/* Define the expected SynIC version. */
+#define HV_SYNIC_VERSION_1             (0x1)
+
+#define HV_SYNIC_CONTROL_ENABLE                (1ULL << 0)
+#define HV_SYNIC_SIMP_ENABLE           (1ULL << 0)
+#define HV_SYNIC_SIEFP_ENABLE          (1ULL << 0)
+#define HV_SYNIC_SINT_MASKED           (1ULL << 16)
+#define HV_SYNIC_SINT_AUTO_EOI         (1ULL << 17)
+#define HV_SYNIC_SINT_VECTOR_MASK      (0xFF)
+
 #endif
index 3d70e36c918ef3202362daa608eb86bd2fce2281..3782636562a1b0c2b7d16273c14db14e8549e768 100644 (file)
@@ -63,9 +63,6 @@ enum hv_cpuid_function {
 /* Define version of the synthetic interrupt controller. */
 #define HV_SYNIC_VERSION               (1)
 
-/* Define the expected SynIC version. */
-#define HV_SYNIC_VERSION_1             (0x1)
-
 /* Define synthetic interrupt controller message constants. */
 #define HV_MESSAGE_SIZE                        (256)
 #define HV_MESSAGE_PAYLOAD_BYTE_COUNT  (240)
@@ -105,8 +102,6 @@ enum hv_message_type {
        HVMSG_X64_LEGACY_FP_ERROR               = 0x80010005
 };
 
-/* Define the number of synthetic interrupt sources. */
-#define HV_SYNIC_SINT_COUNT            (16)
 #define HV_SYNIC_STIMER_COUNT          (4)
 
 /* Define invalid partition identifier. */
index 54733d5b503e091e01825c8fd195d1173db92ef3..8fdc17b84739bdeb31a618e388a9d2238c6490f6 100644 (file)
@@ -26,6 +26,7 @@
 #define _HYPERV_H
 
 #include <uapi/linux/hyperv.h>
+#include <uapi/asm/hyperv.h>
 
 #include <linux/types.h>
 #include <linux/scatterlist.h>