From nobody Mon Jan 9 15:24:03 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 4NrHmB1LvMz2sJVN for ; Mon, 9 Jan 2023 15:24:10 +0000 (UTC) (envelope-from schakrabarti@microsoft.com) Received: from HK2P15301CU002-vft-obe.outbound.protection.outlook.com (mail-eastasiaazon11020021.outbound.protection.outlook.com [52.101.128.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NrHm94q3pz3wC4; Mon, 9 Jan 2023 15:24:09 +0000 (UTC) (envelope-from schakrabarti@microsoft.com) Authentication-Results: mx1.freebsd.org; none ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioxuZacrbdr+Mk6nTiyTqLHKRJrUbGBg6flRBEZYjS8w100hw/7o2/aDtEyoo6XbwsDLmaO7bXfZnqr2q1uw3qkv8Km7wwRqNNOk5qXYsR5upBbZftxSgYUK29rs74aDgN711973Pf+aYReW/P0tpaW5u1n0MKGMWYz3LlBn50Yc/Vc9mAZY+fERUe1EK2kfj8/0hei2YwpAZW2yjQwjRxpV0ixQSegsPCnyVDEdWQCC7QSePMiwTPwai1HiBW2IvWUod3C0qq0kmri8tVnlO+j0LMfFi0ym/LTi85pLcgk0BPViVNuwTvF5+EdLcU4PZV1Y9m2DGHL0Az01TzkYJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ELDWDrXVZCuEIMRggfUw4Yjz39PrrhRWk3rM3fo9aTQ=; b=dHiPHM8aVAXAr1QacxbcIHp2c0knd/zzZq4VcseLPCXV6AGzGMb4Ffxq+2HjQuDUno3GHZOHX6zNN5Q+7CNxyR4ZP1hdWyJxqdS/bbS4hvHe5Kolar8kRwxWvxLnCtCDPosRrUfjUJNIOyosg4ubxQ/fzElKkSk3JzUlZ+cGgW0MiYLAUQPJGz1V6ltWBTMfHar+F6zx//I9DZb/F0bPXgyvhYPm2Fx6XkSFWVQ0lShntTLujAv8bD/Xd9F8gkBVAwMH5HD/nchM2vPoNcek7q23RADGZWWFZyc1CT8djeulyOfKUgqLk4Zqgbw5/ce+AKM+ur2ij+NovcyroyQpoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ELDWDrXVZCuEIMRggfUw4Yjz39PrrhRWk3rM3fo9aTQ=; b=R6gvU4CU4BwdMme0brfHqezPybrP1QVVI6japFgbC0rD9wgYwcoHIHdO/Lgm5/5wKjf0LKOj6F11FZi+3iwQFprX5QGE92OR1bgvt0ZrivjHfvFrPJp5o9zvxbzTzcnRh1VtKO9RaqB5FuO7+WBDLrjctli3LF6ZoDH6LLNQp8E= Received: from PSAP153MB0536.APCP153.PROD.OUTLOOK.COM (2603:1096:301:75::14) by TYZP153MB0413.APCP153.PROD.OUTLOOK.COM (2603:1096:400:2e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.3; Mon, 9 Jan 2023 15:24:04 +0000 Received: from PSAP153MB0536.APCP153.PROD.OUTLOOK.COM ([fe80::9cbf:40b9:40ce:290]) by PSAP153MB0536.APCP153.PROD.OUTLOOK.COM ([fe80::9cbf:40b9:40ce:290%5]) with mapi id 15.20.6023.003; Mon, 9 Jan 2023 15:24:04 +0000 From: Souradeep Chakrabarti To: Andrew Turner CC: "freebsd-arm@FreeBSD.org" , Li-Wen Hsu , Wei Hu Subject: RE: [EXTERNAL] Re: MSI CPU affinity for ARM64 Thread-Topic: [EXTERNAL] Re: MSI CPU affinity for ARM64 Thread-Index: Adkio8F3khe3N5kdTvWiOLlk332lhABe/DwAAAAgSnA= Date: Mon, 9 Jan 2023 15:24:03 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=e60a41b1-6b9d-4e21-8b05-0163f91ff934;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-01-09T11:47:50Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PSAP153MB0536:EE_|TYZP153MB0413:EE_ x-ms-office365-filtering-correlation-id: aff743d1-11fa-4208-68f1-08daf2558aa6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZD1uuMLC6kY8VFjINKUDuQRn4sBW+w+KvBw+yLce5cAs9iZKjxAzswG8tl58tHCjNrYzAxlpW6yjOZvF0BNQTRZbFPEka6VbutCV/sg/efamwoeRL5f9Z+zqBXbwZrhBhvVJr3Brzc1i8CFR9tP/baoLLOkx2PfLqqXEOUSOeWeFx0n8RZ0WtI9j/mTtcD0fetQNQ6yUamMEYqSVUTftmL0WnjfRrGVJICn725VvxJtRzfOhtvV21vAh6vGfLh4W9bVkS1nJn8o0d4PZ4SaowR3iC3366RFiS7067eDPoH+aK90LyoYvbHPet8WEowTly9mpFM+GRWK4ToWz/Erl4s4duqmIXymortCr8Yoa9anrnPjZoAI72PDnis68CdZKscXPhC+FAvsNt/bi1RrKvpaV8KQcOOebCBvuCWq1dpuNgyud71Fa6QKNA+Yc2D/M+ECEMlCZlJMjz/aDTGxodxaWHaJxu5PEc6Iztgbr/a6Xl6u8mlGfBNdtTRM97PrDD+ZCLIuS0LWdJtKd2uwSunfJPD154cizU2tpRX1w8dzq68YOQoDZGTwMLF7yK1Vk34yK+/i9fi1EbBCL5EsmJLcJJ3j7w2YlIroAw9NKhuAhg+3Hju6KYmGIa6QKirfsUA8IgLb2/mf3yzwA4Ku+nx8LB9Dae6lG297MxarwhVISTIBH4FWAiidoIsyw9itxZr/KHzKRvsYzlv82X/ZOzWqHT/jKoj4IkUn2McEr+N5rZHML513toJzPYmNG14VY x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PSAP153MB0536.APCP153.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(376002)(346002)(366004)(396003)(451199015)(478600001)(82960400001)(82950400001)(54906003)(86362001)(66476007)(38100700002)(122000001)(66446008)(5660300002)(38070700005)(66946007)(76116006)(4326008)(8676002)(66556008)(64756008)(8936002)(316002)(41300700001)(52536014)(71200400001)(7696005)(8990500004)(83380400001)(33656002)(2906002)(10290500003)(53546011)(6916009)(6506007)(186003)(9686003)(107886003)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5uNwK0bJ+c69DBIZCduFAvqhGXS6Ein4BTND2U4bBBVuL3tWQeYppmbCHBrh?= =?us-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Vz+PbhXqqclqkaWkIPaiNk?= =?us-ascii?Q?HzUSrCbymGyx9vTzDVQPFrvPnB48agiIxuG3aEIYMnuNdlvuHLAQeHPJDCxV?= =?us-ascii?Q?iOq2M5tdVBSmUuO+ewcaJQwY4ha0ShETSFDCN8jQ4LQH7eW3DdqidShJvR57?= =?us-ascii?Q?vgnVKYE7mSPpcM8twBlG41h3IBtNxTbyrEhbl3CKxbzbN3cvODXAk03TAKsr?= =?us-ascii?Q?sgczTZ4vLxqy7CE8Z+hAp4SQsLLYxp6rCxCHIuGLzfejcZ8Mwo/ERQxWMZTQ?= =?us-ascii?Q?VN5ofXYwWH6kmcuKzD/bXP6Qs1aMxG/zMDiYlgXnDBnvCusjv7NNszmQRGy0?= =?us-ascii?Q?YZie7NoYdC4ZXC6vic1Sdv4jPYFZB/wEQMW2NgfU3ulESD/mor3Otc9U4cji?= =?us-ascii?Q?uWfXVXRapwG0mFkLHpZNAbzctTMtYWN4sFv/b4C1SiuP+P4xph4Wi2X9K7xN?= =?us-ascii?Q?WGe6W2iJ+xMvZvK5C4KmE3qI6RwVWzWYtQ3R+4tAPTG5EeXbT9QY1hGn9Kqe?= =?us-ascii?Q?2ZND9rQ64OEF/kakC2RWk1o5au28PEm9fmKTKvWMrg0ye86buQimUOC3EeBc?= =?us-ascii?Q?8UH8mmzQDYVmPpShN7jm+8NwY89toODS+Q2ODBmQpAG3zgjs0Mx8NPtnW03j?= =?us-ascii?Q?3PH3Illx40JMrLJ/btK7eqSehH9u9jJ80t2oe/w6?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PSAP153MB0536.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: aff743d1-11fa-4208-68f1-08daf2558aa6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2023 15:24:03.8493 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JY+e76CpVAt2a2FyJYd/LSLQUWFrJl+HLQWJzKUJYkvZY5SszZS/QPdteydzVACJxTuMktvahaybLXT2BDLphpD7ADHJHgoo8x2mAX0C7Qk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZP153MB0413 X-Rspamd-Queue-Id: 4NrHm94q3pz3wC4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8075, ipnet:52.96.0.0/12, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > -----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. >=20 > > On 7 Jan 2023, at 14:53, Souradeep Chakrabarti > wrote: > > > > Hi, > > I am trying to understand how we can find the target CPU for MSI in AR= M64. > > When looking at gic_v3 code I can see following: > > gic_v3_bind_intr( ) does mapping to next incremental CPU but > > gic_v3_dist_init( ) does setup boot cpu as the target CPU for MSI inter= rupts. > > > > If I need to find the CPU bound with a particular MSI interrupt, how we= can do > that? > > > > Also is there a way get the the CPU id from the CPU affinity in ARM? > > > > Thanks & Regards, > > Souradeep > >