All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Drivers: hv: vmbus: Some miscellaneous fixes
@ 2016-09-07 12:38 kys
  2016-09-07 12:39 ` [PATCH 1/2] Driver: hv: vmbus: Make mmio resource local kys
  0 siblings, 1 reply; 3+ messages in thread
From: kys @ 2016-09-07 12:38 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
	leann.ogasawara, alexng
  Cc: K. Y. Srinivasan

From: K. Y. Srinivasan <kys@microsoft.com>

Some miscellaneous fixes.

Dexuan Cui (1):
  Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings

Stephen Hemminger (1):
  Driver: hv: vmbus: Make mmio resource local

 drivers/hv/channel_mgmt.c |   26 ++++++++++++++++++++++++--
 drivers/hv/vmbus_drv.c    |    4 ++--
 include/linux/hyperv.h    |   21 +++++++++++++++++++++
 3 files changed, 47 insertions(+), 4 deletions(-)

-- 
1.7.4.1

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

* [PATCH 1/2] Driver: hv: vmbus: Make mmio resource local
  2016-09-07 12:38 [PATCH 0/2] Drivers: hv: vmbus: Some miscellaneous fixes kys
@ 2016-09-07 12:39 ` kys
  2016-09-07 12:39   ` [PATCH 2/2] Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings kys
  0 siblings, 1 reply; 3+ messages in thread
From: kys @ 2016-09-07 12:39 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
	leann.ogasawara, alexng
  Cc: Stephen Hemminger, K. Y. Srinivasan

From: Stephen Hemminger <sthemmin@microsoft.com>

This fixes a sparse warning because hyperv_mmio resources
are only used in this one file and should be static.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/vmbus_drv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index fedf629..6cbe074 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -105,8 +105,8 @@ static struct notifier_block hyperv_panic_block = {
 
 static const char *fb_mmio_name = "fb_range";
 static struct resource *fb_mmio;
-struct resource *hyperv_mmio;
-DEFINE_SEMAPHORE(hyperv_mmio_lock);
+static struct resource *hyperv_mmio;
+static DEFINE_SEMAPHORE(hyperv_mmio_lock);
 
 static int vmbus_exists(void)
 {
-- 
1.7.4.1

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

* [PATCH 2/2] Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings
  2016-09-07 12:39 ` [PATCH 1/2] Driver: hv: vmbus: Make mmio resource local kys
@ 2016-09-07 12:39   ` kys
  0 siblings, 0 replies; 3+ messages in thread
From: kys @ 2016-09-07 12:39 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
	leann.ogasawara, alexng
  Cc: Dexuan Cui, K. Y. Srinivasan

From: Dexuan Cui <decui@microsoft.com>

Some VMBus devices are not needed by Linux guest[1][2], and, VMBus channels
of Hyper-V Sockets don't really mean usual synthetic devices, so let's
suppress the warnings for them.

[1] https://support.microsoft.com/en-us/kb/2925727
[2] https://msdn.microsoft.com/en-us/library/jj980180(v=winembedded.81).aspx

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel_mgmt.c |   26 ++++++++++++++++++++++++--
 include/linux/hyperv.h    |   21 +++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index bbd812e..759ba4d 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -139,10 +139,32 @@ static const struct vmbus_device vmbus_devs[] = {
 	},
 };
 
-static u16 hv_get_dev_type(const uuid_le *guid)
+static const struct {
+	uuid_le guid;
+} vmbus_unsupported_devs[] = {
+	{ HV_AVMA1_GUID },
+	{ HV_AVMA2_GUID },
+	{ HV_RDV_GUID	},
+};
+
+static bool is_unsupported_vmbus_devs(const uuid_le *guid)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(vmbus_unsupported_devs); i++)
+		if (!uuid_le_cmp(*guid, vmbus_unsupported_devs[i].guid))
+			return true;
+	return false;
+}
+
+static u16 hv_get_dev_type(const struct vmbus_channel *channel)
 {
+	const uuid_le *guid = &channel->offermsg.offer.if_type;
 	u16 i;
 
+	if (is_hvsock_channel(channel) || is_unsupported_vmbus_devs(guid))
+		return HV_UNKOWN;
+
 	for (i = HV_IDE; i < HV_UNKOWN; i++) {
 		if (!uuid_le_cmp(*guid, vmbus_devs[i].guid))
 			return i;
@@ -426,7 +448,7 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
 			goto err_free_chan;
 	}
 
-	dev_type = hv_get_dev_type(&newchannel->offermsg.offer.if_type);
+	dev_type = hv_get_dev_type(newchannel);
 	if (dev_type == HV_NIC)
 		set_channel_signal_state(newchannel, HV_SIGNAL_POLICY_EXPLICIT);
 
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 613074e..430619a 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1315,6 +1315,27 @@ u64 hv_do_hypercall(u64 control, void *input, void *output);
 			0x80, 0x2e, 0x27, 0xed, 0xe1, 0x9f)
 
 /*
+ * Linux doesn't support the 3 devices: the first two are for
+ * Automatic Virtual Machine Activation, and the third is for
+ * Remote Desktop Virtualization.
+ * {f8e65716-3cb3-4a06-9a60-1889c5cccab5}
+ * {3375baf4-9e15-4b30-b765-67acb10d607b}
+ * {276aacf4-ac15-426c-98dd-7521ad3f01fe}
+ */
+
+#define HV_AVMA1_GUID \
+	.guid = UUID_LE(0xf8e65716, 0x3cb3, 0x4a06, 0x9a, 0x60, \
+			0x18, 0x89, 0xc5, 0xcc, 0xca, 0xb5)
+
+#define HV_AVMA2_GUID \
+	.guid = UUID_LE(0x3375baf4, 0x9e15, 0x4b30, 0xb7, 0x65, \
+			0x67, 0xac, 0xb1, 0x0d, 0x60, 0x7b)
+
+#define HV_RDV_GUID \
+	.guid = UUID_LE(0x276aacf4, 0xac15, 0x426c, 0x98, 0xdd, \
+			0x75, 0x21, 0xad, 0x3f, 0x01, 0xfe)
+
+/*
  * Common header for Hyper-V ICs
  */
 
-- 
1.7.4.1

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

end of thread, other threads:[~2016-09-07 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 12:38 [PATCH 0/2] Drivers: hv: vmbus: Some miscellaneous fixes kys
2016-09-07 12:39 ` [PATCH 1/2] Driver: hv: vmbus: Make mmio resource local kys
2016-09-07 12:39   ` [PATCH 2/2] Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings kys

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.