Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2023 09:49:27 +0000
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        Souradeep Chakrabarti <schakrabarti@microsoft.com>
Cc:        "freebsd-arm@FreeBSD.org" <freebsd-arm@FreeBSD.org>, Li-Wen Hsu <lwhsu@freebsd.org>, Wei Hu <weh@microsoft.com>
Subject:   Re: [EXTERNAL] MSI  CPU affinity for ARM64
Message-ID:  <1125C96F-0621-4B62-9E94-742E28F6FA7A@fubar.geek.nz>
In-Reply-To: <PSAP153MB05368A53B76615C724CE59DDCCFE9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>
References:  <PSAP153MB0536DE0C63CFD99B65406F87CCF89@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <C9FA2D79-C36B-4841-8D99-71A161756559@fubar.geek.nz> <PSAP153MB05368A53B76615C724CE59DDCCFE9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 9 Jan 2023, at 15:24, Souradeep Chakrabarti =
<schakrabarti@microsoft.com> wrote:
>=20
>=20
>=20
>=20
>> -----Original Message-----
>> From: Andrew Turner <andrew@fubar.geek.nz>
>> Sent: Monday, January 9, 2023 5:14 PM
>> To: Souradeep Chakrabarti <schakrabarti@microsoft.com>
>> Cc: freebsd-arm@FreeBSD.org; Li-Wen Hsu <lwhsu@freebsd.org>; Wei Hu
>> <weh@microsoft.com>
>> 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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1125C96F-0621-4B62-9E94-742E28F6FA7A>