[PATCH v2 15/16] hyper-v: trace vmbus_release_relid()

2017-09-29 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_RELID_RELEASED sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 7 +-- drivers/hv/hv_trace.h | 16 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel_mg

[PATCH v2 02/16] hyper-v: trace vmbus_on_message()

2017-09-29 Thread Vitaly Kuznetsov
Add tracepoint to vmbus_on_message() which is called when we start processing a blocking from work context. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 5 + 2 files changed, 7 insertions(+) diff --git a/driv

[PATCH v2 03/16] hyper-v: trace vmbus_onoffer()

2017-09-29 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_OFFERCHANNEL handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 37 + 2 files changed, 39 insertions(+) diff --git a/drivers/hv/channel_mg

[PATCH v2 07/16] hyper-v: trace vmbus_ongpadl_torndown()

2017-09-29 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_GPADL_TORNDOWN handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c

[PATCH v2 00/16] Hyper-V: add tracing to VMBus module and trace all messages

2017-09-29 Thread Vitaly Kuznetsov
ANNELMSG_UNLOAD/CHANNELMSG_UNLOAD_RESPONSE are not traced as these are mostly used on crash. Vitaly Kuznetsov (16): hyper-v: trace vmbus_on_msg_dpc() hyper-v: trace vmbus_on_message() hyper-v: trace vmbus_onoffer() hyper-v: trace vmbus_onoffer_rescind() hyper-v: trace vmbus_onopen_result()

Re: [PATCH 02/16] hyper-v: trace vmbus_on_message()

2017-09-21 Thread Vitaly Kuznetsov
Steven Rostedt <rost...@goodmis.org> writes: > On Wed, 20 Sep 2017 19:21:53 +0200 > Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> diff --git a/drivers/hv/hv_trace.h b/drivers/hv/hv_trace.h >> index 9a29ef55477d..72911dfc9682 100644 >> --- a/dr

[PATCH 12/16] hyper-v: trace vmbus_establish_gpadl()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_GPADL_HEADER/CHANNELMSG_GPADL_BODY sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 6 ++ drivers/hv/hv_trace.h | 42 ++ 2 files changed, 48 insertions(+) diff --git a/driv

[PATCH 11/16] hyper-v: trace vmbus_close_internal()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_CLOSECHANNEL sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 15 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 7b114b

[PATCH 08/16] hyper-v: trace vmbus_onversion_response()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_VERSION_RESPONSE handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 3 +++ drivers/hv/hv_trace.h | 11 +++ 2 files changed, 14 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_

[PATCH 14/16] hyper-v: trace vmbus_negotiate_version()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_INITIATE_CONTACT sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/connection.c | 3 +++ drivers/hv/hv_trace.h | 26 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/hv/connection.c b/driv

[PATCH 13/16] hyper-v: trace vmbus_teardown_gpadl()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_GPADL_TEARDOWN sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 18 ++ 2 files changed, 20 insertions(+) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c

[PATCH 15/16] hyper-v: trace vmbus_release_relid()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_RELID_RELEASED sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 7 +-- drivers/hv/hv_trace.h | 16 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/hv/channel_mg

[PATCH 16/16] hyper-v: trace vmbus_send_tl_connect_request()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_TL_CONNECT_REQUEST sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 7 ++- drivers/hv/hv_trace.h | 20 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel.c b/driv

[PATCH 04/16] hyper-v: trace vmbus_onoffer_rescind()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_RESCIND_CHANNELOFFER handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_

[PATCH 09/16] hyper-v: trace vmbus_request_offers()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_REQUESTOFFERS sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 4 +++- drivers/hv/hv_trace.h | 8 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/hv/channel_mgmt.c b/driv

[PATCH 10/16] hyper-v: trace vmbus_open()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_OPENCHANNEL sender. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 27 +++ 2 files changed, 29 insertions(+) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c

[PATCH 03/16] hyper-v: trace vmbus_onoffer()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_OFFERCHANNEL handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 37 + 2 files changed, 39 insertions(+) diff --git a/drivers/hv/channel_mg

[PATCH 07/16] hyper-v: trace vmbus_ongpadl_torndown()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_GPADL_TORNDOWN handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c

