From nobody Thu Jan 26 22:34:55 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 4P2wWM3CWgz3cCXR; Thu, 26 Jan 2023 22:34:55 +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 4P2wWM2wBWz4D5l; Thu, 26 Jan 2023 22:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772495; 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=M25BhI6xtPca4mF5dJM106p46HBEryVoISfRnbson7E=; b=sHuavO1PDUOBXcQTOmrvE90lKguHTNDbrX7m6SpfhWYwZN2olRYt8sKUg6GnD1LaA3qlIr YTEqBLsXkbP1Tbr39TDMyWj9kOra+072l/l8Go5U5D6dg2uF64F0lAo9KP1SyioRnNVUti /TP35kvNS5CiDvZXLmnxIo797hqkaKbN23pC0z7vd2g/4jshcwDBKHwtxk0ieNk5hehui2 lHVvd0/b9KWtQzYV6Fv5ajDuPDKvqmzuGIEXlUsnVmLpvNW/5HMDUG440jlsl6dLjUG2qn FLRmVowoRTg5PKbh96L4aszG6BaMlXSPZXfF+ERXKB4hD0p1Kl0MTWuPXlGwTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772495; 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=M25BhI6xtPca4mF5dJM106p46HBEryVoISfRnbson7E=; b=d984TmB3JmN0Gid16JgfmxQ153shp0XZE53PrgWR3iU+P2xZc2uOYr+K+rYGkELFWdEWPh smx44qD671H0/Uv8/LIiBCWNylYNPe4JziYMO3d+1b0oxVl5zn4/Tw/bY5lHnPI/CCQfDy ObVbTbAYfCw6QiEF3/1ysvH1LKu7DPh7rxmPMrm1LukN04bFeXJhTlIKV8/mIClX8kNZBM ypX47zOIJTThUo4WtxsLSwOTqUUncD/kMCIojhtGKaZsd2+m4k5AiVaCqa4vYNUuye5OOw tVt9R0Td1bQ1U1tl4F7pLGwVY9qS0j3lUzESQ2NzQyx9WUqSP7ITrWof6ellAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674772495; a=rsa-sha256; cv=none; b=G3o9V1FRZSxuFGNjVlnv27DkTSbAzYLobokfvFXXcunm6IJkQxDc3+zj4xAZMczD7Q9NW9 A9/G5Y5ig7pCuWEauX5dGU/KVk9O7Lx5PBFujXNhKMpM1YmFQccKANrqoZGkEntzSGGeie 4fHR8tDFmxnOb/hH7cFycrhX5CvNExyUCWSgPlm6d5sSQjZS281LDjJgwknvsMZM2PNBQe ObIUm5GzBDu81Z2E5Zf0P1mHUqNvM5+TME6vUj/9Fg8DQihwSFLBftOoEQRnFCl57Wy+3Y F0Qt9+BV48zxLgIfyXDNf5OO6R4CcZXos7ysoIf4m9/KRedmDCeGnGW91DRntw== 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 4P2wWM1xNWzmdJ; Thu, 26 Jan 2023 22:34:55 +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 30QMYt0b051398; Thu, 26 Jan 2023 22:34:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QMYt93051397; Thu, 26 Jan 2023 22:34:55 GMT (envelope-from git) Date: Thu, 26 Jan 2023 22:34:55 GMT Message-Id: <202301262234.30QMYt93051397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ce259e6688c5 - stable/13 - bhyve: Remove unused vcpu argument from PCI read/write methods. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ce259e6688c570c5941adca48f4a7784f47ad840 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ce259e6688c570c5941adca48f4a7784f47ad840 commit ce259e6688c570c5941adca48f4a7784f47ad840 Author: John Baldwin AuthorDate: 2022-12-09 18:35:28 +0000 Commit: John Baldwin CommitDate: 2023-01-26 22:16:46 +0000 bhyve: Remove unused vcpu argument from PCI read/write methods. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37652 (cherry picked from commit 78c2cd83eccac0ebd23ebd15df77ee33a5781a6e) --- usr.sbin/bhyve/pci_ahci.c | 4 ++-- usr.sbin/bhyve/pci_e82545.c | 4 ++-- usr.sbin/bhyve/pci_emul.c | 50 +++++++++++++++++++++---------------------- usr.sbin/bhyve/pci_emul.h | 8 +++---- usr.sbin/bhyve/pci_fbuf.c | 4 ++-- usr.sbin/bhyve/pci_hda.c | 8 +++---- usr.sbin/bhyve/pci_lpc.c | 6 +++--- usr.sbin/bhyve/pci_nvme.c | 4 ++-- usr.sbin/bhyve/pci_passthru.c | 16 +++++++------- usr.sbin/bhyve/pci_uart.c | 4 ++-- usr.sbin/bhyve/pci_xhci.c | 4 ++-- usr.sbin/bhyve/virtio.c | 4 ++-- usr.sbin/bhyve/virtio.h | 4 ++-- 13 files changed, 60 insertions(+), 60 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 09b996476774..700170885a13 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -2197,7 +2197,7 @@ pci_ahci_host_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value) } static void -pci_ahci_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_ahci_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -2292,7 +2292,7 @@ pci_ahci_port_read(struct pci_ahci_softc *sc, uint64_t offset) } static uint64_t -pci_ahci_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_ahci_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t regoff, int size) { struct pci_ahci_softc *sc = pi->pi_arg; diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c index 9d991b124965..49c5f986a341 100644 --- a/usr.sbin/bhyve/pci_e82545.c +++ b/usr.sbin/bhyve/pci_e82545.c @@ -2112,7 +2112,7 @@ e82545_read_register(struct e82545_softc *sc, uint32_t offset) } static void -e82545_write(struct vmctx *ctx __unused, int vcpu __unused, +e82545_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -2163,7 +2163,7 @@ e82545_write(struct vmctx *ctx __unused, int vcpu __unused, } static uint64_t -e82545_read(struct vmctx *ctx __unused, int vcpu __unused, +e82545_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct e82545_softc *sc; diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index b22238ab37fd..74a648799757 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -140,7 +140,7 @@ SYSRES_MEM(PCI_EMUL_ECFG_BASE, PCI_EMUL_ECFG_SIZE); static struct pci_devemu *pci_emul_finddev(const char *name); static void pci_lintr_route(struct pci_devinst *pi); static void pci_lintr_update(struct pci_devinst *pi); -static void pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, +static void pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, int coff, int bytes, uint32_t *val); static __inline void @@ -447,8 +447,8 @@ pci_msix_pba_bar(struct pci_devinst *pi) } static int -pci_emul_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pci_emul_io_handler(struct vmctx *ctx, int vcpu __unused, int in, int port, + int bytes, uint32_t *eax, void *arg) { struct pci_devinst *pdi = arg; struct pci_devemu *pe = pdi->pi_d; @@ -464,10 +464,10 @@ pci_emul_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, pdi->pi_bar[i].addr + pdi->pi_bar[i].size) { offset = port - pdi->pi_bar[i].addr; if (in) - *eax = (*pe->pe_barread)(ctx, vcpu, pdi, i, + *eax = (*pe->pe_barread)(ctx, pdi, i, offset, bytes); else - (*pe->pe_barwrite)(ctx, vcpu, pdi, i, offset, + (*pe->pe_barwrite)(ctx, pdi, i, offset, bytes, *eax); return (0); } @@ -476,8 +476,8 @@ pci_emul_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, } static int -pci_emul_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int size, uint64_t *val, void *arg1, long arg2) +pci_emul_mem_handler(struct vmctx *ctx, int vcpu __unused, int dir, + uint64_t addr, int size, uint64_t *val, void *arg1, long arg2) { struct pci_devinst *pdi = arg1; struct pci_devemu *pe = pdi->pi_d; @@ -494,22 +494,22 @@ pci_emul_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, if (dir == MEM_F_WRITE) { if (size == 8) { - (*pe->pe_barwrite)(ctx, vcpu, pdi, bidx, offset, + (*pe->pe_barwrite)(ctx, pdi, bidx, offset, 4, *val & 0xffffffff); - (*pe->pe_barwrite)(ctx, vcpu, pdi, bidx, offset + 4, + (*pe->pe_barwrite)(ctx, pdi, bidx, offset + 4, 4, *val >> 32); } else { - (*pe->pe_barwrite)(ctx, vcpu, pdi, bidx, offset, + (*pe->pe_barwrite)(ctx, pdi, bidx, offset, size, *val); } } else { if (size == 8) { - *val = (*pe->pe_barread)(ctx, vcpu, pdi, bidx, + *val = (*pe->pe_barread)(ctx, pdi, bidx, offset, 4); - *val |= (*pe->pe_barread)(ctx, vcpu, pdi, bidx, + *val |= (*pe->pe_barread)(ctx, pdi, bidx, offset + 4, 4) << 32; } else { - *val = (*pe->pe_barread)(ctx, vcpu, pdi, bidx, + *val = (*pe->pe_barread)(ctx, pdi, bidx, offset, size); } } @@ -1294,8 +1294,9 @@ pci_emul_fallback_handler(struct vmctx *ctx __unused, int vcpu __unused, } static int -pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int bytes, uint64_t *val, void *arg1 __unused, long arg2 __unused) +pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu __unused, int dir, + uint64_t addr, int bytes, uint64_t *val, void *arg1 __unused, + long arg2 __unused) { int bus, slot, func, coff, in; @@ -1306,7 +1307,7 @@ pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, in = (dir == MEM_F_READ); if (in) *val = ~0UL; - pci_cfgrw(ctx, vcpu, in, bus, slot, func, coff, bytes, (uint32_t *)val); + pci_cfgrw(ctx, in, bus, slot, func, coff, bytes, (uint32_t *)val); return (0); } @@ -2053,7 +2054,7 @@ pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) } static void -pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, +pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, int coff, int bytes, uint32_t *eax) { struct businfo *bi; @@ -2107,8 +2108,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, if (in) { /* Let the device emulation override the default handler */ if (pe->pe_cfgread != NULL) { - needcfg = pe->pe_cfgread(ctx, vcpu, pi, coff, bytes, - eax); + needcfg = pe->pe_cfgread(ctx, pi, coff, bytes, eax); } else { needcfg = 1; } @@ -2120,7 +2120,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, } else { /* Let the device emulation override the default handler */ if (pe->pe_cfgwrite != NULL && - (*pe->pe_cfgwrite)(ctx, vcpu, pi, coff, bytes, *eax) == 0) + (*pe->pe_cfgwrite)(ctx, pi, coff, bytes, *eax) == 0) return; /* @@ -2247,8 +2247,8 @@ pci_emul_cfgaddr(struct vmctx *ctx __unused, int vcpu __unused, int in, INOUT_PORT(pci_cfgaddr, CONF1_ADDR_PORT, IOPORT_F_INOUT, pci_emul_cfgaddr); static int -pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg __unused) +pci_emul_cfgdata(struct vmctx *ctx, int vcpu __unused, int in, int port, + int bytes, uint32_t *eax, void *arg __unused) { int coff; @@ -2256,7 +2256,7 @@ pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes, coff = cfgoff + (port - CONF1_DATA_PORT); if (cfgenable) { - pci_cfgrw(ctx, vcpu, in, cfgbus, cfgslot, cfgfunc, coff, bytes, + pci_cfgrw(ctx, in, cfgbus, cfgslot, cfgfunc, coff, bytes, eax); } else { /* Ignore accesses to cfgdata if not enabled by cfgaddr */ @@ -2499,7 +2499,7 @@ pci_emul_dinit(struct vmctx *ctx __unused, struct pci_devinst *pi, } static void -pci_emul_diow(struct vmctx *ctx __unused, int vcpu __unused, +pci_emul_diow(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -2567,7 +2567,7 @@ pci_emul_diow(struct vmctx *ctx __unused, int vcpu __unused, } static uint64_t -pci_emul_dior(struct vmctx *ctx __unused, int vcpu __unused, +pci_emul_dior(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_emul_dsoftc *sc = pi->pi_arg; diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index 3d7b420e2bdf..8a7bcb7cc83a 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -63,18 +63,18 @@ struct pci_devemu { void (*pe_write_dsdt)(struct pci_devinst *); /* config space read/write callbacks */ - int (*pe_cfgwrite)(struct vmctx *ctx, int vcpu, + int (*pe_cfgwrite)(struct vmctx *ctx, struct pci_devinst *pi, int offset, int bytes, uint32_t val); - int (*pe_cfgread)(struct vmctx *ctx, int vcpu, + int (*pe_cfgread)(struct vmctx *ctx, struct pci_devinst *pi, int offset, int bytes, uint32_t *retval); /* BAR read/write callbacks */ - void (*pe_barwrite)(struct vmctx *ctx, int vcpu, + void (*pe_barwrite)(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value); - uint64_t (*pe_barread)(struct vmctx *ctx, int vcpu, + uint64_t (*pe_barread)(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size); diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index d69e8254aa25..4cfe872bd934 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -117,7 +117,7 @@ static struct pci_fbuf_softc *fbuf_sc; #define PCI_FBUF_MSI_MSGS 4 static void -pci_fbuf_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_fbuf_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -172,7 +172,7 @@ pci_fbuf_write(struct vmctx *ctx __unused, int vcpu __unused, } static uint64_t -pci_fbuf_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_fbuf_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_fbuf_softc *sc; diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index e6e4ae4ca27d..a85935a5cae8 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -210,9 +210,9 @@ static uint64_t hda_get_clock_ns(void); * PCI HDA function declarations */ static int pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl); -static void pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, +static void pci_hda_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value); -static uint64_t pci_hda_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, +static uint64_t pci_hda_read(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size); /* * HDA global data @@ -1256,7 +1256,7 @@ pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static void -pci_hda_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_hda_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -1274,7 +1274,7 @@ pci_hda_write(struct vmctx *ctx __unused, int vcpu __unused, } static uint64_t -pci_hda_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_hda_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct hda_softc *sc = pi->pi_arg; diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index 5425a7935973..7af8d6647edc 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -398,7 +398,7 @@ pci_lpc_uart_dsdt(void) LPC_DSDT(pci_lpc_uart_dsdt); static int -pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, +pci_lpc_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, int bytes, uint32_t val) { int pirq_pin; @@ -419,14 +419,14 @@ pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, } static void -pci_lpc_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_lpc_write(struct vmctx *ctx __unused, struct pci_devinst *pi __unused, int baridx __unused, uint64_t offset __unused, int size __unused, uint64_t value __unused) { } static uint64_t -pci_lpc_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_lpc_read(struct vmctx *ctx __unused, struct pci_devinst *pi __unused, int baridx __unused, uint64_t offset __unused, int size __unused) { diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 46bf7ba7ec45..75e6f247501a 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -3062,7 +3062,7 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvme_softc* sc, } static void -pci_nvme_write(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, +pci_nvme_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { struct pci_nvme_softc* sc = pi->pi_arg; @@ -3125,7 +3125,7 @@ static uint64_t pci_nvme_read_bar_0(struct pci_nvme_softc* sc, static uint64_t -pci_nvme_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_nvme_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_nvme_softc* sc = pi->pi_arg; diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 65df3a0a162b..0c5f3ed1e7a3 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -910,8 +910,8 @@ msixcap_access(struct passthru_softc *sc, int coff) } static int -passthru_cfgread(struct vmctx *ctx __unused, int vcpu __unused, - struct pci_devinst *pi, int coff, int bytes, uint32_t *rv) +passthru_cfgread(struct vmctx *ctx __unused, struct pci_devinst *pi, int coff, + int bytes, uint32_t *rv) { struct passthru_softc *sc; @@ -955,8 +955,8 @@ passthru_cfgread(struct vmctx *ctx __unused, int vcpu __unused, } static int -passthru_cfgwrite(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, - int coff, int bytes, uint32_t val) +passthru_cfgwrite(struct vmctx *ctx, struct pci_devinst *pi, int coff, + int bytes, uint32_t val) { int error, msix_table_entries, i; struct passthru_softc *sc; @@ -1036,8 +1036,8 @@ passthru_cfgwrite(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, } static void -passthru_write(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +passthru_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, + uint64_t offset, int size, uint64_t value) { struct passthru_softc *sc; struct pci_bar_ioreq pio; @@ -1064,8 +1064,8 @@ passthru_write(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, } static uint64_t -passthru_read(struct vmctx *ctx __unused, int vcpu __unused, - struct pci_devinst *pi, int baridx, uint64_t offset, int size) +passthru_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, + uint64_t offset, int size) { struct passthru_softc *sc; struct pci_bar_ioreq pio; diff --git a/usr.sbin/bhyve/pci_uart.c b/usr.sbin/bhyve/pci_uart.c index 2e4a0eac05f9..7ccc3c7b6c62 100644 --- a/usr.sbin/bhyve/pci_uart.c +++ b/usr.sbin/bhyve/pci_uart.c @@ -66,7 +66,7 @@ pci_uart_intr_deassert(void *arg) } static void -pci_uart_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_uart_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { @@ -77,7 +77,7 @@ pci_uart_write(struct vmctx *ctx __unused, int vcpu __unused, } static uint64_t -pci_uart_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_uart_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { uint8_t val; diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index f95f62fbf0e5..5bc9498a4eb4 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -2267,7 +2267,7 @@ pci_xhci_hostop_write(struct pci_xhci_softc *sc, uint64_t offset, static void -pci_xhci_write(struct vmctx *ctx __unused, int vcpu __unused, +pci_xhci_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size __unused, uint64_t value) { @@ -2489,7 +2489,7 @@ pci_xhci_xecp_read(struct pci_xhci_softc *sc, uint64_t offset) static uint64_t -pci_xhci_read(struct vmctx *ctx __unused, int vcpu __unused, +pci_xhci_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_xhci_softc *sc; diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index dc3a2d10d5b5..87d49c2a5e4b 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -558,7 +558,7 @@ vi_find_cr(int offset) { * Otherwise dispatch to the actual driver. */ uint64_t -vi_pci_read(struct vmctx *ctx __unused, int vcpu __unused, +vi_pci_read(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct virtio_softc *vs = pi->pi_arg; @@ -678,7 +678,7 @@ done: * Otherwise dispatch to the actual driver. */ void -vi_pci_write(struct vmctx *ctx __unused, int vcpu __unused, +vi_pci_write(struct vmctx *ctx __unused, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index 7b50969e57a9..b6ef2bc8d9de 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -426,9 +426,9 @@ void vq_relchain_publish(struct vqueue_info *vq); void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen); void vq_endchains(struct vqueue_info *vq, int used_all_avail); -uint64_t vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, +uint64_t vi_pci_read(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size); -void vi_pci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, +void vi_pci_write(struct vmctx *ctx, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value); #ifdef BHYVE_SNAPSHOT int vi_pci_snapshot(struct vm_snapshot_meta *meta);