Drivers: hv: Some miscellaneous fixes
Subsystems (2)
cover Drivers: hv: Some miscellaneous fixes
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(-)
Signature · 1 line
1.7.4.1
PATCH 1/5 hv: util: checking the wrong variable
From: Dan Carpenter <[email protected]>
We don't catch this allocation failure because there is a typo and we check the wrong variable.
--- drivers/hv/hv_utils_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hv/hv_utils_transport.c +1 -1
@@ -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;
Signature · 1 line
1.7.4.1
PATCH 2/5 Drivers: hv: vmbus: fix typo in hv_port_info struct
From: Nik Nyby <[email protected]>
This fixes a typo: base_flag_bumber to base_flag_number
--- drivers/hv/hyperv_vmbus.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hv/hyperv_vmbus.h +1 -1
@@ -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;
Signature · 1 line
1.7.4.1
PATCH 3/5 Drivers: hv: vmbus: don't send CHANNELMSG_UNLOAD on pre-Win2012R2 hosts
In reply to K. Y. SrinivasanFrom: Vitaly Kuznetsov <[email protected]>
Pre-Win2012R2 hosts don't properly handle CHANNELMSG_UNLOAD and wait_for_completion() hangs. Avoid sending such request on old hosts.
--- drivers/hv/channel_mgmt.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/hv/channel_mgmt.c +4 -0
@@ -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 ;
Signature · 1 line
1.7.4.1
PATCH 4/5 mshyperv: fix recognition of Hyper-V guest crash MSR's
In reply to K. Y. SrinivasanFrom: Denis V. Lunev <[email protected]>
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.
--- 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(-)
arch/x86/include/asm/mshyperv.h +1 -0
@@ -7,6 +7,7 @@struct ms_hyperv_info {u32 features; +u32 misc_features;u32 hints; };
arch/x86/kernel/cpu/mshyperv.c +1 -0
@@ -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",
drivers/hv/vmbus_drv.c +2 -2
@@ -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);
Signature · 1 line
1.7.4.1
PATCH 5/5 Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs
In reply to K. Y. SrinivasanWe cycle through all the "high performance" channels to distribute load across the available CPUs. Process the NetworkDirect as a high performance device.
--- drivers/hv/channel_mgmt.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hv/channel_mgmt.c +1 -0
@@ -347,6 +347,7 @@ enum {IDE =0 ,SCSI ,NIC , +ND_NIC , MAX_PERF_CHN, };
Signature · 1 line
1.7.4.1