VMBus hypercall codes inside Hyper-V UAPI header will
be used by QEMU to implement VMBus host devices support.

Signed-off-by: Andrey Smetanin <asmeta...@virtuozzo.com>
Acked-by: K. Y. Srinivasan <k...@microsoft.com>
Reviewed-by: Roman Kagan <rka...@virtuozzo.com>
CC: Gleb Natapov <g...@kernel.org>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Joerg Roedel <j...@8bytes.org>
CC: "K. Y. Srinivasan" <k...@microsoft.com>
CC: Haiyang Zhang <haiya...@microsoft.com>
CC: Roman Kagan <rka...@virtuozzo.com>
CC: Denis V. Lunev <d...@openvz.org>
CC: qemu-devel@nongnu.org
---
 arch/x86/include/uapi/asm/hyperv.h | 2 ++
 drivers/hv/hv.c                    | 4 ++--
 drivers/hv/hyperv_vmbus.h          | 6 ------
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/x86/include/uapi/asm/hyperv.h 
b/arch/x86/include/uapi/asm/hyperv.h
index 0c50fab..bc1c8a9 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
@@ -227,6 +227,8 @@
 
 /* Declare the various hypercall operations. */
 #define HV_X64_HCALL_NOTIFY_LONG_SPIN_WAIT             0x0008
+#define HV_X64_HCALL_POST_MESSAGE                      0x005c
+#define HV_X64_HCALL_SIGNAL_EVENT                      0x005d
 
 #define HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE             0x00000001
 #define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT      12
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 11bca51..5ce2dec 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -331,7 +331,7 @@ int hv_post_message(union hv_connection_id connection_id,
        aligned_msg->payload_size = payload_size;
        memcpy((void *)aligned_msg->payload, payload, payload_size);
 
-       status = hv_do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL);
+       status = hv_do_hypercall(HV_X64_HCALL_POST_MESSAGE, aligned_msg, NULL);
 
        put_cpu();
        return status & 0xFFFF;
@@ -348,7 +348,7 @@ int hv_signal_event(void *con_id)
 {
        u64 status;
 
-       status = hv_do_hypercall(HVCALL_SIGNAL_EVENT, con_id, NULL);
+       status = hv_do_hypercall(HV_X64_HCALL_SIGNAL_EVENT, con_id, NULL);
 
        return status & 0xFFFF;
 }
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 4ebc796..2f8c0f4 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -256,12 +256,6 @@ struct hv_monitor_page {
        u8 rsvdz4[1984];
 };
 
-/* Declare the various hypercall operations. */
-enum hv_call_code {
-       HVCALL_POST_MESSAGE     = 0x005c,
-       HVCALL_SIGNAL_EVENT     = 0x005d,
-};
-
 /* Definition of the hv_post_message hypercall input structure. */
 struct hv_input_post_message {
        union hv_connection_id connectionid;
-- 
2.4.3


Reply via email to