From nobody Mon Jun 19 05:58:00 2023 X-Original-To: dev-commits-src-main@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 4QkzZd1pKQz4fCQh; Mon, 19 Jun 2023 05:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QkzZc6Hznz4KHC; Mon, 19 Jun 2023 05:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687154280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z48KrY2aoFTVUvrTJtV8VJKzEJUSNeCZVmL4YRS9pBc=; b=sEGrFPLiEc4eR5n40aTChIMxAaG2eEnreCWDCfgIj8Gz/tqeYOanEDMaDPdenWwEwzRZ9l LnPY0ZogX7KjrvhdUfdOOCD8ruN0PMacQAOCAlD09qAbCx24zt1bqoDInGx72MEpAZjsPQ jpGfT9gcY2BcIp502sjeY6Lt4rzTo/sBcDK0JTwehgs6XEyvbOmPQoDtrXbKloMcobHe3J CwzvisK47VNCCTJDKLhtiS+x3WoffzTPxhBcneylDiyGngFsPgKTh2LEIRJJxIjTEBYpUx Ksz+xr29pUA1dBZpGRVUTS53652FUntg5H0O4vbDdIpjH4SBSw46rV5dnjoOiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687154280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z48KrY2aoFTVUvrTJtV8VJKzEJUSNeCZVmL4YRS9pBc=; b=MdqnGSC4r3lwFyVqHGlaAEZi1Vqp/HVv4tL09LaWbLgtwNOfrXMuJXTc6Uhba4cNwqbA70 uiGHQoCjCng/Al3EnuAHAXlxuogopptsjzaaay1X1q5JyeakAb8ZhZ7nX4DoMt1BaFsJWj 7WbSh8/DDXRn2lJZDHznc1KlM+Oxo/6bTOPiDnt4DKWGCsju2pYd5uXCaxVzjWyrJSxCJ1 D0dsm/sz91cmY3xiRYd6Du9BJcuiLqqbwtmxF8CGDY1DH6jLSp6rDpuuApnEpyE3Q6yHKM 6HTvqBJj6BH/zkGps5NjRtg7h/0FR9Jd/D3OmNCNkn/8/QrBjrlGYd+KXa9xwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687154280; a=rsa-sha256; cv=none; b=AVlUWmVTK55Np4BxJMuMuhS2CDXo1MUdq/pwgb8QmCpqrOxJ0pglfwlxHTYXkiaLXuh0ap vlRgUF9/2klZq4ezazlG4CUvB8i/Tf79rE80beJTADriLAugEisLnQEQzSy3XgqsICKgWr 3U8L2YPZSLzhruT3cVke2WEuPQXBLJhIBlrqUISqGXQDpceS9mCpLHyi9/n/HsSqDwefT/ L3TqWR4OgJCRnViU6aM1Tc3ZKhgDFmA1KBN68+6gTypxei+d02pehtBoROOjgWWa+dTffq LKCo7cKUCaBDsW/iHFceURKq0clpDPWMiWx0b7laDvFUCdIn7CPj4XxObSQW/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QkzZc2Qhsz15Xy; Mon, 19 Jun 2023 05:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35J5w0c1026015; Mon, 19 Jun 2023 05:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35J5w0sa026014; Mon, 19 Jun 2023 05:58:00 GMT (envelope-from git) Date: Mon, 19 Jun 2023 05:58:00 GMT Message-Id: <202306190558.35J5w0sa026014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 14c80457b0f6 - main - bhyve: add bus, slot and func to device name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14c80457b0f6a5eb6ff9a1db573462410c64a454 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=14c80457b0f6a5eb6ff9a1db573462410c64a454 commit 14c80457b0f6a5eb6ff9a1db573462410c64a454 Author: Vitaliy Gusev AuthorDate: 2023-05-15 14:28:45 +0000 Commit: Corvin Köhne CommitDate: 2023-06-19 05:57:04 +0000 bhyve: add bus, slot and func to device name Each device needs a unique identifier to store and restore snapshots properly. Adding the pci bsf information to the device name creates a unique identifier as a bsf can't be occupied twice. Reviewed by: corvink MFC after: 1 week Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D40107 --- usr.sbin/bhyve/pci_emul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index ef98c459e327..6eb428e76817 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -1029,7 +1029,8 @@ pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int bus, int slot, pdi->pi_lintr.pirq_pin = 0; pdi->pi_lintr.ioapic_irq = 0; pdi->pi_d = pde; - snprintf(pdi->pi_name, PI_NAMESZ, "%s-pci-%d", pde->pe_emu, slot); + snprintf(pdi->pi_name, PI_NAMESZ, "%s@pci.%d.%d.%d", pde->pe_emu, bus, + slot, func); /* Disable legacy interrupts */ pci_set_cfgdata8(pdi, PCIR_INTLINE, 255);