From patchwork Tue Jan 12 10:50:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smetanin X-Patchwork-Id: 8016201 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 967CB9F2F4 for ; Tue, 12 Jan 2016 10:52:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1A5020384 for ; Tue, 12 Jan 2016 10:52:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB86B203A5 for ; Tue, 12 Jan 2016 10:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964963AbcALKwl (ORCPT ); Tue, 12 Jan 2016 05:52:41 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:34830 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934823AbcALKvy (ORCPT ); Tue, 12 Jan 2016 05:51:54 -0500 Received: from asm-pc.sw.ru ([10.30.16.30]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id u0B3X33Z009385; Mon, 11 Jan 2016 06:33:15 +0300 (MSK) From: Andrey Smetanin To: kvm@vger.kernel.org Cc: Gleb Natapov , Paolo Bonzini , Joerg Roedel , "K. Y. Srinivasan" , Haiyang Zhang , Roman Kagan , "Denis V. Lunev" , qemu-devel@nongnu.org Subject: [PATCH v1 2/5] drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header Date: Tue, 12 Jan 2016 13:50:39 +0300 Message-Id: <1452595842-20880-3-git-send-email-asmetanin@virtuozzo.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1452595842-20880-1-git-send-email-asmetanin@virtuozzo.com> References: <1452595842-20880-1-git-send-email-asmetanin@virtuozzo.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP VMBus hypercall codes inside Hyper-V UAPI header will be used by QEMU to implement VMBus host devices support. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Acked-by: K. Y. Srinivasan --- arch/x86/include/uapi/asm/hyperv.h | 2 ++ drivers/hv/hv.c | 5 +++-- drivers/hv/hyperv_vmbus.h | 6 ------ 3 files changed, 5 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 6341be8..56437d5 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -329,7 +329,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 = do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL) + status = do_hypercall(HV_X64_HCALL_POST_MESSAGE, aligned_msg, NULL) & 0xFFFF; put_cpu(); @@ -347,7 +347,8 @@ u16 hv_signal_event(void *con_id) { u16 status; - status = (do_hypercall(HVCALL_SIGNAL_EVENT, con_id, NULL) & 0xFFFF); + status = (do_hypercall(HV_X64_HCALL_SIGNAL_EVENT, con_id, NULL) + & 0xFFFF); return status; } diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 678663e..36cad1f 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -251,12 +251,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;