"Alex Ng (LIS)" writes:
>> @@ -676,35 +686,63 @@ static void hv_mem_hot_add(unsigned long start,
>> unsigned long size,
>>
>> static void hv_online_page(struct page *pg) {
>> -struct list_head *cur;
>> struct hv_hotadd_state *has;
>> +struct hv_hotadd_gap *gap;
>> unsigned lo
KY Srinivasan writes:
>> -Original Message-
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Thursday, August 11, 2016 2:17 AM
>> To: KY Srinivasan
>> Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang Zhang
>>
>
: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 62a4e6e..3ba29fc 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv
ght thing to do long-term, we
can either put this on top of this series or do it later in net-next.
Vitaly Kuznetsov (5):
hv_netvsc: don't lose VF information
hv_netvsc: avoid deadlocks between rtnl lock and vf_use_cnt wait
hv_netvsc: reset vf_inject on VF removal
hv_netvsc: protec
We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER notifications
only once per VF but we increase/decrease module refcount unconditionally.
Check vf_netdev to make sure we don't take/release it twice. We presume
that only one VF per netvsc device may exist.
Signed-off-
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on
VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while
vf_netdev is already NULL and we're trying to inject packets into NULL
net device in netvsc_recv_callback() causing kernel to crash.
S
struct netvsc_device is not suitable for storing VF information as this
structure is being destroyed on MTU change / set channel operation (see
rndis_filter_device_remove()). Move all VF related stuff to struct
net_device_context which is persistent.
Signed-off-by: Vitaly Kuznetsov
Acked-by
nd call NETDEV_NOTIFY_PEERS directly. As we're
acting under rtnl lock this is legitimate.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Haiyang Zhang
---
Changes since v1:
- Move the patch ahead in the series to avoid introducing new blocking
issues and solving them later in the series. [
Stephen Hemminger writes:
> Rather than keeping a pointer, a flag, and reference count, use RCU and
> existing
> device reference count to protect the synthetic to VF relationship.
Thanks! I like the idea. Some nitpicks below ...
>
> One other change is that injected packets must be accounted
sues which I fix with first two patches
of this series. Patches 3 removes wait on ol_waitevent when we have in
in-kernel memory onlining, patch 4 gets rid of ha_region_mutex by doing
the locking fine-grained with a spinlock.
Vitaly Kuznetsov (4):
Drivers: hv: balloon: keep track of where ha_reg
'moving window' was wrong (as there is no guarantee
that hot add requests come ordered) we should still keep track of
covered_start_pfn. This is not a revert, the logic is different.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 7 +--
1 file changed, 5 insertions(+),
With the recently introduced in-kernel memory onlining
(MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages
to come online in the driver and we can get rid of the waiting.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 14 --
1 file changed, 8
list_for_each -> list_for_each_entry as we actually
need entries in all these cases, drop meaningless list_empty() checks.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 96 ++---
1 file changed, 52 insertions(+), 44 deletions(-)
diff --git a/drivers/
and our current logic doesn't allow that. Instead, create a list of
such 'gaps' and check for them in the page online callback.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 107 +---
1 file changed, 83 insertions
list_for_each -> list_for_each_entry as we actually
need entries in all these cases, drop meaningless list_empty() checks.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 96 ++---
1 file changed, 52 insertions(+), 44 deletions(-)
diff --git a/drivers/
and our current logic doesn't allow that. Instead, create a list of
such 'gaps' and check for them in the page online callback.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 107 +---
1 file changed, 83 insertions
'moving window' was wrong (as there is no guarantee
that hot add requests come ordered) we should still keep track of
covered_start_pfn. This is not a revert, the logic is different.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 7 +--
1 file changed, 5 insertions(+),
With the recently introduced in-kernel memory onlining
(MEMORY_HOTPLUG_DEFAULT_ONLINE) these is no point in waiting for pages
to come online in the driver and we can get rid of the waiting.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 14 --
1 file changed, 8
when we have in
in-kernel memory onlining, patch 4 gets rid of ha_region_mutex by doing
the locking fine-grained with a spinlock.
Vitaly Kuznetsov (4):
Drivers: hv: balloon: keep track of where ha_region starts
Drivers: hv: balloon: account for gaps in hot add regions
Drivers: hv: balloon
Yuval Mintz writes:
>> +static void netvsc_inject_enable(struct net_device_context
>> +*net_device_ctx) {
>> +net_device_ctx->vf_inject = true;
>> +}
>> +
>> +static void netvsc_inject_disable(struct net_device_context
>> +*net_device_ctx) {
>> +net_device_ctx->vf_inject = false;
>> +
>>
zero.
Instead of introducing additional synchronization I suggest we drop
gwrk.dwrk completely and call NETDEV_NOTIFY_PEERS directly. As we're
acting under rtnl lock this is legitimate.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 7 ---
drivers/net/h
We reset vf_inject on VF going down (netvsc_vf_down()) but we don't on
VF removal (netvsc_unregister_vf()) so vf_inject stays 'true' while
vf_netdev is already NULL and we're trying to inject packets into NULL
net device in netvsc_recv_callback() causing kernel to crash.
S
We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER notifications
only once per VF but we increase/decrease module refcount unconditionally.
Check vf_netdev to make sure we don't take/release it twice. We presume
that only one VF per netvsc device may exist.
Signed-off-
Kernel crash is reported after VF is removed and detached from netvsc
device. My investigation led me to PATCH2 of this series but PATCH1 is
required to support the change. I also noticed a couple of other issues
while debugging and I fix them with PATCH3 and PATCH4.
Please review.
Vitaly
struct netvsc_device is not suitable for storing VF information as this
structure is being destroyed on MTU change / set channel operation (see
rndis_filter_device_remove()). Move all VF related stuff to struct
net_device_context which is persistent.
Signed-off-by: Vitaly Kuznetsov
---
drivers
"Alex Ng (LIS)" writes:
>> -Original Message-
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Friday, August 5, 2016 3:49 AM
>> To: de...@linuxdriverproject.org
>> Cc: linux-ker...@vger.kernel.org; Haiyang Zhang ; KY
>> Srin
KY Srinivasan writes:
>> -Original Message-
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Tuesday, August 9, 2016 1:46 AM
>> To: de...@linuxdriverproject.org
>> Cc: linux-ker...@vger.kernel.org; Haiyang Zhang ;
>> KY Srinivasan
The auto incremented counter is not being used anymore, get rid of it.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel_mgmt.c | 2 --
include/linux/hyperv.h| 3 ---
2 files changed, 5 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index b6c1211
.
Signed-off-by: Vitaly Kuznetsov
---
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 e82f7e1..ef42909 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -962,7 +962,7 @@ int
auto incremented counter.
Vitaly Kuznetsov (2):
Drivers: hv: make VMBus bus ids persistent
Drivers: hv: get rid of id in struct vmbus_channel
drivers/hv/channel_mgmt.c | 2 --
drivers/hv/vmbus_drv.c| 2 +-
include/linux/hyperv.h| 3 ---
3 files changed, 1 insertion(+), 6 deletions
"Alex Ng (LIS)" writes:
>> -Original Message-
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Friday, August 5, 2016 3:49 AM
>> To: de...@linuxdriverproject.org
>> Cc: linux-ker...@vger.kernel.org; Haiyang Zhang ;
>> KY Srin
'moving window' was wrong (as there is no guarantee
that hot add requests come ordered) we should still keep track of
covered_start_pfn. This is not a revert, the logic is different.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 7 +--
1 file changed, 5 insertions(+),
and our current logic doesn't allow that. Instead, create a list of
such 'gaps' and check for them in the page online callback.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 107 +---
1 file changed, 83 insertions
With the recently introduced in-kernel memory onlining
(MEMORY_HOTPLUG_DEFAULT_ONLINE) these it no point in waiting for pages
to come online in the driver and in case the feature is disabled the 5
second wait won't help. Get rid of the waiting.
Signed-off-by: Vitaly Kuznetsov
---
drive
the locking fine-grained with a spinlock.
Vitaly Kuznetsov (4):
Drivers: hv: balloon: keep track of where ha_region starts
Drivers: hv: balloon: account for gaps in hot add regions
Drivers: hv: balloon: get rid on ol_waitevent
Drivers: hv: balloon: replace ha_region_mutex with spinlock
list_for_each -> list_for_each_entry as we actually
need entries in all these cases, drop meaningless list_empty() checks.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 98 ++---
1 file changed, 53 insertions(+), 45 deletions(-)
diff --git a/drivers/
"K. Y. Srinivasan" writes:
> Some miscellaneous fixes.
>
> Vitaly Kuznetsov (3):
> Drivers: hv: avoid vfree() on crash
> Drivers: hv: get rid of redundant messagecount in
> create_gpadl_header()
> Drivers: hv: don't leak memory in vmbus_establish_
tps://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/develop/make_mgmt_service
>
> The patch implements the necessary support in the guest side by introducing
> a new socket address family AF_HYPERV.
>
> Signed-off-by: Dexuan Cui
> Cc: "K. Y. Srinivasan"
> Cc: Haiya
KVP daemon does fork()/exec() (with popen()) so we need to close our fds
to avoid sharing them with child processes. The immediate implication of
not doing so I see is SELinux complaining about 'ip' trying to access
'/dev/vmbus/hv_kvp'.
Signed-off-by: Vitaly Kuzn
Bjorn Helgaas writes:
> On Fri, Jun 10, 2016 at 06:53:36PM -0500, Bjorn Helgaas wrote:
>> On Mon, May 30, 2016 at 04:17:57PM +0200, Vitaly Kuznetsov wrote:
>> > kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback()
>> > and while fixing it I stumb
Vitaly Kuznetsov writes:
> kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback()
> and while fixing it I stumbled upon an unrelated issue(s) there.
>
> Vitaly Kuznetsov (2):
> PCI: hv: don't leak buffer in hv_pci_onchannelcallback()
> PCI: hv: hand
for conditional checking in copy_to/
copy_from functions and use a single memcpy().
Lightly tested with 'netvsc: Use the new in-place consumption APIs in the
rx path' patch and with storvsc driver.
Vitaly Kuznetsov (4):
Drivers: hv: cleanup vmbus_open() for wrap around mappings
Dr
) check
in hv_ringbuffer_init() with BUILD_BUG_ON() as it is a compile time check.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel.c | 29 ++---
drivers/hv/hyperv_vmbus.h | 4 ++--
drivers/hv/ring_buffer.c | 39 +--
3 files
With wrap around mappings for ring buffers we can always use a single
memcpy() to do the job.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/ring_buffer.c | 24 +++-
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/hv/ring_buffer.c b/drivers/hv
);
- rename poorly named labels;
- use alloc_pages() instead of __get_free_pages() as we need struct page
pointer for future.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel.c | 43 +++
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/drivers
With wrap around mappings in place we can always provide drivers with
direct links to packets on the ring buffer, even when they wrap around.
Do the required updates to get_next_pkt_raw()/put_pkt_raw()
Signed-off-by: Vitaly Kuznetsov
---
include/linux/hyperv.h | 32
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Haiyang Zhang
---
Changes since v2:
- Rebase to current net-next [David Miller]
Changes since v1 RFC:
- Non-RFC
- Restore (net_dev->num_sc_offered > 0) condition in
rndis_fi
David Miller writes:
> From: Vitaly Kuznetsov
> Date: Wed, 8 Jun 2016 19:17:41 +0200
>
>> I'm hitting 5 second timeout in rndis_filter_set_rss_param() while setting
>> RSS parameters for the device. When this happens we end up returning
>>
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
Acked-by: Haiyang Zhang
---
Changes since v1 RFC:
- Non-RFC
- Restore (net_dev->num_sc_offered > 0) condition in
rndis_filter_device_remove() as without it we may hang when there are no
Vitaly Kuznetsov writes:
> I'm hitting 5 second timeout in rndis_filter_set_rss_param() while setting
> RSS parameters for the device. When this happens we end up returning
> -ETIMEDOUT from the function and rndis_filter_device_add() falls back to
> setting
>
>
nd if the host screws things up there is no easy way to recover anyway.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc.c | 14 +
drivers/net/hyperv/rndis_filter.c | 115 +-
2 files changed, 30 insertions(+), 99 deletions(-)
diff --git
27;t
really know when these messages are delivered but we don't have a single
message buffer there.
Reported-by: Barry Davis
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_fcopy.c | 14 ++
drivers/hv/hv_kvp.c | 27 ---
drivers/hv
to respond to our request (and there is nothing we can do if
it doesn't).
Signed-off-by: Vitaly Kuznetsov
---
- The patch is the successor of previously sent '[PATCH] Drivers: hv: fix
infinite wait when channel open timeouts, thus v2.
- Remove the timeout completely [K. Y. Sriniva
The only caller rndis_filter_device_add() has 'struct net_device' pointer
already.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hyperv/rndis_filter.c
b/drivers/
net_device_ctx is assigned in the very beginning of the function and 'net'
pointer doesn't change.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/net
Make it easier to get 'struct netvsc_device' from 'struct net_device' and
'struct hv_device' by introducing inline helpers.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 12
drivers/net/hyperv/netvsc.c | 11 +
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to
'struct hv_device' pointer which we use in rndis_filter_set_device_mac()
to get back to 'struct net_device'.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers
need while their
callers already have the required information.
This is just a cleanup series with no functional changes intended. It
doesn't pretend to be complete, additional cleanup of other functions may
follow.
Vitaly Kuznetsov (5):
hv_netvsc: remove redundant assignment in netvsc_rec
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to
reach to struct netvsc_device only and all callers have it already.
While on it, rename net_device to nvdev in rndis_filter_open() as
net_device is misleading.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
dd sending CHANNELMSG_CLOSECHANNEL message on timeout to make sure
the channel is closed.
The other possible solution for the issue would be to remove the timeout
in vmbus_open() making our wait infinite.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel.c | 14 +-
1 file c
Dexuan Cui writes:
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Wednesday, June 1, 2016 0:27
>> To: Dexuan Cui
>> Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev-
>> de...@linuxdriverproject.org; o...@aepfle.de
vmbus_release_relid() to a later place where
> the channel has been removed from the per-cpu and the global lists.
>
> Reported-by: Rolf Neugebauer
> Cc: Vitaly Kuznetsov
> Signed-off-by: Dexuan Cui
Tested 4.7-rc1 with this path applied and kernel always crashes on boot
(WS2016TP5,
values by
dropping out. If the return value is not zero it is wrong to inspect
buffer or bytes_recvd as these may contain invalid data.
Signed-off-by: Vitaly Kuznetsov
---
drivers/pci/host/pci-hyperv.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pci-
We don't free buffer on several code paths in hv_pci_onchannelcallback(),
put kfree() to the end of the function to fix the issue. Direct { kfree();
return; } can now be replaced with a simple 'break';
Signed-off-by: Vitaly Kuznetsov
---
drivers/pci/host/pci-hyperv.c | 11
kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback()
and while fixing it I stumbled upon an unrelated issue(s) there.
Vitaly Kuznetsov (2):
PCI: hv: don't leak buffer in hv_pci_onchannelcallback()
PCI: hv: handle all pending messages in hv_pci_onchannelcal
kmemleak helped me to identify a memory leak on GPADL establishment. Do
some minor refactoring and fix the issue.
Vitaly Kuznetsov (2):
Drivers: hv: get rid of redundant messagecount in
create_gpadl_header()
Drivers: hv: don't leak memory in vmbus_establish_gpadl()
drivers/hv/chan
In some cases create_gpadl_header() allocates submessages but we never
free them.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 2b109e8..a68830c 100644
--- a
We use messagecount only once in vmbus_establish_gpadl() to check if
it is safe to iterate through the submsglist. We can just initialize
the list header in all cases in create_gpadl_header() instead.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/channel.c | 38
Both rndis_filter_open()/rndis_filter_close() use struct hv_device to
reach to struct netvsc_device only and all callers have it already.
While on it, rename net_device to nvdev in rndis_filter_open() as
net_device is misleading.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
Make it easier to get 'struct netvsc_device' from 'struct net_device' and
'struct hv_device' by introducing inline helpers.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 12
drivers/net/hyperv/netvsc.c | 11 +
The only caller rndis_filter_device_add() has 'struct net_device' pointer
already.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/rndis_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hyperv/rndis_filter.c
b/drivers/
net_device_ctx is assigned in the very beginning of the function and 'net'
pointer doesn't change.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/net
of crashes to reduce the
amount of work which can cause consequent crashes. We don't really need to
free anything on crash.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv.c | 8 +---
drivers/hv/hyperv_vmbus.h | 2 +-
drivers/hv/vmbus_drv.c| 8
3 files changed
with no functional changes intended. It
doesn't pretend to be complete, additional cleanup of other functions may
follow.
Vitaly Kuznetsov (5):
hv_netvsc: remove redundant assignment in netvsc_recv_callback()
hv_netvsc: introduce {net,hv}_device_to_netvsc_device() helpers
hv_netvsc: p
We unpack 'struct net_device' in netvsc_set_mac_addr() to get to
'struct hv_device' pointer which we use in rndis_filter_set_device_mac()
to get back to 'struct net_device'.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers
Dexuan Cui writes:
> There is a rare race when we remove an entry from the global list
> hv_context.percpu_list[cpu] in hv_process_channel_removal() ->
> percpu_channel_deq() -> list_del(): at this time, if vmbus_on_event() ->
> process_chn_event() -> pcpu_relid2channel() is trying to query the l
Simplify netvsvc pointer graph by getting rid of the redundant ndev
pointer. We can always get a pointer to struct net_device from somewhere
else.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 5 +--
drivers/net/hyperv/netvsc.c | 36 +++-
drivers/net
()
before we populate chn_table.
- we populate chn_table[0] only.
The issue could be papered over by checking channel != NULL in
netvsc_send() but populating the whole chn_table and writing the
nvdev pointer afterwards seems more appropriate.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
When netvsc device is removed during mtu change or channels setup we get
into troubles as both paths are trying to remove the device. Synchronize
them with start_remove flag and rtnl lock.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 9 +++--
1 file changed, 7
he 'netvsc_device -> rndis_device'
branch and re-creating it making the synchronization easier.
There is one additional redundant pointer left, it is struct net_device
link in struct netvsc_device, it is going to be removed in a separate
commit.
Signed-off-by: Vitaly Kuznetsov
---
d
struct netvsc_device is destroyed on mtu change so keeping the
protection flag there is not a good idea. Move it to struct
net_device_context which is preserved.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 4 +++-
drivers/net/hyperv/netvsc.c | 3 +--
drivers/net
()
2) netvsc_remove()
3) netvsc_send()
To solve these issues without introducing new locks some refactoring is
required. We need to get rid of very complex link graph in all the
internal structures and avoid traveling through structures which are being
removed.
Vitaly Kuznetsov (6):
hv_netvsc
start_remove value in
netvsc_link_change().
Reported-by: Haiyang Zhang
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
"Lino Sanfilippo" writes:
> Hi,
>
>>
>> MTU change and set channels operations are implemented as netvsc device
>> re-creation destroying internal structures (struct net_device stays). This
>> is really unfortunate but there is no support from Hyper-V host to do it
>> in a different way. Such re-
()
before we populate chn_table.
- we populate chn_table[0] only.
The issue could be papered over by checking channel != NULL in
netvsc_send() but populating the whole chn_table and writing the
nvdev pointer afterwards seems more appropriate.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv
he 'netvsc_device -> rndis_device'
branch and re-creating it making the synchronization easier.
There is one additional redundant pointer left, it is struct net_device
link in struct netvsc_device, it is going to be removed in a separate
commit.
Signed-off-by: Vitaly Kuznetsov
---
d
start_remove value in
netvsc_link_change().
Reported-by: Haiyang Zhang
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
When netvsc device is removed during mtu change or channels setup we get
into troubles as both paths are trying to remove the device. Synchronize
them with start_remove flag and rtnl lock.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/netvsc_drv.c | 9 +++--
1 file changed, 7
Simplify netvsvc pointer graph by getting rid of the redundant ndev
pointer. We can always get a pointer to struct net_device from somewhere
else.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 2 --
drivers/net/hyperv/netvsc.c | 30
new locks some refactoring is
required. We need to get rid of very complex link graph in all the
internal structures and avoid traveling through structures which are being
removed.
Vitaly Kuznetsov (6):
hv_netvsc: move start_remove flag to net_device_context
hv_netvsc: use start_remove flag to
struct netvsc_device is destroyed on mtu change so keeping the
protection flag there is not a good idea. Move it to struct
net_device_context which is preserved.
Signed-off-by: Vitaly Kuznetsov
---
drivers/net/hyperv/hyperv_net.h | 4 +++-
drivers/net/hyperv/netvsc.c | 3 +--
drivers/net
ritical so this
explicit fencing is not supposed to bring any slowdown.
Signed-off-by: Vitaly Kuznetsov
---
drivers/pci/host/pci-hyperv.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index c17e792..7e9b2de 100644
may
try to perform some operations with these resources on shutdown. Move
resources release report after we do pci_stop_root_bus().
Signed-off-by: Vitaly Kuznetsov
---
drivers/pci/host/pci-hyperv.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/host/pci-
lsvmbus keeps its own copy of all VMBus UUIDs, add PCIe pass-through
device there to not report 'Unknown' for such devices.
Signed-off-by: Vitaly Kuznetsov
---
Changes since v1:
- indentation [Dexuan Cui]
---
tools/hv/lsvmbus | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/
Dexuan Cui writes:
>> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com]
>> Sent: Saturday, April 23, 2016 0:21
>> To: de...@linuxdriverproject.org
>> Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; Haiyang
>> Zhang ; Dexuan Cui
>> Subject: [PATCH] tool
lsvmbus keeps its own copy of all VMBus UUIDs, add PCIe pass-through
device there to not report 'Unknown' for such devices.
Signed-off-by: Vitaly Kuznetsov
---
tools/hv/lsvmbus | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
index 162a378..e223
e get some other events in between these two halves.
Reviewed-by: Vitaly Kuznetsov
> Signed-off-by: Haiyang Zhang
> Reviewed-by: K. Y. Srinivasan
> ---
> drivers/net/hyperv/netvsc_drv.c |2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drive
Vitaly Kuznetsov writes:
> Hi,
>
> I found an issue (crash) while testing memory hotplug on WS2016TP4 host.
> It should be easily reproducible with the following test sequence
> (4.6-rc2):
>
> 1) Start a VM with 4 vCPUs in 4 NUMA nodes, 4096Mb of RAM.
> 2) Enable m
, but trying to continue
Fix the issue by overriding x86_platform.get_nmi_reason. Use 'booted on
EFI' flag to detect Gen2 instances.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kernel/cpu/mshyperv.c | 12
1 file changed, 12 insertions(+)
diff --git a/arch/x86/kernel/
egions
in a different order. We end up modifying the wrong HA region and crashing
later on pages online. Modify the check to make sure we found the region
we were searching for while iterating. Fix the same check in pfn_covered()
as well.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_ballo
501 - 600 of 975 matches
Mail list logo