<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hv/channel.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-04-27T07:09:32Z</updated>
<entry>
<title>Drivers: hv: get rid of timeout in vmbus_open()</title>
<updated>2017-04-27T07:09:32Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-06-10T00:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=567dd48c4e71a8d6d3014adb153993ef8608722c'/>
<id>urn:sha1:567dd48c4e71a8d6d3014adb153993ef8608722c</id>
<content type='text'>
commit 396e287fa2ff46e83ae016cdcb300c3faa3b02f6 upstream.

vmbus_teardown_gpadl() can result in infinite wait when it is called on 5
second timeout in vmbus_open(). The issue is caused by the fact that gpadl
teardown operation won't ever succeed for an opened channel and the timeout
isn't always enough. As a guest, we can always trust the host to respond to
our request (and there is nothing we can do if it doesn't).

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Drivers: hv: don't leak memory in vmbus_establish_gpadl()</title>
<updated>2017-04-27T07:09:32Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2016-06-04T00:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ab982a01201749f49b5a6a23b45b20a03490ce5'/>
<id>urn:sha1:5ab982a01201749f49b5a6a23b45b20a03490ce5</id>
<content type='text'>
commit 7cc80c98070ccc7940fc28811c92cca0a681015d upstream.

In some cases create_gpadl_header() allocates submessages but we never
free them.

[sumits] Note for stable:
Upstream commit 4d63763296ab7865a98bc29cc7d77145815ef89f:
(Drivers: hv: get rid of redundant messagecount in create_gpadl_header())
changes the list usage to initialize list header in all cases; that patch
isn't added to stable, so the current patch is modified a little bit from
the upstream commit to check if the list is valid or not.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: fix rescind-offer handling for device without a driver</title>
<updated>2016-09-15T06:27:41Z</updated>
<author>
<name>Dexuan Cui</name>
</author>
<published>2015-12-15T00:01:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64bdc685ccc1d207632a6cf17cd5771e10623c85'/>
<id>urn:sha1:64bdc685ccc1d207632a6cf17cd5771e10623c85</id>
<content type='text'>
[ Upstream commit 34c6801e3310ad286c7bb42bc88d42926b8f99bf ]

In the path vmbus_onoffer_rescind() -&gt; vmbus_device_unregister()  -&gt;
device_unregister() -&gt; ... -&gt; __device_release_driver(), we can see for a
device without a driver loaded: dev-&gt;driver is NULL, so
dev-&gt;bus-&gt;remove(dev), namely vmbus_remove(), isn't invoked.

As a result, vmbus_remove() -&gt; hv_process_channel_removal() isn't invoked
and some cleanups(like sending a CHANNELMSG_RELID_RELEASED message to the
host) aren't done.

We can demo the issue this way:
1. rmmod hv_utils;
2. disable the Heartbeat Integration Service in Hyper-V Manager and lsvmbus
shows the device disappears.
3. re-enable the Heartbeat in Hyper-V Manager and modprobe hv_utils, but
lsvmbus shows the device can't appear again.
This is because, the host thinks the VM hasn't released the relid, so can't
re-offer the device to the VM.

We can fix the issue by moving hv_process_channel_removal()
from vmbus_close_internal() to vmbus_device_release(), since the latter is
always invoked on device_unregister(), whether or not the dev has a driver
loaded.

Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: serialize process_chn_event() and vmbus_close_internal()</title>
<updated>2016-09-15T06:27:40Z</updated>
<author>
<name>Dexuan Cui</name>
</author>
<published>2015-12-15T00:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff83d7914b749f8c654c0e08d21667035901ab75'/>
<id>urn:sha1:ff83d7914b749f8c654c0e08d21667035901ab75</id>
<content type='text'>
[ Upstream commit 63d55b2aeb5e4faa170316fee73c3c47ea9268c7 ]

process_chn_event(), running in the tasklet, can race with
vmbus_close_internal() in the case of SMP guest, e.g., when the former is
accessing channel-&gt;inbound.ring_buffer, the latter could be freeing the
ring_buffer pages.

To resolve the race, we can serialize them by disabling the tasklet when
the latter is running here.

Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Fix a Host signaling bug</title>
<updated>2016-03-03T23:07:16Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2015-12-15T00:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a383bcc68ad1437315eb4298a84cdde070a69bc'/>
<id>urn:sha1:2a383bcc68ad1437315eb4298a84cdde070a69bc</id>
<content type='text'>
commit 8599846d73997cdbccf63f23394d871cfad1e5e6 upstream.

Currently we have two policies for deciding when to signal the host:
One based on the ring buffer state and the other based on what the
VMBUS client driver wants to do. Consider the case when the client
wants to explicitly control when to signal the host. In this case,
if the client were to defer signaling, we will not be able to signal
the host subsequently when the client does want to signal since the
ring buffer state will prevent the signaling. Implement logic to
have only one signaling policy in force for a given channel.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Tested-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Permit sending of packets without payload</title>
<updated>2015-08-05T05:28:39Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2015-08-01T23:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b81658cf5d44e07c70c93e3b2aefe848eaaba99f'/>
<id>urn:sha1:b81658cf5d44e07c70c93e3b2aefe848eaaba99f</id>
<content type='text'>
The guest may have to send a completion packet back to the host.
To support this usage, permit sending a packet without a payload -
we would be only sending the descriptor in this case.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion</title>
<updated>2015-06-12T23:58:33Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2015-06-01T04:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=294409d20572e9bcf857328286433f851168d54a'/>
<id>urn:sha1:294409d20572e9bcf857328286433f851168d54a</id>
<content type='text'>
Allocate ring buffer memory from the NUMA node assigned to the channel.
Since this is a performance and not a correctness issue, if the node specific
allocation were to fail, fall back and allocate without specifying the node.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths</title>
<updated>2015-05-24T19:19:00Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2015-05-07T00:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ffc151f3c83c25ec06d5ad13a78d0fc066c7167e'/>
<id>urn:sha1:ffc151f3c83c25ec06d5ad13a78d0fc066c7167e</id>
<content type='text'>
In case there was an error reported in the response to the CHANNELMSG_OPENCHANNEL
call we need to do the cleanup as a vmbus_open() user won't be doing it after
receiving an error. The cleanup should be done on all failure paths. We also need
to avoid returning open_info-&gt;response.open_result.status as the return value as
all other errors we return from vmbus_open() are -EXXX and vmbus_open() callers
are not supposed to analyze host error codes.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Fix a siganlling host signalling issue</title>
<updated>2015-03-25T10:53:55Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2015-03-18T19:29:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f5cc81733baf7b67a039a931dae282e53bf97b9'/>
<id>urn:sha1:5f5cc81733baf7b67a039a931dae282e53bf97b9</id>
<content type='text'>
Handle the case when the write to the ringbuffer fails. In this case,
unconditionally signal the host. Since we may have deferred signalling
the host based on the kick_q parameter, signalling the host
unconditionally in this case deals with the issue.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Export the vmbus_sendpacket_pagebuffer_ctl()</title>
<updated>2015-03-25T10:53:55Z</updated>
<author>
<name>K. Y. Srinivasan</name>
</author>
<published>2015-03-18T19:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3a19b36ad7450d4c8caeb7d9f623af3da32a578'/>
<id>urn:sha1:b3a19b36ad7450d4c8caeb7d9f623af3da32a578</id>
<content type='text'>
Export the vmbus_sendpacket_pagebuffer_ctl() interface. This export will be
used by the netvsc driver.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