[PATCH 06/16] hyper-v: trace vmbus_ongpadl_created()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_GPADL_CREATED handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 + 2 files changed, 19 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_

[PATCH 05/16] hyper-v: trace vmbus_onopen_result()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to CHANNELMSG_OPENCHANNEL_RESULT handler. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 + 2 files changed, 19 insertions(+) diff --git a/drivers/hv/channel_mgmt.c b/driv

[PATCH 02/16] hyper-v: trace vmbus_on_message()

2017-09-20 Thread Vitaly Kuznetsov
Add tracepoint to vmbus_on_message() which is called when we start processing a blocking from work context. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 2 files changed, 10 insertions(+) diff --git a/d

[PATCH 00/16] Hyper-V: add tracing to VMBus module and trace all messages

2017-09-20 Thread Vitaly Kuznetsov
.. 465.932709: vmbus_close_internal: sending child_relid 0x10, ret 0 kworker/5:4-2535 [005] 465.986417: vmbus_release_relid: sending child_relid 0x10, ret 0 CHANNELMSG_UNLOAD/CHANNELMSG_UNLOAD_RESPONSE are not traced as these are mostly used on crash. Vitaly Kuznetsov (16): hyper-v: trace v

[PATCH 01/16] hyper-v: trace vmbus_on_msg_dpc()

2017-09-20 Thread Vitaly Kuznetsov
Add tracing subsystem to Hyper-V VMBus module and add tracepoint to vmbus_on_msg_dpc() which is called when we receive a message from host. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/hv/Makefile | 4 +++- drivers/hv/hv_trace.c | 4 drivers/hv/hv_t

