[PATCH AUTOSEL 5.4 107/134] Drivers: hv: vmbus: Fix crash handler reset of Hyper-V synic

2019-12-11 Thread Sasha Levin
(), which ensures that the synic is always shutdown. Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Reviewed-by: Dexuan Cui Signed-off-by: Sasha Levin --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv

[PATCH v5 8/8] Drivers: hv: Enable Hyper-V code to be built on ARM64

2019-10-03 Thread Michael Kelley
Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 79e5356

[PATCH v5 7/8] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2019-10-03 Thread Michael Kelley
-by: Michael Kelley --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index f4138ae..583e1ce 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86

[PATCH v4 7/8] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2019-08-06 Thread Michael Kelley
-by: Michael Kelley --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index f4138ae..583e1ce 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86

[PATCH v4 8/8] Drivers: hv: Enable Hyper-V code to be built on ARM64

2019-08-06 Thread Michael Kelley
Update drivers/hv/Kconfig so CONFIG_HYPERV and CONFIG_HYPERV_TSCPAGE can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley --- drivers/hv/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/hv/Kconfig b

Re: [PATCH] Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE

2019-05-08 Thread Sasha Levin
the VM can panic due to memory corruption (the hypervisor writes data to the wrong location). Fixes: 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()") Cc: sta...@vger.kernel.org Cc: Michael Kelley Reported-and-tested-by: Juliana Rodrigueiro Signed-off-by: Dexuan Cui

RE: [PATCH] Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE

2019-05-07 Thread Michael Kelley
> hypervisor writes data to the wrong location). > > Fixes: 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()") > Cc: sta...@vger.kernel.org > Cc: Michael Kelley > Reported-and-tested-by: Juliana Rodrigueiro > > Signed-off

[PATCH] Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE

2019-05-07 Thread Dexuan Cui
ivers: hv: vmbus: Remove use of slow_virt_to_phys()") Cc: sta...@vger.kernel.org Cc: Michael Kelley Reported-and-tested-by: Juliana Rodrigueiro Signed-off-by: Dexuan Cui --- drivers/hv/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/channel.c b/

