From nobody Tue Jan 10 09:49:27 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NrmHg2zWkz2p2VT for ; Tue, 10 Jan 2023 09:49:35 +0000 (UTC) (envelope-from bT.7i6f7j5d30=ha8y5gqb0sxa=wzk96x5ewo@em790814.fubar.geek.nz) Received: from e2i580.smtp2go.com (e2i580.smtp2go.com [103.2.142.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NrmHg1J7Nz4QLm for ; Tue, 10 Jan 2023 09:49:34 +0000 (UTC) (envelope-from bT.7i6f7j5d30=ha8y5gqb0sxa=wzk96x5ewo@em790814.fubar.geek.nz) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1673345074; h=Feedback-ID: X-Smtpcorp-Track:To:Message-Id:Date:From:Subject:Reply-To:Sender: List-Unsubscribe; bh=c7/Phlvu5/ryozThrocG3lJottaq4Eo/733kyf2kEow=; b=rXj+shGg eLQhe8RnYOyVKqUiwvhwK9ffVSp7ItFVYCwPzNuRMHrAZhOz4Zb0crgN9KSAIlmaUKx57u4W/7Mfs 631jBdEyT6Yl9fhvEDc7I4lS5V2rrB4O8m4sEvXhbH85PjwxvJQ8/JLu9gmgZB/tK9Fgg18uC+pIX kUKF/EYxta0KO6mJwyEkbLKKc/HcP1jod/EtVRfqqa+xvHZZWzhkhLO5g5TiEfVDKoMEJK+Tc3Nu5 Zhm/Qo1O8ymmdyKM+lSfNOg6sBTR2cBZtjt/B2AlFcUDxhkLNhmF7OkWE66otzyT5H1jGZVo5OwIz 2ZIH1KtpOA5b/F+nd6qSuhhppQ==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1673344174; h=from : subject : to : message-id : date; bh=c7/Phlvu5/ryozThrocG3lJottaq4Eo/733kyf2kEow=; b=ZY4q8tOsn2mvF1/2XX5QYQE4Cs+X7cSHfMcx5Ggnop/jwQZfLJ1eQWAU+KWx9TO9XoXlc uJcom9PCUDD835ioxxYB7ZZhCrTJeejHi9hP53qFU7qfv3UdPy03DVbc0E7Pz3yyzf/jwzA WmOtb5Ize2qFUHS+G5DdFTIaDiD4l3kCB6w4NKT2IPE7qLkBWgsKk9M8xgTJi1SUvL8CuZu kWbuzMzLy3A4XFkVWHzIG+QsFp4kwVKzzHpkbM/lNHClzERa2BBKkyMb15GvalBzKzEW4+5 DC11PyDzLBT/Zh8X7YljPdfhywYKMM/jHwLCe7dRHNwopFq0iabNUhyWoarA== Received: from [10.176.58.103] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1pFBG7-qt4Klj-Hx; Tue, 10 Jan 2023 09:49:31 +0000 Received: from [10.162.55.164] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1pFBG7-9EFa7W-15; Tue, 10 Jan 2023 09:49:31 +0000 Received: from smtpclient.apple (cpc91214-cmbg18-2-0-cust234.5-4.cable.virginm.net [81.102.75.235]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id B54D62B60E; Tue, 10 Jan 2023 09:49:27 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [EXTERNAL] MSI CPU affinity for ARM64 From: Andrew Turner In-Reply-To: Date: Tue, 10 Jan 2023 09:49:27 +0000 Cc: "freebsd-arm@FreeBSD.org" , Li-Wen Hsu , Wei Hu Content-Transfer-Encoding: quoted-printable Message-Id: <1125C96F-0621-4B62-9E94-742E28F6FA7A@fubar.geek.nz> References: To: Souradeep Chakrabarti X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Smtpcorp-Track: 1pFUG79EFa7W15.v-SqsSW1ojMGr Feedback-ID: 790814m:790814amQcrys:790814sMXO6gYsSB X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Rspamd-Queue-Id: 4NrmHg1J7Nz4QLm X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > On 9 Jan 2023, at 15:24, Souradeep Chakrabarti = wrote: >=20 >=20 >=20 >=20 >> -----Original Message----- >> From: Andrew Turner >> Sent: Monday, January 9, 2023 5:14 PM >> To: Souradeep Chakrabarti >> Cc: freebsd-arm@FreeBSD.org; Li-Wen Hsu ; Wei Hu >> >> Subject: [EXTERNAL] Re: MSI CPU affinity for ARM64 >>=20 >> Hello Souradeep, >>=20 >> In what driver do you need to query the CPU affinity? In the GICv3 = driver you can >> read the set of CPUs from isrc->isrc_cpu. In other drivers it appears = to be more >> difficult. >>=20 >> Andrew > [Souradeep]=20 > I am trying to get the CPU id from vmbus_pcib driver. > I need to find for the MSI interrupt, what is the CPUid. If the MSI is for a child of vmbus_pcib you might be able to get this by = implementing the bus_bind_intr method, however I don=E2=80=99t think = you=E2=80=99ll see the default CPU assignment. Why do you need the CPU ID in the vmbus_pcib driver? It=E2=80=99s stored = in struct intr_event which could be found by adding a bus_setup_intr = method that extracts it from the cookie passed back to the driver. This = does require the driver to know the type for the cookie. On arm64 it = should be a struct intr_handler that contains a pointer to a struct = intr_event that has either the CPU the interrupt is assigned to or = NOCPU. Having said that I=E2=80=99m not sure how safe it is to assume = the cookie is a pointer to the intr_handler. Andrew=