lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240604050940.859909-6-mhklinux@outlook.com>
Date: Mon,  3 Jun 2024 22:09:33 -0700
From: mhkelley58@...il.com
To: kys@...rosoft.com,
	haiyangz@...rosoft.com,
	wei.liu@...nel.org,
	decui@...rosoft.com,
	tglx@...utronix.de,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com,
	x86@...nel.org,
	hpa@...or.com,
	lpieralisi@...nel.org,
	kw@...ux.com,
	robh@...nel.org,
	bhelgaas@...gle.com,
	James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com,
	arnd@...db.de,
	linux-hyperv@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org,
	linux-scsi@...r.kernel.org,
	linux-arch@...r.kernel.org
Cc: maz@...nel.org,
	den@...inux.co.jp,
	jgowans@...zon.com,
	dawei.li@...ngroup.cn
Subject: [RFC 05/12] scsi: storvsc: Annotate the VMBus channel IRQ name

From: Michael Kelley <mhklinux@...look.com>

In preparation for assigning Linux IRQs to VMBus channels, annotate the
IRQ name in the VMBus channels used by the virtual IDE, SCSI, and Fibre
Channel controllers in a Hyper-V guest. Distinguish the primary channel
and sub-channels with "pri" and "sub" prefixes. Identify controllers
with a numeric suffix that matches the numeric part of the "host<n>"
name displayed by "lsscsi" and SCSI-related entries in sysfs.

Signed-off-by: Michael Kelley <mhklinux@...look.com>
---
 drivers/scsi/storvsc_drv.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 7ceb982040a5..11b3fc3b24c9 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -686,6 +686,8 @@ static void handle_sc_creation(struct vmbus_channel *new_sc)
 	new_sc->max_pkt_size = STORVSC_MAX_PKT_SIZE;
 
 	new_sc->next_request_id_callback = storvsc_next_request_id;
+	snprintf(new_sc->irq_name, VMBUS_CHAN_IRQ_NAME_MAX, "sub@...rvsc%d",
+			stor_device->host->host_no);
 
 	ret = vmbus_open(new_sc,
 			 aligned_ringbuffer_size,
@@ -1322,6 +1324,7 @@ static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size,
 				  bool is_fc)
 {
 	struct vmstorage_channel_properties props;
+	struct storvsc_device *stor_device;
 	int ret;
 
 	memset(&props, 0, sizeof(struct vmstorage_channel_properties));
@@ -1329,6 +1332,12 @@ static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size,
 	device->channel->max_pkt_size = STORVSC_MAX_PKT_SIZE;
 	device->channel->next_request_id_callback = storvsc_next_request_id;
 
+	stor_device = get_out_stor_device(device);
+	if (!stor_device)
+		return -EINVAL;
+	snprintf(device->channel->irq_name, VMBUS_CHAN_IRQ_NAME_MAX, "pri@...rvsc%d",
+			stor_device->host->host_no);
+
 	ret = vmbus_open(device->channel,
 			 ring_size,
 			 ring_size,
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