From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332AbdHJQnD (ORCPT ); Thu, 10 Aug 2017 12:43:03 -0400 Received: from terminus.zytor.com ([65.50.211.136]:40651 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbdHJQnA (ORCPT ); Thu, 10 Aug 2017 12:43:00 -0400 Date: Thu, 10 Aug 2017 09:38:19 -0700 From: tip-bot for Vitaly Kuznetsov Message-ID: Cc: peterz@infradead.org, rostedt@goodmis.org, torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, sthemmin@microsoft.com, Jork.Loeser@microsoft.com, vkuznets@redhat.com, linux-kernel@vger.kernel.org, andy.shevchenko@gmail.com, sixiao@microsoft.com, kys@microsoft.com, luto@kernel.org, haiyangz@microsoft.com Reply-To: vkuznets@redhat.com, Jork.Loeser@microsoft.com, sthemmin@microsoft.com, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, rostedt@goodmis.org, haiyangz@microsoft.com, luto@kernel.org, andy.shevchenko@gmail.com, sixiao@microsoft.com, kys@microsoft.com, linux-kernel@vger.kernel.org In-Reply-To: <20170802160921.21791-5-vkuznets@redhat.com> References: <20170802160921.21791-5-vkuznets@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] hyper-v: Use fast hypercall for HVCALL_SIGNAL_EVENT Git-Commit-ID: 057841713cfff62b4485cdd2b245f05b7ea3ba16 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 057841713cfff62b4485cdd2b245f05b7ea3ba16 Gitweb: http://git.kernel.org/tip/057841713cfff62b4485cdd2b245f05b7ea3ba16 Author: Vitaly Kuznetsov AuthorDate: Wed, 2 Aug 2017 18:09:16 +0200 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 16:50:22 +0200 hyper-v: Use fast hypercall for HVCALL_SIGNAL_EVENT We need to pass only 8 bytes of input for HvSignalEvent which makes it a perfect fit for fast hypercall. hv_input_signal_event_buffer is not needed any more and hv_input_signal_event is converted to union for convenience. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Hemminger Cc: Andy Lutomirski Cc: Haiyang Zhang Cc: Jork Loeser Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Simon Xiao Cc: Steven Rostedt Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/20170802160921.21791-5-vkuznets@redhat.com Signed-off-by: Ingo Molnar --- drivers/hv/channel_mgmt.c | 13 ++----------- drivers/hv/connection.c | 2 +- include/linux/hyperv.h | 15 +-------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 4bbb8de..fd2b6c6 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -805,21 +805,12 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr) /* * Setup state for signalling the host. */ - newchannel->sig_event = (struct hv_input_signal_event *) - (ALIGN((unsigned long) - &newchannel->sig_buf, - HV_HYPERCALL_PARAM_ALIGN)); - - newchannel->sig_event->connectionid.asu32 = 0; - newchannel->sig_event->connectionid.u.id = VMBUS_EVENT_CONNECTION_ID; - newchannel->sig_event->flag_number = 0; - newchannel->sig_event->rsvdz = 0; + newchannel->sig_event = VMBUS_EVENT_CONNECTION_ID; if (vmbus_proto_version != VERSION_WS2008) { newchannel->is_dedicated_interrupt = (offer->is_dedicated_interrupt != 0); - newchannel->sig_event->connectionid.u.id = - offer->connection_id; + newchannel->sig_event = offer->connection_id; } memcpy(&newchannel->offermsg, offer, diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 45e806e..37ecf51 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -408,6 +408,6 @@ void vmbus_set_event(struct vmbus_channel *channel) if (!channel->is_dedicated_interrupt) vmbus_send_interrupt(child_relid); - hv_do_hypercall(HVCALL_SIGNAL_EVENT, channel->sig_event, NULL); + hv_do_fast_hypercall8(HVCALL_SIGNAL_EVENT, channel->sig_event); } EXPORT_SYMBOL_GPL(vmbus_set_event); diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 6608a71..c472bd4 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -677,18 +677,6 @@ union hv_connection_id { } u; }; -/* Definition of the hv_signal_event hypercall input structure. */ -struct hv_input_signal_event { - union hv_connection_id connectionid; - u16 flag_number; - u16 rsvdz; -}; - -struct hv_input_signal_event_buffer { - u64 align8; - struct hv_input_signal_event event; -}; - enum hv_numa_policy { HV_BALANCED = 0, HV_LOCALIZED, @@ -770,8 +758,7 @@ struct vmbus_channel { } callback_mode; bool is_dedicated_interrupt; - struct hv_input_signal_event_buffer sig_buf; - struct hv_input_signal_event *sig_event; + u64 sig_event; /* * Starting with win8, this field will be used to specify