From nobody Fri Aug 18 07:18:45 2023 X-Original-To: dev-commits-src-all@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 4RRtX64NMtz4qpkb; Fri, 18 Aug 2023 07:18:46 +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 4RRtX62sWDz4djH; Fri, 18 Aug 2023 07:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692343126; 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=kAL9+JpVi7ASGwQrAjwIqGFd2/c1PwIhMDrZmdL3HGM=; b=jaJZoBftBnP5jNItIaRHz8fd0uCXUFbeoErzIXYEvVZjLH1nN+v/l2Fdnqb9Fh3Xs7Yaiy 4teUUaRS5r6tj/9InzAaWn6QWfJOrSQ9U1jEbWLh0sknjoX3rGezZlq3dQanwykiEtse1r +jNwKyh0j3KozWk1qmtC6fHbzw543AQ6xKlpbM6l0CQWc7l6PHoHEmu/pDw20D3Up1+Hgz madistXxWfPBVXsqMrc5Ec2bHw88YbsA9OHPZEutYP84/7It27nZFGvX3kz4FiQc5jkHAW hu2yU3+1o2xQYBE9nc4LJHE3l79ZIm7hknI6cItQx7tyduVwqo5uDWwf/m5qAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692343126; 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=kAL9+JpVi7ASGwQrAjwIqGFd2/c1PwIhMDrZmdL3HGM=; b=sQHSahODMXnuslooFnNduDtWXKHsgn1s5YdgkZeIux6mrjAf8wmEEkZUZi8o/PpzrhaGuX XS8XdOGsItz9VaO5EpcxmoXkvbBmJfLm6LHjUbAMskX7Sr0mjjvhFl0AxS2clEW3n1upNn vLQhvzYSBRSVM8qwYVfoLym2SWNjXwZ0EOzis0c0f2zhTMd/8LukISbTEXDS2cfVAZdgY3 adqA9m4c/nfg3V5cqQVXHRbQQIHvzT64lNXgFsUrTxU8KpiL3jknUuqo73gVNT1x9sow1W huq4N7vLygSkAZQilQT7atcqPPa1vUtFMAEbGPECfsQgFKRUXOoWX4byGC/1gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692343126; a=rsa-sha256; cv=none; b=um1o+DOqkXCXShXRaDBALEHoIwsjUtcgq7lSGM/2yCZAqjR7qVWdmW3cpLJafkOzsTFf51 8mnCAZB6te0/l0l+KX5hhP/a1e/kTq3U5hEeCHR6xCxhE6PAzBYUKSUVk6wWBXRpmSYxHJ 1KkjqVGD+d15BH4mZqh+wAFQltS3dvoUfe8/v5rnDug3LHzgnvgM1/u0sCg/zRsgVZ6av2 62JSjA70bnj4XA3eeNWKs39RVyMGbEnfJCVPKVyVZDR7b/di+OddMyQuWSC7aFiTgxZ3Nd Ap7zUui0IAAxTxsggSuJGgmdc5WrjBeoUU/RFrgSxxNy/51pxJIT+SN2g3bD/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RRtX60Yckz16Mv; Fri, 18 Aug 2023 07:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37I7Ijep017603; Fri, 18 Aug 2023 07:18:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37I7Ijfw017600; Fri, 18 Aug 2023 07:18:45 GMT (envelope-from git) Date: Fri, 18 Aug 2023 07:18:45 GMT Message-Id: <202308180718.37I7Ijfw017600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 51e32fe73405 - stable/13 - bhyve: add bus, slot and func to device name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 51e32fe73405a20caed05cd24310d4e6bb718507 Auto-Submitted: auto-generated The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=51e32fe73405a20caed05cd24310d4e6bb718507 commit 51e32fe73405a20caed05cd24310d4e6bb718507 Author: Vitaliy Gusev AuthorDate: 2023-05-15 14:28:45 +0000 Commit: Corvin Köhne CommitDate: 2023-08-18 07:04:26 +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 (cherry picked from commit 14c80457b0f6a5eb6ff9a1db573462410c64a454) --- 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 47ddf3f1809c..f52bf94b7c3d 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -1023,7 +1023,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);