Re: [PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-09-18 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > > Reverting 6f3d791f300618caf82a2be0c27456edd76d5164 still helps. In addition to the above I got the following crash while playing with 4.14-rc1 (unmodified): [ 55.810080] kernel tried to execute NX-protected page - exploit attem

Re: [PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-09-18 Thread Vitaly Kuznetsov
Stephen Hemminger <step...@networkplumber.org> writes: > On Sep 15, 2017 11:01 AM, "KY Srinivasan" <k...@microsoft.com> wrote: > > > Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > > > > > > > > I'm see

Re: [PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-09-15 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Stephen Hemminger <step...@networkplumber.org> writes: > >> On Fri, 11 Aug 2017 10:03:59 -0700 >> k...@exchange.microsoft.com wrote: >> >>> From: K. Y. Srinivasan <k...@microsoft.com> >>

Re: [PATCH 1/1] Drivers: hv: vmbus: Fix rescind handling issues

2017-09-15 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > On Fri, 11 Aug 2017 10:03:59 -0700 > k...@exchange.microsoft.com wrote: > >> From: K. Y. Srinivasan >> >> This patch handles the following issues that were observed when we are >> handling racing channel offer message

[PATCH] x86/hyper-v: Remove doubled HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED definition

2017-09-11 Thread Vitaly Kuznetsov
Commit 7dcf90e9e032 ("PCI: hv: Use vPCI protocol version 1.2") and commit 628f54cc6451 ("x86/hyper-v: Support extended CPU ranges for TLB flush hypercalls") adding the same definition came through different trees. Fix the glitch. Signed-off-by: Vitaly Kuznetsov <vkuzn...@re

Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-31 Thread Vitaly Kuznetsov
Ingo Molnar <mi...@kernel.org> writes: > * Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> > Changes since v9: >> > - Rebase to 4.13-rc3. >> > - Drop PATCH1 as it was already taken by Greg to char-misc tree. There're >> > no >> &g

Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-31 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Changes since v9: > - Rebase to 4.13-rc3. > - Drop PATCH1 as it was already taken by Greg to char-misc tree. There're no > functional dependencies on this patch so the series can go through a > different tree > (and it

Re: [PATCH] tools: hv: handle EINTR in hv_fcopy_daemon

2017-08-25 Thread Vitaly Kuznetsov
Olaf Hering writes: > If strace attaches to the daemon pread returns with EINTR, and the > process exits. Catch this case and continue with the next iteration. > > Signed-off-by: Olaf Hering > --- > tools/hv/hv_fcopy_daemon.c | 2 ++ > 1 file changed, 2

Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-10 Thread Vitaly Kuznetsov
Ingo Molnar writes: > I'm getting this build failure with this series: > > arch/x86/hyperv/mmu.c: In function ‘hyperv_setup_mmu_ops’: > arch/x86/hyperv/mmu.c:256:3: error: ‘pv_mmu_ops’ undeclared (first use in > this > function) >pv_mmu_ops.flush_tlb_others =

Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-10 Thread Vitaly Kuznetsov
Ingo Molnar <mi...@kernel.org> writes: > * Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> Vitaly Kuznetsov <vkuzn...@redhat.com> writes: >> >> > Changes since v9: >> > - Rebase to 4.13-rc3. >> > - Drop PAT

Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-10 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Changes since v9: > - Rebase to 4.13-rc3. > - Drop PATCH1 as it was already taken by Greg to char-misc tree. There're no > functional dependencies on this patch so the series can go through a > different tree > (and it

Re: [PATCH net-next 0/1] netvsc: another VF datapath fix

2017-08-08 Thread Vitaly Kuznetsov
Stephen Hemminger <step...@networkplumber.org> writes: > On Tue, 08 Aug 2017 17:24:03 +0200 > Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> Stephen Hemminger <step...@networkplumber.org> writes: >> >> > On Tue, 08 Aug 2017 16:03:56 +0200 &

Re: [PATCH net-next 0/1] netvsc: another VF datapath fix

2017-08-08 Thread Vitaly Kuznetsov
Stephen Hemminger <step...@networkplumber.org> writes: > On Tue, 08 Aug 2017 16:03:56 +0200 > Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> Stephen Hemminger <step...@networkplumber.org> writes: >> >> > Previous fix was incomplete. >&

Re: [PATCH net-next 0/1] netvsc: another VF datapath fix

2017-08-08 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > Previous fix was incomplete. > Not really related to this patch series (which btw fixes my issue, thanks!), but I found one addition issue. Systemd fails to rename VF interface: kernel: mlx4_core 0002:00:02.0 eth2: joined to eth1

Re: [PATCH net-next 1/1] netvsc: fix rtnl deadlock on unregister of vf

2017-08-07 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > >> Stephen Hemminger <step...@networkplumber.org> writes: >> >>> With new transparent VF support, it is possible to get a deadlock >>> when some

Re: [PATCH net-next 1/1] netvsc: fix rtnl deadlock on unregister of vf

2017-08-07 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@redhat.com> writes: > Stephen Hemminger <step...@networkplumber.org> writes: > >> With new transparent VF support, it is possible to get a deadlock >> when some of the deferred work is running and the unregister_vf >> is trying to c

Re: [PATCH net-next 1/1] netvsc: fix rtnl deadlock on unregister of vf

2017-08-07 Thread Vitaly Kuznetsov
similar to bonding and team device). > > Reported-by: Vitaly Kuznetsov <vkuzn...@redhat.com> > Fixes: 0c195567a8f6 ("netvsc: transparent VF management") > Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> > --- > drivers/net/hyperv/netvsc_drv.

[PATCH v10 9/9] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-08-02 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemm

[PATCH v10 8/9] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-08-02 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem..

[PATCH v10 7/9] x86/hyper-v: use hypercall for remote TLB flush

2017-08-02 Thread Vitaly Kuznetsov
for optimization on the host side as both hypercall and native tlb flush will result in vmexit. The hint is also not set on modern Hyper-V versions. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemm

[PATCH v10 3/9] x86/hyper-v: fast hypercall implementation

2017-08-02 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v10 4/9] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-08-02 Thread Vitaly Kuznetsov
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 <vkuzn...@redhat.com> Reviewed-by

[PATCH v10 6/9] hyper-v: globalize vp_index

2017-08-02 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Steph

[PATCH v10 5/9] x86/hyper-v: implement rep hypercalls

2017-08-02 Thread Vitaly Kuznetsov
for HvFlushVirtualAddressList hypercall for remote TLB flushing. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem...@microsoft.com> --- arch/x86/include/asm/mshyperv.h | 39

[PATCH v10 2/9] x86/hyper-v: make hv_do_hypercall() inline

2017-08-02 Thread Vitaly Kuznetsov
hypercall and with inlining this is somewhat important, add the clobbers. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem...@microsoft.com> --- arch/x86/hyperv/hv

[PATCH v10 1/9] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-08-02 Thread Vitaly Kuznetsov
Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-08-02 Thread Vitaly Kuznetsov
hypercalls implementation, hyperv tracing subsystem (which only traces the newly added remote TLB flush for now). Vitaly Kuznetsov (9): x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set x86/hyper-v: make hv_do_hypercall() inline x86/hyper-v: fast hypercall implementation hyper-v: use fast

[PATCH v9 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-07-14 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemm

[PATCH v9 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-07-14 Thread Vitaly Kuznetsov
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 <vkuzn...@redhat.com> Reviewed-by

[PATCH v9 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-07-14 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem..

[PATCH v9 06/10] x86/hyper-v: implement rep hypercalls

2017-07-14 Thread Vitaly Kuznetsov
for HvFlushVirtualAddressList hypercall for remote TLB flushing. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem...@microsoft.com> --- arch/x86/include/asm/mshyperv.h | 39

[PATCH v9 04/10] x86/hyper-v: fast hypercall implementation

2017-07-14 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v9 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-07-14 Thread Vitaly Kuznetsov
for optimization on the host side as both hypercall and native tlb flush will result in vmexit. The hint is also not set on modern Hyper-V versions. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemm

[PATCH v9 07/10] hyper-v: globalize vp_index

2017-07-14 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Steph

[PATCH v9 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-07-14 Thread Vitaly Kuznetsov
hypercall and with inlining this is somewhat important, add the clobbers. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Stephen Hemminger <sthem...@microsoft.com> --- arch/x86/hyperv/hv

[PATCH v9 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-07-14 Thread Vitaly Kuznetsov
2m9.948s This series brings a number of small improvements along the way: fast hypercall implementation and using it for event signaling, rep hypercalls implementation, hyperv tracing subsystem (which only traces the newly added remote TLB flush for now). Vitaly Kuznetsov (10): x86/hyper-v

[PATCH v9 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-07-14 Thread Vitaly Kuznetsov
Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v9 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-07-14 Thread Vitaly Kuznetsov
Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shev

Re: [PATCH v3 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-07-13 Thread Vitaly Kuznetsov
Andy Lutomirski <l...@kernel.org> writes: > On Tue, May 23, 2017 at 5:36 AM, Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: >> Andy Lutomirski <l...@kernel.org> writes: >> >>> >>> Also, can you share the benchmark you used for these patches

Re: [PATCH 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-26 Thread Vitaly Kuznetsov
kbuild test robot writes: > Hi Vitaly, > > [auto build test ERROR on next-20170619] > [cannot apply to tip/x86/core linus/master linux/master v4.12-rc6 v4.12-rc5 > v4.12-rc4 v4.12-rc7] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve

[PATCH v2 2/2] hyper-v: read TSC frequency from a synthetic MSR

2017-06-22 Thread Vitaly Kuznetsov
a error prone calibration. Reported-by: Ladi Prosek <lpro...@redhat.com> Tested-by: Ladi Prosek <lpro...@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/kernel/cpu/mshyperv.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/a

[PATCH v2 1/2] hyper-v: check frequency MSRs presence according to the specification

2017-06-22 Thread Vitaly Kuznetsov
accordingly. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/include/uapi/asm/hyperv.h | 15 ++- arch/x86/kernel/cpu/mshyperv.c | 3 ++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/includ

[PATCH v2 0/2] hyper-v: avoid tsc calibration

2017-06-22 Thread Vitaly Kuznetsov
information we can easily avoid calibration. This is already done for other hypervisors (KVM, Vmware). Vitaly Kuznetsov (2): hyper-v: check frequency MSRs presence according to the specification hyper-v: read TSC frequency from a synthetic MSR arch/x86/include/uapi/asm/hyperv.h | 15

[PATCH 2/2] hyper-v: read TSC frequency from a synthetic MSR

2017-06-18 Thread Vitaly Kuznetsov
a error prone calibration. Reported-by: Ladi Prosek <lpro...@redhat.com> Tested-by: Ladi Prosek <lpro...@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/kernel/cpu/mshyperv.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/a

[PATCH 1/2] hyper-v: check frequency MSRs presence according to the specification

2017-06-18 Thread Vitaly Kuznetsov
accordingly. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/include/uapi/asm/hyperv.h | 15 ++- arch/x86/kernel/cpu/mshyperv.c | 3 ++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/includ

[PATCH 0/2] hyper-v: avoid tsc calibration

2017-06-18 Thread Vitaly Kuznetsov
TSC calibration on virtual machines is always error prone. It was found that in nested environments Gen2 instances may get stuck on boot. As Hyper-V hosts provide us with all the required information we can easily avoid calibration. This is already done for other hypervisors (KVM, Vmware). Vitaly

Re: [PATCH v8 07/10] hyper-v: globalize vp_index

2017-06-14 Thread Vitaly Kuznetsov
Stephen Hemminger <step...@networkplumber.org> writes: > On Wed, 14 Jun 2017 04:31:32 + > Jork Loeser <jork.loe...@microsoft.com> wrote: > >> > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> > Sent: Tuesday, June 13, 2017 19:29 >> > &g

Re: [PATCH v8 07/10] hyper-v: globalize vp_index

2017-06-13 Thread Vitaly Kuznetsov
Stephen Hemminger <step...@networkplumber.org> writes: > On Fri, 9 Jun 2017 15:27:33 +0200 > Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> To support implementing remote TLB flushing on Hyper-V with a hypercall >> we need to make vp_index availabl

Re: [PATCH v8 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-11 Thread Vitaly Kuznetsov
Steven Rostedt writes: > On Fri, 09 Jun 2017 20:53:53 +0200 > Paul Bolle wrote: > >> On Fri, 2017-06-09 at 14:32 -0400, Steven Rostedt wrote: >> > I'm sure it works, but it just adds one more way of doing the same >> > thing. I thought that was what perl

[PATCH v8 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-09 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- MAINTAINERS | 1 + arch/x86/hyperv/mmu.c | 7 +++ ar

[PATCH v8 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-09 Thread Vitaly Kuznetsov
for optimization on the host side as both hypercall and native tlb flush will result in vmexit. The hint is also not set on modern Hyper-V versions. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/hyperv/Makefile | 2 +- arch/x86/hyperv/hv_init.c | 2 + arch/x86/

[PATCH v8 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-06-09 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v7: - Drop explicit casting from virt_to_phys() [Andy Shevchenko] - Re-format ma

[PATCH v8 07/10] hyper-v: globalize vp_index

2017-06-09 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- arch/x86/hype

[PATCH v8 06/10] x86/hyper-v: implement rep hypercalls

2017-06-09 Thread Vitaly Kuznetsov
for HvFlushVirtualAddressList hypercall for remote TLB flushing. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- arch/x86/include/asm/mshyperv.h | 39 +++ 1 file changed, 39 insertions(+) diff --gi

[PATCH v8 04/10] x86/hyper-v: fast hypercall implementation

2017-06-09 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v8 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-06-09 Thread Vitaly Kuznetsov
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 <vkuzn...@redhat.com> Reviewed-by

[PATCH v8 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-06-09 Thread Vitaly Kuznetsov
hypercall and with inlining this is somewhat important, add the clobbers. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- Changes since v7: - Use U64_MAX instead of (u64)ULLONG_MAX [Andy Shevchenko] --- arch/x86/hype

[PATCH v8 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-06-09 Thread Vitaly Kuznetsov
along the way: fast hypercall implementation and using it for event signaling, rep hypercalls implementation, hyperv tracing subsystem (which only traces the newly added remote TLB flush for now). Vitaly Kuznetsov (10): x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set x86/hyper-v

[PATCH v8 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-06-09 Thread Vitaly Kuznetsov
Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v8 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-06-09 Thread Vitaly Kuznetsov
Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shev

Re: [PATCH v4 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-07 Thread Vitaly Kuznetsov
Steven Rostedt writes: >> >> I'm pretty sure I tested tracing this even before sending v2 of this >> series, I'll retest before sending v7. > > Even if it does work, it's still fragile as it uses an > no-longer-supported framework. > I hope I fixed it in v7 of my patchset,

[PATCH v7 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-07 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v6: - Drop DEFINE_TRACE() from mmu.c, change tracing magic a bit to keep things com

[PATCH v7 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-07 Thread Vitaly Kuznetsov
for optimization on the host side as both hypercall and native tlb flush will result in vmexit. The hint is also not set on modern Hyper-V versions. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- arch/x86/hyperv/Makefile | 2 +- arch/x86/hyperv/hv_init.c | 2 + arch/x86/

[PATCH v7 06/10] x86/hyper-v: implement rep hypercalls

2017-06-07 Thread Vitaly Kuznetsov
for HvFlushVirtualAddressList hypercall for remote TLB flushing. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- arch/x86/include/asm/mshyperv.h | 39 +++ 1 file changed, 39 insertions(+) diff --gi

[PATCH v7 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-06-07 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v6: - Fix a bug in cpumask_to_vp_set() by setting valid_bank_mask right, add a

[PATCH v7 07/10] hyper-v: globalize vp_index

2017-06-07 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- arch/x86/hype

[PATCH v7 02/10] x86/hyper-v: stash the max number of virtual/logical processor

2017-06-07 Thread Vitaly Kuznetsov
Max virtual processor will be needed for 'extended' hypercalls supporting more than 64 vCPUs. While on it, unify on 'Hyper-V' in mshyperv.c as we currently have a mix, report acquired misc features as well. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shev

[PATCH v7 03/10] x86/hyper-v: make hv_do_hypercall() inline

2017-06-07 Thread Vitaly Kuznetsov
hypercall and with inlining this is somewhat important, add the clobbers. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- arch/x86/hyperv/hv_init.c | 54 - arch/x86/include/as

[PATCH v7 05/10] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-06-07 Thread Vitaly Kuznetsov
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 <vkuzn...@redhat.com> Reviewed-by

[PATCH v7 01/10] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set

2017-06-07 Thread Vitaly Kuznetsov
Code is arch/x86/hyperv/ is only needed when CONFIG_HYPERV is set, the 'basic' support and detection lives in arch/x86/kernel/cpu/mshyperv.c which is included when CONFIG_HYPERVISOR_GUEST is set. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

[PATCH v7 00/10] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements

2017-06-07 Thread Vitaly Kuznetsov
lls implementation, hyperv tracing subsystem (which only traces the newly added remote TLB flush for now). Vitaly Kuznetsov (10): x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set x86/hyper-v: stash the max number of virtual/logical processor x86/hyper-v: make hv_do_hypercall() inline

Re: [PATCH v4 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-05 Thread Vitaly Kuznetsov
Steven Rostedt <rost...@goodmis.org> writes: > On Wed, 24 May 2017 14:04:05 +0200 > Vitaly Kuznetsov <vkuzn...@redhat.com> wrote: > >> Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). >> Tracing is done the same way we do xen_mmu_flus

[PATCH v6 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-06-01 Thread Vitaly Kuznetsov
Hyper-V hosts may support more than 64 vCPUs, we need to use HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX/LIST_EX hypercalls in this case. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v5: - Do single pass in cpumask_to_vp_set() as it turns our that empty banks are

[PATCH v6 07/10] hyper-v: globalize vp_index

2017-06-01 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- Changes sinc

[PATCH v6 10/10] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-06-01 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> --- MAINTAINERS

[PATCH v6 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-06-01 Thread Vitaly Kuznetsov
for optimization on the host side as both hypercall and native tlb flush will result in vmexit. The hint is also not set on modern Hyper-V versions. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v5: - Use BIT() in asm/hyperv.h [Andy Shevchenko] - Split off fill_gva_list()

[PATCH v6 04/10] x86/hyper-v: fast hypercall implementation

2017-06-01 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: Andy Shevchenko <and

<    1   2   3   4   5   6   7   8   9   10   >