public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Drivers: hv: Some miscellaneous fixes
@ 2015-07-03 23:30 K. Y. Srinivasan
  2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
  0 siblings, 1 reply; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: K. Y. Srinivasan

Some miscellaneous fixes.

Dan Carpenter (1):
  hv: util: checking the wrong variable

Denis V. Lunev (1):
  mshyperv: fix recognition of Hyper-V guest crash MSR's

K. Y. Srinivasan (1):
  Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs

Nik Nyby (1):
  Drivers: hv: vmbus: fix typo in hv_port_info struct

Vitaly Kuznetsov (1):
  Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2
    hosts

 arch/x86/include/asm/mshyperv.h |    1 +
 arch/x86/kernel/cpu/mshyperv.c  |    1 +
 drivers/hv/channel_mgmt.c       |    5 +++++
 drivers/hv/hv_utils_transport.c |    2 +-
 drivers/hv/hyperv_vmbus.h       |    2 +-
 drivers/hv/vmbus_drv.c          |    4 ++--
 6 files changed, 11 insertions(+), 4 deletions(-)

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] hv: util: checking the wrong variable
  2015-07-03 23:30 [PATCH 0/5] Drivers: hv: Some miscellaneous fixes K. Y. Srinivasan
@ 2015-07-03 23:30 ` K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 2/5] Drivers: hv: vmbus: fix typo in hv_port_info struct K. Y. Srinivasan
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: Dan Carpenter, K. Y. Srinivasan

From: Dan Carpenter <dan.carpenter@oracle.com>

We don't catch this allocation failure because there is a typo and we
check the wrong variable.

Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/hv_utils_transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
index ea7ba5e..6a9d80a 100644
--- a/drivers/hv/hv_utils_transport.c
+++ b/drivers/hv/hv_utils_transport.c
@@ -186,7 +186,7 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len)
 		return -EINVAL;
 	} else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
 		cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
-		if (!msg)
+		if (!cn_msg)
 			return -ENOMEM;
 		cn_msg->id.idx = hvt->cn_id.idx;
 		cn_msg->id.val = hvt->cn_id.val;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] Drivers: hv: vmbus: fix typo in hv_port_info struct
  2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
@ 2015-07-03 23:30   ` K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 3/5] Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2 hosts K. Y. Srinivasan
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: Nik Nyby, K. Y. Srinivasan

From: Nik Nyby <nikolas@gnu.org>

This fixes a typo: base_flag_bumber to base_flag_number

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/hyperv_vmbus.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index cddc0c9..6383707 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -141,7 +141,7 @@ struct hv_port_info {
 		struct {
 			u32 target_sint;
 			u32 target_vp;
-			u16 base_flag_bumber;
+			u16 base_flag_number;
 			u16 flag_count;
 			u32 rsvdz;
 		} event_port_info;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2 hosts
  2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 2/5] Drivers: hv: vmbus: fix typo in hv_port_info struct K. Y. Srinivasan