RE: [PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set

2019-02-20 Thread Michael Kelley
From: Kimberly Brown Sent: Monday, February 18, 2019 9:38 PM > > There are two methods for signaling the host: the monitor page mechanism > and hypercalls. The monitor page mechanism is used by performance > critical channels (storage, networking, etc.) because it provides > improved

RE: [PATCH v2 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-20 Thread Michael Kelley
on indicates > that the 1st page is for parent->child notifications. In addition, the > server_monitor_latency_show() and server_monitor_conn_id_show() > functions use monitor_pages index '0'. > > Signed-off-by: Kimberly Brown > Acked-by: Stephen Hemminger > --- > drivers/hv/

[PATCH v2 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-18 Thread Kimberly Brown
ion, the server_monitor_latency_show() and server_monitor_conn_id_show() functions use monitor_pages index '0'. Signed-off-by: Kimberly Brown Acked-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_dr

[PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set

2019-02-18 Thread Kimberly Brown
onitor_allocated" is set before accessing the monitor id or the monitor page data. If "channel->offermsg.monitor_allocated" is not set, return -EINVAL. Signed-off-by: Kimberly Brown --- Documentation/ABI/stable/sysfs-bus-vmbus | 15 -- drivers/hv/vmbus_drv.c

[PATCH v2 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data

2019-02-18 Thread Kimberly Brown
nger. - Updated the sysfs documentation to describe the new return value. Kimberly Brown (2): Drivers: hv: vmbus: Change server monitor_pages index to 0 Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set Documentation/ABI/stable/sysfs-bus-vmbus | 15 +++-- drive

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-14 Thread Kimberly Brown
On Thu, Feb 14, 2019 at 08:54:31PM -0500, Sasha Levin wrote: > On Sat, Feb 02, 2019 at 03:07:35PM -0500, Kimberly Brown wrote: > > On Fri, Feb 01, 2019 at 06:24:24PM +, Dexuan Cui wrote: > > > > From: Kimberly Brown > > > > Sent: Thursday, January 31, 2019 9:47 AM > > > > ... > > > > 2)

Re: [PATCH v4] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-02-14 Thread Sasha Levin
On Mon, Feb 04, 2019 at 04:25:34PM +, Michael Kelley wrote: From: Kimberly Brown Sent: Sunday, February 3, 2019 11:13 PM Counter values for per-channel interrupts and ring buffer full conditions are useful for investigating performance. Expose counters in sysfs for 2 types of guest to

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-14 Thread Sasha Levin
On Sat, Feb 02, 2019 at 03:07:35PM -0500, Kimberly Brown wrote: On Fri, Feb 01, 2019 at 06:24:24PM +, Dexuan Cui wrote: > From: Kimberly Brown > Sent: Thursday, January 31, 2019 9:47 AM > ... > 2) Prevent a deadlock that can occur between the proposed mutex_lock() > call in the

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-14 Thread Stephen Hemminger
On Thu, 14 Feb 2019 01:11:03 -0500 Kimberly Brown wrote: > On Mon, Feb 11, 2019 at 10:02:47AM -0800, Stephen Hemminger wrote: > > On Mon, 11 Feb 2019 02:01:18 -0500 > > Kimberly Brown wrote: > > > > > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > > > On Fri, 8 Feb

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-13 Thread Kimberly Brown
On Mon, Feb 11, 2019 at 10:02:47AM -0800, Stephen Hemminger wrote: > On Mon, 11 Feb 2019 02:01:18 -0500 > Kimberly Brown wrote: > > > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > > On Fri, 8 Feb 2019 05:01:12 -0500 > > > Kimberly Brown wrote: > > > > > > You are

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Stephen Hemminger
On Mon, 11 Feb 2019 02:01:18 -0500 Kimberly Brown wrote: > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > On Fri, 8 Feb 2019 05:01:12 -0500 > > Kimberly Brown wrote: > > > > You are right, the current behavior is broken. > > It would be good to add a description of

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Kimberly Brown
On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > On Fri, 8 Feb 2019 05:01:12 -0500 > Kimberly Brown wrote: > > You are right, the current behavior is broken. > It would be good to add a description of under what conditions > monitor is not used. Is this some part of a project

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Stephen Hemminger
On Fri, 8 Feb 2019 05:01:12 -0500 Kimberly Brown wrote: You are right, the current behavior is broken. It would be good to add a description of under what conditions monitor is not used. Is this some part of a project emulating Hyper-V? > + > + if

Re: [PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Stephen Hemminger
that the 1st page is for parent->child notifications. In addition, the > server_monitor_latency_show() and server_monitor_conn_id_show() > functions use monitor_pages index '0'. > > Signed-off-by: Kimberly Brown > --- > drivers/hv/vmbus_drv.c | 2 +- > 1 file changed, 1 i

[PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Kimberly Brown
ocated to a channel. In the affected "_show" functions, verify that "channel->offermsg.monitor_allocated" is set before accessing the monitor id or the monitor_page data. If "channel->offermsg.monitor_allocated" is not set, display nothing. Signed-off-by: Kimber

[PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Kimberly Brown
ion, the server_monitor_latency_show() and server_monitor_conn_id_show() functions use monitor_pages index '0'. Signed-off-by: Kimberly Brown --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 403fee015

[PATCH 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data

2019-02-08 Thread Kimberly Brown
, display nothing in the channel's monitor id and monitor page data sysfs files. The data that is currently shown in sysfs is incorrect. Kimberly Brown (2): Drivers: hv: vmbus: Change server monitor_pages index to 0 Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

RE: [PATCH v4] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-02-04 Thread Michael Kelley
From: Kimberly Brown Sent: Sunday, February 3, 2019 11:13 PM > > Counter values for per-channel interrupts and ring buffer full > conditions are useful for investigating performance. > > Expose counters in sysfs for 2 types of guest to host interrupts: > 1) Interrupts caused by the channel's

[PATCH v4] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-02-03 Thread Kimberly Brown
ring buffer Documentation/ABI/stable/sysfs-bus-vmbus | 33 +++++ drivers/hv/ring_buffer.c | 14 +++- drivers/hv/vmbus_drv.c | 36 +++ include/linux/hyperv.h | 46 4 files changed, 128

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-02 Thread Kimberly Brown
On Fri, Feb 01, 2019 at 06:24:24PM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Thursday, January 31, 2019 9:47 AM > > ... > > 2) Prevent a deadlock that can occur between the proposed mutex_lock() > > call in the vmbus_chan_attr_show() function and the sysfs/kernfs functions. > Hi

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-01 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Thursday, January 31, 2019 9:47 AM > ... > 2) Prevent a deadlock that can occur between the proposed mutex_lock() > call in the vmbus_chan_attr_show() function and the sysfs/kernfs functions. Hi Kim, Can you please share more details about the deadlock? It's

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-01 Thread Sasha Levin
On Thu, Jan 31, 2019 at 12:47:07PM -0500, Kimberly Brown wrote: On Thu, Jan 31, 2019 at 04:45:35PM +, Michael Kelley wrote: From: Sasha Levin Sent: Thursday, January 31, 2019 7:20 AM > > I've queued this one for hyper-fixes, thanks all! > Actually, please hold off on queuing this one. In

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-31 Thread Kimberly Brown
On Thu, Jan 31, 2019 at 04:45:35PM +, Michael Kelley wrote: > From: Sasha Levin Sent: Thursday, January 31, 2019 7:20 AM > > > > I've queued this one for hyper-fixes, thanks all! > > > > Actually, please hold off on queuing this one. In a conversation I had > yesterday with Kim, they had

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-31 Thread Michael Kelley
From: Sasha Levin Sent: Thursday, January 31, 2019 7:20 AM > > I've queued this one for hyper-fixes, thanks all! > Actually, please hold off on queuing this one. In a conversation I had yesterday with Kim, they had identified a deadlock. Kim was going to be looking at some revisions to

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-31 Thread Sasha Levin
On Tue, Jan 29, 2019 at 07:20:28PM +, Dexuan Cui wrote: From: Kimberly Brown > ... > But as you pointed, at least for sub-channels, channel->ringbuffer_page > can indeed disappear in vmbus_close() -> ... -> vmbus_free_ring(), and > the "attribute->show()" could crash when the race happens.

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-29 Thread Dexuan Cui
> From: Kimberly Brown > > ... > > But as you pointed, at least for sub-channels, channel->ringbuffer_page > > can indeed disappear in vmbus_close() -> ... -> vmbus_free_ring(), and > > the "attribute->show()" could crash when the race happens. > > Adding channel_mutex here seems to be able to

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-28 Thread Kimberly Brown
On Tue, Jan 22, 2019 at 06:40:30PM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Monday, January 21, 2019 10:43 PM > > > > @@ -1421,7 +1422,10 @@ static ssize_t vmbus_chan_attr_show(struct > > > > kobject *kobj, > > > > if (chan->state != CHANNEL_OPENED_STATE) > > > >

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-22 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Monday, January 21, 2019 10:43 PM > > > @@ -1421,7 +1422,10 @@ static ssize_t vmbus_chan_attr_show(struct > > > kobject *kobj, > > > if (chan->state != CHANNEL_OPENED_STATE) > > > return -EINVAL; > > > > > > - return attribute->show(chan, buf); > > > +

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Kimberly Brown
On Tue, Jan 22, 2019 at 03:46:48AM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Monday, January 21, 2019 6:08 PM > > Subject: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show > > functions > > > > The channel level "_show&quo

RE: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Monday, January 21, 2019 6:08 PM > Subject: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions > > The channel level "_show" functions are vulnerable to race conditions. > Add a mutex lock and unlock around the call

[PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Kimberly Brown
Brown --- drivers/hv/vmbus_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 403fee01572c..e8189bc168da 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1414,6 +1414,7 @@ static ssize_t vmbus_c

Re: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-21 Thread Kimberly Brown
On Thu, Jan 17, 2019 at 09:11:03AM -0800, Stephen Hemminger wrote: > > > > +static ssize_t channel_intr_in_full_show(const struct vmbus_channel > > *channel, > > +char *buf) > > +{ > > + return sprintf(buf, "%llu\n", channel->intr_in_full); > > +} > > >

Re: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-17 Thread Stephen Hemminger
> +static ssize_t channel_intr_in_full_show(const struct vmbus_channel > *channel, > + char *buf) > +{ > + return sprintf(buf, "%llu\n", channel->intr_in_full); > +} intr_in_full is u64, which is not the same as unsigned long long. to be correct you

RE: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-17 Thread Michael Kelley
host to guest interrupt counters proposed in v1 because >they were not accurate > - Added full condition counters for the channel's outbound ring buffer > > Documentation/ABI/stable/sysfs-bus-vmbus | 33 > drivers/hv/ring_buffer.c

RE: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-16 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Wednesday, January 16, 2019 8:38 PM > To: Michael Kelley ; Long Li > ; Sasha Levin ; > Dexuan Cui > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; > linux-ker...@vger.kernel.org > Subject:

[PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-16 Thread Kimberly Brown
/hv/ring_buffer.c | 14 - drivers/hv/vmbus_drv.c | 32 include/linux/hyperv.h | 38 4 files changed, 116 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/stable/sysfs-bus-vmbus b

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-09 Thread Dexuan Cui
> From: Michael Kelley > Sent: Saturday, January 5, 2019 1:01 PM > > From: Kimberly Brown Sent: Friday, January 4, > > 2019 8:35 PM > > > > static inline void set_channel_pending_send_size(struct vmbus_channel *c, > > u32 size) > > { > > + if

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-09 Thread Dexuan Cui
> From: Kimberly Brown > Sent: Friday, January 4, 2019 8:35 PM ... > +What: > /sys/bus/vmbus/devices//channels//intr_in_full > +Date: January 2019 > +KernelVersion: 4.21 There is no 4.21 version: see https://lkml.org/lkml/2019/1/6/178 :-) Thanks! -- Dexuan

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-05 Thread Michael Kelley
From: Kimberly Brown Sent: Friday, January 4, 2019 8:35 PM > static inline void set_channel_pending_send_size(struct vmbus_channel *c, >u32 size) > { > + if (size) { > + ++c->out_full_total; > + > + if

[PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-04 Thread Kimberly Brown
/ABI/stable/sysfs-bus-vmbus | 33 drivers/hv/ring_buffer.c | 14 +- drivers/hv/vmbus_drv.c | 32 +++ include/linux/hyperv.h | 32 +++ 4 files changed, 110 insertions(+), 1

Re: [PATCH] Drivers: hv: vmbus: Check for ring when getting debug info

2018-12-18 Thread Sasha Levin
or ring_info->ring_buffer, when using the function in the future. Having an error check in the function would eliminate the potential risk. Add a Fixes tag to indicate the patch depdendency. Fixes: fc96df16a1ce ("Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels")

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
On Mon, 17 Dec 2018 18:44:12 + Dexuan Cui wrote: > > From: devel On Behalf Of > > Dexuan Cui > > Sent: Monday, December 17, 2018 10:31 AM > > > From: Stephen Hemminger > > > > > > The old code was risky because it would silently return stack garbage. > > > Having an error check in

[PATCH] Drivers: hv: vmbus: Check for ring when getting debug info

2018-12-17 Thread Dexuan Cui
Having an error check in the function would eliminate the potential risk. Add a Fixes tag to indicate the patch depdendency. Fixes: fc96df16a1ce ("Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels") Cc: sta...@vger.kernel.org Cc: K. Y. Srinivasan Cc:

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: devel On Behalf Of > Dexuan Cui > Sent: Monday, December 17, 2018 10:31 AM > > From: Stephen Hemminger > > > > The old code was risky because it would silently return stack garbage. > > Having an error check in get_debuginfo would eliminate that. > > OK, then let me make another patch

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: Stephen Hemminger > Sent: Monday, December 17, 2018 10:17 AM > To: Dexuan Cui > > On Mon, 17 Dec 2018 18:00:29 + > Dexuan Cui wrote: > > > > From: Stephen Hemminger > > > On Thu, 13 Dec 2018 16:35:43 + > > > Dexuan Cui wrote: > > > > > > > Before 98f4c651762c, we returned

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
On Mon, 17 Dec 2018 18:00:29 + Dexuan Cui wrote: > > From: Stephen Hemminger > > On Thu, 13 Dec 2018 16:35:43 + > > Dexuan Cui wrote: > > > > > Before 98f4c651762c, we returned zeros for unopened channels. > > > With 98f4c651762c, we started to return random on-stack values. > > > >

RE: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Dexuan Cui
> From: Stephen Hemminger > On Thu, 13 Dec 2018 16:35:43 + > Dexuan Cui wrote: > > > Before 98f4c651762c, we returned zeros for unopened channels. > > With 98f4c651762c, we started to return random on-stack values. > > > > We'd better return -EINVAL instead. > > The concept looks fine, but

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-17 Thread Stephen Hemminger
us: check for ring in debug info --- drivers/hv/ring_buffer.c | 31 +- drivers/hv/vmbus_drv.c | 71 ++-- include/linux/hyperv.h | 5 +-- 3 files changed, 79 insertions(+), 28 deletions(-) diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/

Re: [PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-13 Thread Sasha Levin
On Thu, Dec 13, 2018 at 04:35:43PM +, Dexuan Cui wrote: Before 98f4c651762c, we returned zeros for unopened channels. With 98f4c651762c, we started to return random on-stack values. We'd better return -EINVAL instead. Fixes: 98f4c651762c ("hv: move ringbuffer bus attributes to

[PATCH] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

2018-12-13 Thread Dexuan Cui
ivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: Dexuan Cui --- drivers/hv/vmbus_drv.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 283d184..d0ff656 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/v

Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-03 Thread Dan Carpenter
On Mon, Dec 03, 2018 at 02:50:19PM +0300, Dan Carpenter wrote: > The list is still rejecting @microsoft.com patches... :( > > I mentioned this last time when you guys were complaining that no one > reads your patches and someone sent me a link to marc.info. I want to > help but obviously no one

Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-03 Thread Dan Carpenter
The list is still rejecting @microsoft.com patches... :( I mentioned this last time when you guys were complaining that no one reads your patches and someone sent me a link to marc.info. I want to help but obviously no one has time to look at patches on marc.info... regards, dan carpenter

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-12-02 Thread Michael Kelley
From: Will Deacon Sent: Tuesday, November 27, 2018 2:19 AM > > > The general approach is for patches 1 and 2 of the series to provide > > > all the new code under arch/arm64 to enable Hyper-V. But the code > > > won't get called (or even built) with just these two patches because > > >

[PATCH] [REPOST for the char-misc-linus branch] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
sting with the patch. We hope the important patch can be in the final v4.20. Thanks! drivers/hv/channel_mgmt.c | 189 ++++++++++ drivers/hv/connection.c | 24 +- drivers/hv/hyperv_vmbus.h | 7 ++ include/linux/hyperv.h| 7 ++ 4 files changed, 16

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
w...@redhat.com; Michael > Kelley > Subject: Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of > channels to two workqueues > > On Sun, Dec 02, 2018 at 08:47:03AM +, Dexuan Cui wrote: > > Hi Greg, > > Please use the attached patch: I rebased the patc

Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread gre...@linuxfoundation.org
On Sun, Dec 02, 2018 at 08:47:03AM +, Dexuan Cui wrote: > Hi Greg, > Please use the attached patch: I rebased the patch to today's char-misc's > char-misc-linus branch. It can also cleanly apply to Linus's master branch > today. I can't use an attached patch, you know better. Please fix up

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-02 Thread Dexuan Cui
.de; jasow...@redhat.com; Michael > Kelley > Subject: Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of > channels to two workqueues > > On Fri, Nov 30, 2018 at 06:09:54PM +, Dexuan Cui wrote: > > > From: KY Srinivasan > > > Sent: Friday, Novembe

Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-12-01 Thread gre...@linuxfoundation.org
c: KY Srinivasan ; Haiyang Zhang > > > ; Stephen Hemminger > > > ; linux-ker...@vger.kernel.org; > > > de...@linuxdriverproject.org; a...@canonical.com; vkuznets > > > ; o...@aepfle.de; jasow...@redhat.com; Michael > > > Kelley > > > Subj

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-30 Thread Dexuan Cui
gt; ; linux-ker...@vger.kernel.org; > > de...@linuxdriverproject.org; a...@canonical.com; vkuznets > > ; o...@aepfle.de; jasow...@redhat.com; Michael > > Kelley > > Subject: RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of > > channels to two workqueues > > > > &

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-30 Thread KY Srinivasan
ical.com; vkuznets > ; o...@aepfle.de; jasow...@redhat.com; Michael > Kelley > Subject: RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of > channels to two workqueues > > > From: gre...@linuxfoundation.org > > Sent: Wednesday, November 28, 2018 11:45 PM > >

RE: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-29 Thread Dexuan Cui
(which is kept in this repost), but there was a conflict > > issue. > > > > Note: the patch can't be cleanly applied to char-misc's char-misc-linus > > branch > -- > > to do that, we need to cherry-pick the supporting patch first: > > 4d3c5c69191f (&qu

Re: [PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-28 Thread gre...@linuxfoundation.org
is patch to today's > char-misc's char-misc-next branch. Previously KY posted the patch with his > Signed-off-by (which is kept in this repost), but there was a conflict issue. > > Note: the patch can't be cleanly applied to char-misc's char-misc-linus > branch -- > to do that, we need to

[PATCH] [repost] Drivers: hv: vmbus: Offload the handling of channels to two workqueues

2018-11-28 Thread Dexuan Cui
need to cherry-pick the supporting patch first: 4d3c5c69191f ("Drivers: hv: vmbus: Remove the useless API vmbus_get_outgoing_channel()") drivers/hv/channel_mgmt.c | 188 +++++++++++--- drivers/hv/connection.c | 24 +- drivers/hv/hyperv_vmbus.h |

Re: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-27 Thread Will Deacon
On Tue, Nov 27, 2018 at 07:20:56AM +0100, Greg KH wrote: > On Mon, Nov 26, 2018 at 08:56:50PM +, Michael Kelley wrote: > > From: Greg KH Monday, November 26, 2018 11:57 > > AM > > > > > > > You created "null" hooks that do nothing, for no one in this patch > > > > > series, why? > > > > >

Re: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Greg KH
On Mon, Nov 26, 2018 at 08:56:50PM +, Michael Kelley wrote: > From: Greg KH Monday, November 26, 2018 11:57 AM > > > > > You created "null" hooks that do nothing, for no one in this patch > > > > series, why? > > > > > > > > > > hv_enable_vmbus_irq() and hv_disable_vmbus_irq() have non-null

RE: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-26 Thread KY Srinivasan
gt; ; vkuznets ; Haiyang > Zhang ; sta...@vger.kernel.org > Subject: Re: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels > to two workqueues > > On Mon, Nov 26, 2018 at 02:29:57AM +, k...@linuxonhyperv.com wrote: > > From: Dexuan Cui >

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Michael Kelley
From: Greg KH Monday, November 26, 2018 11:57 AM > > > You created "null" hooks that do nothing, for no one in this patch > > > series, why? > > > > > > > hv_enable_vmbus_irq() and hv_disable_vmbus_irq() have non-null > > implementations in the ARM64 code in patch 2 of this series. The > >

RE: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-26 Thread Dexuan Cui
> From: devel On Behalf Of > Greg KH > Sent: Monday, November 26, 2018 11:35 AM > As Sasha pointed out, this patch does not even apply :( Sorry, I'll rebase to char-misc's char-misc-testing branch, which has had one of the patches, i.e. 4d3c5c69191f ("Drivers: hv: vmbus: Remov

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Michael Kelley
c inline void hv_enable_vmbus_irq(void) {} > > +static inline void hv_disable_vmbus_irq(void) {} > > + > > void hv_setup_kexec_handler(void (*handler)(void)); > > void hv_remove_kexec_handler(void); > > void hv_setup_crash_handler(void (*handler)(struct pt_regs *regs))

Re: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Greg KH
*handler)(void)); > > > void hv_remove_kexec_handler(void); > > > void hv_setup_crash_handler(void (*handler)(struct pt_regs *regs)); > > > diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c > > > index 166c2501de17..d0bb09a4bd73 100644 > > > --- a/driver

Re: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-26 Thread Greg KH
on hotplug") > Cc: sta...@vger.kernel.org > Cc: Stephen Hemminger > Cc: K. Y. Srinivasan > Cc: Haiyang Zhang > Signed-off-by: Dexuan Cui > Signed-off-by: K. Y. Srinivasan > --- > drivers/hv/channel_mgmt.c | 188 +- > drivers/hv/co

Re: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Greg KH
yper-V on ARM64. The > x86/x64 implementation is null because VMbus interrupts on x86/x64 > don't use an IRQ. > > Signed-off-by: Michael Kelley > Signed-off-by: K. Y. Srinivasan > --- > arch/x86/include/asm/mshyperv.h | 4 > drivers/hv/hv.c | 2 ++ >

Re: [PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-25 Thread Sasha Levin
On Mon, Nov 26, 2018 at 02:29:57AM +, k...@linuxonhyperv.com wrote: From: Dexuan Cui vmbus_process_offer() mustn't call channel->sc_creation_callback() directly for sub-channels, because sc_creation_callback() -> vmbus_open() may never get the host's response to the OPEN_CHANNEL message

[PATCH 1/2] Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl()

2018-11-25 Thread kys
. Y. Srinivasan Cc: Haiyang Zhang Cc: sta...@vger.kernel.org Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index f96a77b18bb9..ce0ba2062723 100644 --- a/d

[PATCH 2/2] Drivers: hv: vmbus: offload the handling of channels to two workqueues

2018-11-25 Thread kys
g kernels. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Cc: sta...@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 188 +------

[PATCH 0/2] Drivers: hv: vmbus: Miscellaneous fixes

2018-11-25 Thread kys
From: "K. Y. Srinivasan" Miscellaneous fixes. Dexuan Cui (2): Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl() Drivers: hv: vmbus: offload the handling of channels to two workqueues drivers/hv/channel.c | 8 ++ drivers/hv/channel_mg

[PATCH] Drivers: hv: vmbus: Remove the useless API vmbus_get_outgoing_channel()

2018-11-25 Thread kys
otentially unsafe, because it reads primary->num_sc without any lock held. This can be risky considering the RESCIND-OFFER message. Let's remove the API. Cc: Long Li Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan --

[PATCH 4/4] Drivers: hv: Enable CONFIG_HYPERV on ARM64

2018-11-21 Thread kys
From: Michael Kelley Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-21 Thread kys
an IRQ. Signed-off-by: Michael Kelley Signed-off-by: K. Y. Srinivasan --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 0d6271cce198

Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-11 Thread gre...@linuxfoundation.org
nuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > > jasow...@redhat.com; Stephen Hemminger ; > > vkuznets ; Sasha Levin > > ; Haiyang Zhang ; > > sta...@vger.kernel.org > > Subject: Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression > > caused > > b

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-10 Thread Dexuan Cui
; > vkuznets ; Sasha Levin > ; Haiyang Zhang ; > sta...@vger.kernel.org > Subject: Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused > by incorrect clean-up > > On Thu, Nov 01, 2018 at 07:22:28PM +, Dexuan Cui wrote: > > > From: gre...@linuxfounda

[PATCH v3 4/4] Drivers: hv: Enable CONFIG_HYPERV on ARM64

2018-11-02 Thread Michael Kelley
Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 97954f5

[PATCH v3 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-02 Thread Michael Kelley
-by: Michael Kelley --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 0d6271c..8d97bd3 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-02 Thread KY Srinivasan
> jasow...@redhat.com; Stephen Hemminger ; > vkuznets ; Sasha Levin > ; Haiyang Zhang > ; sta...@vger.kernel.org > Subject: Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused > by incorrect clean-up > > On Wed, Oct 31, 2018 at 11:23:54PM +, Dexuan Cui

Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-01 Thread gre...@linuxfoundation.org
e default key_size > > > > > of > > > > > 0 is passed to the kvp daemon, and the pool files > > > > > /var/lib/hyperv/.kvp_pool_* can't be updated. > > > > > > > > > > This patch effectively rolls back the previous fc62c3b197

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-01 Thread Haiyang Zhang
; > Michael Kelley ; vkuznets > Cc: Dexuan Cui ; KY Srinivasan ; > Haiyang Zhang ; sta...@vger.kernel.org > Subject: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by > incorrect clean-up > > From: Dexuan Cui > > In kvp_send_key(), we

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-01 Thread Dexuan Cui
ted. > > > > > > > > This patch effectively rolls back the previous fc62c3b1977d, and > > > > correctly fixes the "this statement may fall through" warnings. > > > > > > > > This patch is tested on WS 2012 R2 and 2016. >

Re: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-11-01 Thread gre...@linuxfoundation.org
e pool files > > > /var/lib/hyperv/.kvp_pool_* can't be updated. > > > > > > This patch effectively rolls back the previous fc62c3b1977d, and > > > correctly fixes the "this statement may fall through" warnings. > > > > > > T

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-31 Thread Dexuan Cui
ious fc62c3b1977d, and > > correctly fixes the "this statement may fall through" warnings. > > > > This patch is tested on WS 2012 R2 and 2016. > > > > Fixes: fc62c3b1977d ("Drivers: hv: kvp: Fix two "this statement may fall > through&q

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-24 Thread Michael Kelley
s passed to the kvp daemon, and the pool files > /var/lib/hyperv/.kvp_pool_* can't be updated. > > This patch effectively rolls back the previous fc62c3b1977d, and > correctly fixes the "this statement may fall through" warnings. > > This patch is tested on WS 2012 R2 and

RE: [PATCH V2 1/5] Drivers: hv: vmbus: Get rid of unnecessary state in hv_context

2018-10-24 Thread Michael Kelley
a global state in struct hv_context. > Get rid of this state in struct hv_context. > > Signed-off-by: K. Y. Srinivasan > --- > drivers/hv/hv.c | 10 +++--- > drivers/hv/hyperv_vmbus.h | 2 -- > 2 files changed, 3 insertions(+), 9 deletio

Re: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-20 Thread Miguel Ojeda
Hi Dan, On Sat, Oct 20, 2018 at 9:22 PM Dan Carpenter wrote: > > On Sat, Oct 20, 2018 at 04:42:07PM +0200, Miguel Ojeda wrote: > > Using an attribute is indeed better whenever possible. In C++17 it is > > an standard attribute and there have been proposals to include some of > > them for C as

  1   2   3   4   5   6   7   8   9   10   >