2018-03-03 03:55:01

by Dexuan Cui

[permalink] [raw]
Subject: [PATCH] Drivers: hv: vmbus: respect what we get from hv_get_synint_state()

I didn't really hit a bug, but just happened to notice the redundant line.

Signed-off-by: Dexuan Cui <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
Cc: [email protected]
---
drivers/hv/hv.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index fe96aab9e794..2bdb2bba911e 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -252,7 +252,6 @@ int hv_synic_init(unsigned int cpu)
hv_get_synint_state(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,
shared_sint.as_uint64);

- shared_sint.as_uint64 = 0;
shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
shared_sint.masked = false;
if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED)
--
2.7.4


2018-03-03 03:56:21

by Dexuan Cui

[permalink] [raw]
Subject: [PATCH] Drivers: hv: vmbus: do not mark HV_PCIE as perf_device

The pci-hyperv driver's channel callback hv_pci_onchannelcallback() is not
really a hot path, so we don't need to mark it as a perf_device, meaning
with this patch all HV_PCIE channels' target_cpu will be CPU0.

This patch can help to avoid a potential ABBA deadlock in the busy loop
of Hyper-V PCI driver's hv_compose_msi_msg().

Signed-off-by: Dexuan Cui <[email protected]>
Cc: [email protected]
Cc: Stephen Hemminger <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
---
drivers/hv/channel_mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index c21020b69114..55ee5e87073a 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -71,7 +71,7 @@ static const struct vmbus_device vmbus_devs[] = {
/* PCIE */
{ .dev_type = HV_PCIE,
HV_PCIE_GUID,
- .perf_device = true,
+ .perf_device = false,
},

/* Synthetic Frame Buffer */
--
2.7.4