Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1241900 > unrolled thread
| Started by | "K. Y. Srinivasan" <kys@microsoft.com> |
|---|---|
| First post | 2015-10-08 02:40 +0200 |
| Last post | 2015-10-08 16:50 +0200 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 00/10] Drivers: hv: Miscellaneous fixes. "K. Y. Srinivasan" <kys@microsoft.com> - 2015-10-08 02:40 +0200
[PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed "K. Y. Srinivasan" <kys@microsoft.com> - 2015-10-08 02:40 +0200
Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed "Denis V. Lunev" <den@openvz.org> - 2015-10-08 19:30 +0200
RE: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed KY Srinivasan <kys@microsoft.com> - 2015-10-08 19:30 +0200
Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed "Denis V. Lunev" <den@openvz.org> - 2015-10-08 19:40 +0200
[PATCH 01/10] Drivers: hv: util: Increase the timeout for util services "K. Y. Srinivasan" <kys@microsoft.com> - 2015-10-08 02:40 +0200
Re: [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services Olaf Hering <olaf@aepfle.de> - 2015-10-08 15:30 +0200
RE: [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services KY Srinivasan <kys@microsoft.com> - 2015-10-08 16:50 +0200
| From | "K. Y. Srinivasan" <kys@microsoft.com> |
|---|---|
| Date | 2015-10-08 02:40 +0200 |
| Subject | [PATCH 00/10] Drivers: hv: Miscellaneous fixes. |
| Message-ID | <qh7pv-4eQ-7@gated-at.bofh.it> |
Miscellaneous fixes.
Denis V. Lunev (1):
drivers/hv: cleanup synic msrs if vmbus connect failed
Jake Oshins (3):
drivers:hv: Export a function that maps Linux CPU num onto Hyper-V
proc num
drivers:hv: Export the API to invoke a hypercall on Hyper-V
drivers:hv: Define the channel type for Hyper-V PCI Express
pass-through
K. Y. Srinivasan (1):
Drivers: hv: util: Increase the timeout for util services
Olaf Hering (5):
Drivers: hv: utils: run polling callback always in interrupt context
tools: hv: report ENOSPC errors in hv_fcopy_daemon
tools: hv: remove repeated HV_FCOPY string
Drivers: hv: util: catch allocation errors
Drivers: hv: utils: use memdup_user in hvt_op_write
drivers/hv/channel_mgmt.c | 3 ++
drivers/hv/hv.c | 20 +++++++++---------
drivers/hv/hv_fcopy.c | 40 ++++++++++++++------------------------
drivers/hv/hv_kvp.c | 31 +++++++++++------------------
drivers/hv/hv_snapshot.c | 29 ++++++++++-----------------
drivers/hv/hv_utils_transport.c | 18 +++++++++-------
drivers/hv/hyperv_vmbus.h | 13 ++++++-----
drivers/hv/vmbus_drv.c | 21 +++++++++++++++++++-
include/linux/hyperv.h | 14 +++++++++++++
include/uapi/linux/hyperv.h | 1 +
tools/hv/hv_fcopy_daemon.c | 24 ++++++++++++++++++----
11 files changed, 122 insertions(+), 92 deletions(-)
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "K. Y. Srinivasan" <kys@microsoft.com> |
|---|---|
| Date | 2015-10-08 02:40 +0200 |
| Subject | [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed |
| Message-ID | <qh7pw-4eQ-33@gated-at.bofh.it> |
| In reply to | #1241900 |
From: Denis V. Lunev <den@openvz.org> Before vmbus_connect() synic is setup per vcpu - this means hypervisor receives writes at synic msr's and probably allocate hypervisor resources per synic setup. If vmbus_connect() failed for some reason it's neccessary to cleanup synic setup by call hv_synic_cleanup() at each vcpu to get a chance to free allocated resources by hypervisor per synic. This patch does appropriate cleanup in case of vmbus_connect() failure. Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> CC: "K. Y. Srinivasan" <kys@microsoft.com> CC: Haiyang Zhang <haiyangz@microsoft.com> CC: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> --- drivers/hv/vmbus_drv.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index f19b6f7..3297731 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -867,7 +867,7 @@ static int vmbus_bus_init(int irq) on_each_cpu(hv_synic_init, NULL, 1); ret = vmbus_connect(); if (ret) - goto err_alloc; + goto err_connect; if (vmbus_proto_version > VERSION_WIN7) cpu_hotplug_disable(); @@ -885,6 +885,8 @@ static int vmbus_bus_init(int irq) return 0; +err_connect: + on_each_cpu(hv_synic_cleanup, NULL, 1); err_alloc: hv_synic_free(); hv_remove_vmbus_irq(); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Denis V. Lunev" <den@openvz.org> |
|---|---|
| Date | 2015-10-08 19:30 +0200 |
| Subject | Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed |
| Message-ID | <qhnaV-1HD-1@gated-at.bofh.it> |
| In reply to | #1241901 |
On 10/08/2015 05:01 AM, K. Y. Srinivasan wrote:
> From: Denis V. Lunev <den@openvz.org>
K.Y.,
there is one subtle thing in this submission. You have changed "From:"
field in comparison with the original letter. I have submitted
the patch with "From: Andrey Smetanin <asmetanin@virtuozzo.com>"
In this case Author: in the resulted git mainstream commit will
be Andrey. With your submission the resulted Author will be I.
This was already happened once with
commit cc2dd4027a43bb36c846f195a764edabc0828602
Author: Denis V. Lunev <den@openvz.org>
Date: Sat Aug 1 16:08:20 2015 -0700
mshyperv: fix recognition of Hyper-V guest crash MSR's
The situation looks a bit unfair.
Can we do something with that now/next time?
Den
> Before vmbus_connect() synic is setup per vcpu - this means
> hypervisor receives writes at synic msr's and probably allocate
> hypervisor resources per synic setup.
>
> If vmbus_connect() failed for some reason it's neccessary to cleanup
> synic setup by call hv_synic_cleanup() at each vcpu to get a chance
> to free allocated resources by hypervisor per synic.
>
> This patch does appropriate cleanup in case of vmbus_connect() failure.
>
> Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> CC: "K. Y. Srinivasan" <kys@microsoft.com>
> CC: Haiyang Zhang <haiyangz@microsoft.com>
> CC: Vitaly Kuznetsov <vkuznets@redhat.com>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> drivers/hv/vmbus_drv.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index f19b6f7..3297731 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -867,7 +867,7 @@ static int vmbus_bus_init(int irq)
> on_each_cpu(hv_synic_init, NULL, 1);
> ret = vmbus_connect();
> if (ret)
> - goto err_alloc;
> + goto err_connect;
>
> if (vmbus_proto_version > VERSION_WIN7)
> cpu_hotplug_disable();
> @@ -885,6 +885,8 @@ static int vmbus_bus_init(int irq)
>
> return 0;
>
> +err_connect:
> + on_each_cpu(hv_synic_cleanup, NULL, 1);
> err_alloc:
> hv_synic_free();
> hv_remove_vmbus_irq();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2015-10-08 19:30 +0200 |
| Subject | RE: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed |
| Message-ID | <qhnaW-1HD-17@gated-at.bofh.it> |
| In reply to | #1242623 |
> -----Original Message----- > From: Denis V. Lunev [mailto:den@openvz.org] > Sent: Thursday, October 8, 2015 10:20 AM > To: KY Srinivasan <kys@microsoft.com>; gregkh@linuxfoundation.org; linux- > kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com > Cc: Andrey Smetanin <asmetanin@virtuozzo.com>; Haiyang Zhang > <haiyangz@microsoft.com> > Subject: Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect > failed > > On 10/08/2015 05:01 AM, K. Y. Srinivasan wrote: > > From: Denis V. Lunev <den@openvz.org> > > K.Y., > > there is one subtle thing in this submission. You have changed "From:" > field in comparison with the original letter. I have submitted > the patch with "From: Andrey Smetanin <asmetanin@virtuozzo.com>" > In this case Author: in the resulted git mainstream commit will > be Andrey. With your submission the resulted Author will be I. > > This was already happened once with > > commit cc2dd4027a43bb36c846f195a764edabc0828602 > Author: Denis V. Lunev <den@openvz.org> > Date: Sat Aug 1 16:08:20 2015 -0700 > > mshyperv: fix recognition of Hyper-V guest crash MSR's > > The situation looks a bit unfair. > > Can we do something with that now/next time? I am going to be resubmitting this series. I will fix it up. Regards, K. Y > > Den > > > Before vmbus_connect() synic is setup per vcpu - this means > > hypervisor receives writes at synic msr's and probably allocate > > hypervisor resources per synic setup. > > > > If vmbus_connect() failed for some reason it's neccessary to cleanup > > synic setup by call hv_synic_cleanup() at each vcpu to get a chance > > to free allocated resources by hypervisor per synic. > > > > This patch does appropriate cleanup in case of vmbus_connect() failure. > > > > Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> > > Signed-off-by: Denis V. Lunev <den@openvz.org> > > Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> > > CC: "K. Y. Srinivasan" <kys@microsoft.com> > > CC: Haiyang Zhang <haiyangz@microsoft.com> > > CC: Vitaly Kuznetsov <vkuznets@redhat.com> > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> > > --- > > drivers/hv/vmbus_drv.c | 4 +++- > > 1 files changed, 3 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > > index f19b6f7..3297731 100644 > > --- a/drivers/hv/vmbus_drv.c > > +++ b/drivers/hv/vmbus_drv.c > > @@ -867,7 +867,7 @@ static int vmbus_bus_init(int irq) > > on_each_cpu(hv_synic_init, NULL, 1); > > ret = vmbus_connect(); > > if (ret) > > - goto err_alloc; > > + goto err_connect; > > > > if (vmbus_proto_version > VERSION_WIN7) > > cpu_hotplug_disable(); > > @@ -885,6 +885,8 @@ static int vmbus_bus_init(int irq) > > > > return 0; > > > > +err_connect: > > + on_each_cpu(hv_synic_cleanup, NULL, 1); > > err_alloc: > > hv_synic_free(); > > hv_remove_vmbus_irq(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Denis V. Lunev" <den@openvz.org> |
|---|---|
| Date | 2015-10-08 19:40 +0200 |
| Subject | Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect failed |
| Message-ID | <qhnkC-1SL-5@gated-at.bofh.it> |
| In reply to | #1242626 |
On 10/08/2015 08:28 PM, KY Srinivasan wrote: > >> -----Original Message----- >> From: Denis V. Lunev [mailto:den@openvz.org] >> Sent: Thursday, October 8, 2015 10:20 AM >> To: KY Srinivasan <kys@microsoft.com>; gregkh@linuxfoundation.org; linux- >> kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; >> apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com >> Cc: Andrey Smetanin <asmetanin@virtuozzo.com>; Haiyang Zhang >> <haiyangz@microsoft.com> >> Subject: Re: [PATCH 07/10] drivers/hv: cleanup synic msrs if vmbus connect >> failed >> >> On 10/08/2015 05:01 AM, K. Y. Srinivasan wrote: >>> From: Denis V. Lunev <den@openvz.org> >> K.Y., >> >> there is one subtle thing in this submission. You have changed "From:" >> field in comparison with the original letter. I have submitted >> the patch with "From: Andrey Smetanin <asmetanin@virtuozzo.com>" >> In this case Author: in the resulted git mainstream commit will >> be Andrey. With your submission the resulted Author will be I. >> >> This was already happened once with >> >> commit cc2dd4027a43bb36c846f195a764edabc0828602 >> Author: Denis V. Lunev <den@openvz.org> >> Date: Sat Aug 1 16:08:20 2015 -0700 >> >> mshyperv: fix recognition of Hyper-V guest crash MSR's >> >> The situation looks a bit unfair. >> >> Can we do something with that now/next time? > I am going to be resubmitting this series. I will fix it up. thank you very much :) Den -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "K. Y. Srinivasan" <kys@microsoft.com> |
|---|---|
| Date | 2015-10-08 02:40 +0200 |
| Subject | [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services |
| Message-ID | <qh7pv-4eQ-9@gated-at.bofh.it> |
| In reply to | #1241900 |
Util services such as KVP and FCOPY need assistance from daemon's running in user space. Increase the timeout so we don't prematurely terminate the transaction in the kernel. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> --- drivers/hv/hv_fcopy.c | 3 ++- drivers/hv/hv_kvp.c | 3 ++- drivers/hv/hyperv_vmbus.h | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index db4b887..bbdec50 100644 --- a/drivers/hv/hv_fcopy.c +++ b/drivers/hv/hv_fcopy.c @@ -275,7 +275,8 @@ void hv_fcopy_onchannelcallback(void *context) * Send the information to the user-level daemon. */ schedule_work(&fcopy_send_work); - schedule_delayed_work(&fcopy_timeout_work, 5*HZ); + schedule_delayed_work(&fcopy_timeout_work, + HV_UTIL_TIMEOUT * HZ); return; } icmsghdr->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 74c38a9..e6aa33a 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -668,7 +668,8 @@ void hv_kvp_onchannelcallback(void *context) * user-mode not responding. */ schedule_work(&kvp_sendkey_work); - schedule_delayed_work(&kvp_timeout_work, 5*HZ); + schedule_delayed_work(&kvp_timeout_work, + HV_UTIL_TIMEOUT * HZ); return; diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 3d70e36..f26599b 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -31,6 +31,11 @@ #include <linux/hyperv.h> /* + * Timeout for services such as KVP and fcopy. + */ +#define HV_UTIL_TIMEOUT 30 + +/* * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent * is set by CPUID(HVCPUID_VERSION_FEATURES). */ -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Olaf Hering <olaf@aepfle.de> |
|---|---|
| Date | 2015-10-08 15:30 +0200 |
| Subject | Re: [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services |
| Message-ID | <qhjqG-4LW-13@gated-at.bofh.it> |
| In reply to | #1241902 |
On Wed, Oct 07, K. Y. Srinivasan wrote: > Util services such as KVP and FCOPY need assistance from daemon's running > in user space. Increase the timeout so we don't prematurely terminate > the transaction in the kernel. Is this an arbitrary number, or does the host allow such a large delay for the response? Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2015-10-08 16:50 +0200 |
| Subject | RE: [PATCH 01/10] Drivers: hv: util: Increase the timeout for util services |
| Message-ID | <qhkG5-6u9-1@gated-at.bofh.it> |
| In reply to | #1242338 |
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogT2xhZiBIZXJpbmcgW21h aWx0bzpvbGFmQGFlcGZsZS5kZV0NCj4gU2VudDogVGh1cnNkYXksIE9jdG9iZXIgOCwgMjAxNSA2 OjI0IEFNDQo+IFRvOiBLWSBTcmluaXZhc2FuIDxreXNAbWljcm9zb2Z0LmNvbT4NCj4gQ2M6IGdy ZWdraEBsaW51eGZvdW5kYXRpb24ub3JnOyBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOw0K PiBkZXZlbEBsaW51eGRyaXZlcnByb2plY3Qub3JnOyBhcHdAY2Fub25pY2FsLmNvbTsgdmt1em5l dHNAcmVkaGF0LmNvbTsNCj4gamFzb3dhbmdAcmVkaGF0LmNvbQ0KPiBTdWJqZWN0OiBSZTogW1BB VENIIDAxLzEwXSBEcml2ZXJzOiBodjogdXRpbDogSW5jcmVhc2UgdGhlIHRpbWVvdXQgZm9yIHV0 aWwNCj4gc2VydmljZXMNCj4gDQo+IE9uIFdlZCwgT2N0IDA3LCBLLiBZLiBTcmluaXZhc2FuIHdy b3RlOg0KPiANCj4gPiBVdGlsIHNlcnZpY2VzIHN1Y2ggYXMgS1ZQIGFuZCBGQ09QWSBuZWVkIGFz c2lzdGFuY2UgZnJvbSBkYWVtb24ncw0KPiBydW5uaW5nDQo+ID4gaW4gdXNlciBzcGFjZS4gSW5j cmVhc2UgdGhlIHRpbWVvdXQgc28gd2UgZG9uJ3QgcHJlbWF0dXJlbHkgdGVybWluYXRlDQo+ID4g dGhlIHRyYW5zYWN0aW9uIGluIHRoZSBrZXJuZWwuDQo+IA0KPiBJcyB0aGlzIGFuIGFyYml0cmFy eSBudW1iZXIsIG9yIGRvZXMgdGhlIGhvc3QgYWxsb3cgc3VjaCBhIGxhcmdlIGRlbGF5DQo+IGZv ciB0aGUgcmVzcG9uc2U/DQoNCkNoZWNrZWQgd2l0aCB0aGUgaG9zdCBndXlzIGFuZCBpdCBsb29r cyBsaWtlIGhvc3Qgc2V0cyB1cCBhIDYwIA0Kc2Vjb25kIHRpbWVvdXQgZm9yIGVhY2ggdHJhbnNh Y3Rpb24gYW5kIGlmIGl0IHRpbWVzIG91dDsgaXQgbWF5IHJldHJ5Lg0KDQpBbnl0aGluZyBiZWxv dyA2MCBzZWNvbmRzIHNob3VsZCB3b3JrIGZvciB1cy4NCg0KSSB3aWxsIGFkZCB0aGlzIHRvIHRo ZSBjb21taXQgbG9nLg0KDQpLLiBZIA0KPiANCj4gT2xhZg0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web