From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: devel@linuxdriverproject.org
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Steven Rostedt <rostedt@goodmis.org>,
Jork Loeser <Jork.Loeser@microsoft.com>,
Simon Xiao <sixiao@microsoft.com>,
Andy Lutomirski <luto@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v8 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT
Date: Fri, 9 Jun 2017 15:27:31 +0200 [thread overview]
Message-ID: <20170609132736.13699-6-vkuznets@redhat.com> (raw)
In-Reply-To: <20170609132736.13699-1-vkuznets@redhat.com>
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 <vkuznets@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
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 0fabd41..f501ce1 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -806,21 +806,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 d1ae02d..2c9a2c8 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,
@@ -771,8 +759,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
--
2.9.4
next prev parent reply other threads:[~2017-06-09 13:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 13:27 [PATCH v8 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 02/10] x86/hyper-v: stash the max number of virtual/logical processor Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 03/10] x86/hyper-v: make hv_do_hypercall() inline Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 04/10] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov
2017-06-09 13:27 ` Vitaly Kuznetsov [this message]
2017-06-09 13:27 ` [PATCH v8 06/10] x86/hyper-v: implement rep hypercalls Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 07/10] hyper-v: globalize vp_index Vitaly Kuznetsov
2017-06-13 23:21 ` Stephen Hemminger
2017-06-14 2:29 ` Vitaly Kuznetsov
2017-06-14 4:31 ` Jork Loeser
2017-06-14 16:10 ` Stephen Hemminger
2017-06-09 13:27 ` [PATCH v8 08/10] x86/hyper-v: use hypercall for remote TLB flush Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls Vitaly Kuznetsov
2017-06-09 13:27 ` [PATCH v8 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others() Vitaly Kuznetsov
2017-06-09 18:04 ` Steven Rostedt
2017-06-09 18:23 ` Andy Shevchenko
2017-06-09 18:32 ` Steven Rostedt
2017-06-09 18:40 ` Andy Shevchenko
2017-06-09 18:53 ` Paul Bolle
2017-06-09 19:07 ` Steven Rostedt
2017-06-12 2:56 ` Vitaly Kuznetsov
2017-06-09 16:04 ` [PATCH v8 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Andy Shevchenko
2017-06-09 16:14 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170609132736.13699-6-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=Jork.Loeser@microsoft.com \
--cc=andy.shevchenko@gmail.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sixiao@microsoft.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox