From nobody Wed Apr 10 15:19:15 2024 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 4VF61b6WPRz5HHST; Wed, 10 Apr 2024 15:19:15 +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 4VF61b52Ppz4nJd; Wed, 10 Apr 2024 15:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712762355; 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=qUqZt4UVAteR8+tMg19X+2yh/NbT9aQLVICaFwRltJs=; b=sTXfLwycavBwkvRzHqv6HyjY2w7CIKfiJvtulIJ6SisicWtfeaCNuvneES/5bX8pBEjSNX pXvMKy0wkxM+XzhGQTDhBRcQg5JIx/sCfxM+EmXSv60ouEgOJ3UPHjUwK3A5D93B/62zei 37Q46Lvoztqpp3pgS+JgxJCNlOyC9ZIzLO4X/7Esj3fBA5ygLo/fn2X/1mNcMrho4+9wI6 PKelulivvnm2uy8cO7eDQvEwPIjxez1cFDkeb0ZOa9WaSSj56POQeo6VKWWE8T8FZk0YJp XcfeG/u4pNLsB4R1RBs0t1LPA94fY2pAjJYHHX1+hdXPv1819k4H1y5CB7CPLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712762355; a=rsa-sha256; cv=none; b=b2wpzUJLgQJQ61K0wr2RisOwvkfKBIrVa/vjzOKdok5U7VU9+2a2MJGDoHmCXLlgKWmgkO APBxm3t4EDzyyOhGCvJd3+DNBSslMpFLlDR/fwDS6bvwVUzQkv+r2xThIZzuuxKbNXmFAr 594HvhzKHzOpY1kpE56X+s6SHfdRI3unzvUUw7ewjI1IZRec7ee8981l9ryv6UGCzi9Dcz qRhUC6MJ9yNDQxSJ9Zydh2XBioTOQT1MAYCT2vf0VeX/ERvuW4K5tvUqmsSpWdk3aq/OCF WBDu9P50tHt0lCGh9oLmb2LURnGcuNt3jB+ho6WxnQzzQKmIVvihI9vI8BSU+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712762355; 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=qUqZt4UVAteR8+tMg19X+2yh/NbT9aQLVICaFwRltJs=; b=rpFlvfLXXvxWRJJdDxM0rizrEqK0oYMRW5Jj/UMcKgct4Es2o4sRWU2U0+wEC6b7rvBBJC N+sh6ls+luyVIfZzM8TfLRrpSbEGQP4DKR5GzeRES0YidUbh1JW84fDmSBPuj9DnPUtuQF uH6NnsPfVJB+JwR3FB3pNxl9g4tdiKccYY5bwvPbV1wL57Y/q4Sd5bBGdgPO4iQNR4MQAx ThPC76vjuCW/M8cTQkjRcjZshoZhHOXWgvMnKdaflU4TBZ+mA3iW1bwa2xbXl9enugd4LO fI1ziipCxImvtQXU60ZM0iRp9jA/1MiOP9tY/Q5e/y7SOhGDkCfqp1W/SrN2OQ== 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 4VF61b4fc8zjsL; Wed, 10 Apr 2024 15:19:15 +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 43AFJFii093275; Wed, 10 Apr 2024 15:19:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43AFJFit093272; Wed, 10 Apr 2024 15:19:15 GMT (envelope-from git) Date: Wed, 10 Apr 2024 15:19:15 GMT Message-Id: <202404101519.43AFJFit093272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fc98569fc370 - main - bhyve: Do not compile PCI passthrough support on arm64 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: dev-commits-src-all+owner@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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc98569fc370c7f5a2039d472ee3b01f5a78b177 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fc98569fc370c7f5a2039d472ee3b01f5a78b177 commit fc98569fc370c7f5a2039d472ee3b01f5a78b177 Author: Mark Johnston AuthorDate: 2024-04-03 17:11:24 +0000 Commit: Mark Johnston CommitDate: 2024-04-10 15:17:56 +0000 bhyve: Do not compile PCI passthrough support on arm64 Some required kernel functionality is not yet implemented. For now this means that one cannot specify host PCI register values, but that functionality is only used by amd64-specific device models for now. Note that this limitation is rather artificial; it arises only because pci_host_read_config() lives in pci_passthru.c. Reviewed by: corvink, andrew, jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D41738 --- usr.sbin/bhyve/Makefile | 1 - usr.sbin/bhyve/amd64/Makefile.inc | 1 + usr.sbin/bhyve/pci_emul.c | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index efa5b4acf897..124476ef7d2f 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -40,7 +40,6 @@ SRCS= \ pci_emul.c \ pci_hostbridge.c \ pci_nvme.c \ - pci_passthru.c \ pci_virtio_9p.c \ pci_virtio_block.c \ pci_virtio_console.c \ diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index bc0ffa720d31..d281e3cf1581 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -15,6 +15,7 @@ SRCS+= \ pci_hda.c \ pci_irq.c \ pci_lpc.c \ + pci_passthru.c \ pci_uart.c \ pci_xhci.c \ pctestdev.c \ diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index e5e9e56cc3c3..9df05fda5866 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -59,8 +59,8 @@ #ifdef __amd64__ #include "amd64/pci_irq.h" #include "amd64/pci_lpc.h" -#endif #include "pci_passthru.h" +#endif #include "qemu_fwcfg.h" #define CONF1_ADDR_PORT 0x0cf8 @@ -381,7 +381,11 @@ pci_config_read_reg(const struct pcisel *const host_sel, nvlist_t *nvl, if (config == NULL) { return def; } else if (host_sel != NULL && strcmp(config, "host") == 0) { +#ifdef __amd64__ return pci_host_read_config(host_sel, reg, size); +#else + errx(1, "cannot fetch host PCI configuration"); +#endif } else { return strtol(config, NULL, 16); }