From nobody Wed Nov 2 13:24:01 2022 X-Original-To: freebsd-hackers@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 4N2SKD71lnz4h96D for ; Wed, 2 Nov 2022 13:24:16 +0000 (UTC) (envelope-from bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz) Received: from e2i251.smtp2go.com (e2i251.smtp2go.com [103.2.140.251]) (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 4N2SK96pPnz3CNN for ; Wed, 2 Nov 2022 13:24:13 +0000 (UTC) (envelope-from bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1667396353; h=Feedback-ID: X-Smtpcorp-Track:To:Message-Id:Date:From:Subject:Reply-To:Sender: List-Unsubscribe; bh=k+TRGyPuspNBNciy7OhIOd1ZzeEiuR1wDmJ94SBrE0U=; b=LKdl+K40 M5v0kvzbmwpp+jX51Oq3QtRFbswfzpfHuPg/Hamb5/f71tjs1ZPCZ02Rz/7BQKKyvEL6yHSmyYAwz Y9TDvHdpMc/HM7UNJAaL8OHunc2+Did8ipv1OZWnYF1ZccwbFGGEVwgS9DQln99KID/+Ifz4Wjx6o DzpnIH22L66InOpSaSZl1oh05sDnIdY2C2zkRHCyzr5GnDlVHEOAoVSZqaxdHUn9Fn6KcdwG6BzEN hleZYJWine+qiKi88WBQPQjUkonTisMYsxi4yniRv9DZkjUyLf1WYJ/CqeoQ0czCS0k8NT26vW9RL D+4k49T/Kxz1Ni8RTXbYrV+92A==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1667395453; h=from : subject : to : message-id : date; bh=k+TRGyPuspNBNciy7OhIOd1ZzeEiuR1wDmJ94SBrE0U=; b=P6Etno7kYAanHYWf2oAOD0o3er4mEjzOOa5TxKWVvcasnOaPpJjmx7wBMO2Lt4zDeBxYe UolCD9pStfE7NNBcy69q/g/QNcPnbR4zwp3+bZ77wenpKn7bfkImF+SnleE7UqbnU2KY5Dv CdNpuz83B01v30Xur0MSRlM6KGY5L0kAg20E8cP0QykV0Tw1sW/umPAwewdb8tZcYfMwzdP 3adF8zmrK7sRRnc/7cKUVA7+ABUdjMxZBITWhzPOiwXvH5LepQQ0xXUdEHSghhsLY9UcKIx 3PB8faNt0qMXLtK919bVU567L9VxG/M4txz9aQN2b68zvWugvG2VHNBq7K7A== Received: from [10.139.162.187] (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 1oqDix-Y8PGYE-5D; Wed, 02 Nov 2022 13:24:07 +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 1oqDiw-4Xpot5-36; Wed, 02 Nov 2022 13:24:06 +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 28B958A83; Wed, 2 Nov 2022 13:24:02 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: pcib msix allocation in arm64 From: Andrew Turner In-Reply-To: Date: Wed, 2 Nov 2022 13:24:01 +0000 Cc: Warner Losh , Wei Hu , "freebsd-hackers@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Message-Id: <146F5D18-6366-4953-A8D9-61FE7EC67F71@fubar.geek.nz> References: To: Souradeep Chakrabarti X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Smtpcorp-Track: 1oqDiw4bpot536.Yr90Pn5oTkb2w Feedback-ID: 790814m:790814amQcrys:790814sI1eae75bD X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Rspamd-Queue-Id: 4N2SK96pPnz3CNN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b=LKdl+K40; dkim=pass header.d=fubar.geek.nz header.s=s790814 header.b=P6Etno7k; dmarc=pass (policy=none) header.from=fubar.geek.nz; spf=pass (mx1.freebsd.org: domain of "bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz" designates 103.2.140.251 as permitted sender) smtp.mailfrom="bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz" X-Spamd-Result: default: False [-3.86 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.959]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; FORGED_SENDER(0.30)[andrew@fubar.geek.nz,bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz]; RCVD_IN_DNSWL_MED(-0.20)[103.2.140.251:from]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; R_DKIM_ALLOW(-0.20)[smtpservice.net:s=mgy720.a1-4.dyn,fubar.geek.nz:s=s790814]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[andrew@fubar.geek.nz,bT.zdmhwepc30=69ay6p1uptyl=iftnfeedlg@em790814.fubar.geek.nz]; RCVD_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[smtpservice.net:+,fubar.geek.nz:+]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 2 Nov 2022, at 12:56, Souradeep Chakrabarti = wrote: >=20 > Hi, > I can see in x86 nexus.c has implemented pcib_alloc_msix using = nexus_alloc_msix(). > Which calls msix_alloc() for msix allocation. >=20 > But in case of arm64 I don't find similar pcib_alloc_msix = implementation in nexus.c . > So, on arm64 what is correct way to get allocate msix ? For an arm64 system with ACPI it is most likely handled in = generic_pcie_acpi_release_msix. For FDT it can depend on which PCI = driver is used. In either case it will call into intr_release_msix that then calls into = the MSI controller to allocate the vectors. For a GICv3 driver it will = either be gicv3_its_alloc_msix if you have an ITS device, or = gic_v3_alloc_msix if using MBI ranges. On ACPI we don=E2=80=99t currently support MBI ranges, although it looks = like this could be handled by the existing gicv2m driver. This driver = should already work as a child of the GICv3, however it appears to be = FDT only, so will need some work to add ACPI support. Andrew