@ 2015-07-03 23:30   ` K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 4/5] mshyperv: fix recognition of Hyper-V guest crash MSR's K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 5/5] Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs K. Y. Srinivasan
  3 siblings, 0 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: K. Y. Srinivasan

From: Vitaly Kuznetsov <vkuznets@redhat.com>

Pre-Win2012R2 hosts don't properly handle CHANNELMSG_UNLOAD and
wait_for_completion() hangs. Avoid sending such request on old hosts.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel_mgmt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 4506a66..00ba3f3 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -469,6 +469,10 @@ void vmbus_initiate_unload(void)
 {
 	struct vmbus_channel_message_header hdr;
 
+	/* Pre-Win2012R2 hosts don't support reconnect */
+	if (vmbus_proto_version < VERSION_WIN8_1)
+		return;
+
 	init_completion(&vmbus_connection.unload_event);
 	memset(&hdr, 0, sizeof(struct vmbus_channel_message_header));
 	hdr.msgtype = CHANNELMSG_UNLOAD;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] mshyperv: fix recognition of Hyper-V guest crash MSR's
  2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 2/5] Drivers: hv: vmbus: fix typo in hv_port_info struct K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 3/5] Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2 hosts K. Y. Srinivasan
@ 2015-07-03 23:30   ` K. Y. Srinivasan
  2015-07-03 23:30   ` [PATCH 5/5] Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs K. Y. Srinivasan
  3 siblings, 0 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: Denis V. Lunev, Andrey Smetanin, K. Y. Srinivasan

From: Denis V. Lunev <den@openvz.org>

Hypervisor Top Level Functional Specification v3.1/4.0 notes that cpuid
(0x40000003) EDX's 10th bit should be used to check that Hyper-V guest
crash MSR's functionality available.

This patch should fix this recognition. Currently the code checks EAX
register instead of EDX.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 arch/x86/include/asm/mshyperv.h |    1 +
 arch/x86/kernel/cpu/mshyperv.c  |    1 +
 drivers/hv/vmbus_drv.c          |    4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index d02f9c9..aaf59b7 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -7,6 +7,7 @@
 
 struct ms_hyperv_info {
 	u32 features;
+	u32 misc_features;
 	u32 hints;
 };
 
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 1a6e742..9b5d7b5 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -160,6 +160,7 @@ static void __init ms_hyperv_init_platform(void)
 	 * Extract the features and hints
 	 */
 	ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES);
+	ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
 	ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
 
 	printk(KERN_INFO "HyperV: features 0x%x, hints 0x%x\n",
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 83759c1..8c3eaee 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -868,7 +868,7 @@ static int vmbus_bus_init(int irq)
 	/*
 	 * Only register if the crash MSRs are available
 	 */
-	if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
+	if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
 		register_die_notifier(&hyperv_die_block);
 		atomic_notifier_chain_register(&panic_notifier_list,
 					       &hyperv_panic_block);
@@ -1313,7 +1313,7 @@ static void __exit vmbus_exit(void)
 	hv_remove_vmbus_irq();
 	tasklet_kill(&msg_dpc);
 	vmbus_free_channels();
-	if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
+	if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
 		unregister_die_notifier(&hyperv_die_block);
 		atomic_notifier_chain_unregister(&panic_notifier_list,
 						 &hyperv_panic_block);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs
  2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
                     ` (2 preceding siblings ...)
  2015-07-03 23:30   ` [PATCH 4/5] mshyperv: fix recognition of Hyper-V guest crash MSR's K. Y. Srinivasan
@ 2015-07-03 23:30   ` K. Y. Srinivasan
  3 siblings, 0 replies; 6+ messages in thread
From: K. Y. Srinivasan @ 2015-07-03 23:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang
  Cc: K. Y. Srinivasan

We cycle through all the "high performance" channels to distribute
load across the available CPUs. Process the NetworkDirect as a
high performance device.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel_mgmt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 00ba3f3..30613df 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -347,6 +347,7 @@ enum {
 	IDE = 0,
 	SCSI,
 	NIC,
+	ND_NIC,
 	MAX_PERF_CHN,
 };
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-03 22:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-03 23:30 [PATCH 0/5] Drivers: hv: Some miscellaneous fixes K. Y. Srinivasan
2015-07-03 23:30 ` [PATCH 1/5] hv: util: checking the wrong variable K. Y. Srinivasan
2015-07-03 23:30   ` [PATCH 2/5] Drivers: hv: vmbus: fix typo in hv_port_info struct K. Y. Srinivasan
2015-07-03 23:30   ` [PATCH 3/5] Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2 hosts K. Y. Srinivasan
2015-07-03 23:30   ` [PATCH 4/5] mshyperv: fix recognition of Hyper-V guest crash MSR's K. Y. Srinivasan
2015-07-03 23:30   ` [PATCH 5/5] Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs K. Y. Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox