From nobody Thu Jan 26 22:34:56 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 4P2wWN4ph6z3cCFH; Thu, 26 Jan 2023 22:34:56 +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 4P2wWN3n7Zz4D1b; Thu, 26 Jan 2023 22:34:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772496; 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=v54CJsm+fB0bCRG2llp9+wi5B3aGOuHUoSbEEuafK0Y=; b=hJx/niEosrAJX8T596rprODuxtKTrGDqm+mM0ujMwcl/b6PcVjsT7Nqv1AjhrBg0eIXpgG d1ghvz9tmWt4DSC/xLrTdqxKOZu0keGCd/yKB6XW0qRHM75rbZWoB6O33y5tSc0MvXMXFm xj3mIpHvpfyB0lpq6ypzPr2E8AfUNi3NySWt7B0lHlrCvypLpEfpHfUCoOD+B4IPdf8yA9 Ts8gViYkshXPbj3q3zoxAEiRxlieLaJVmforyfOgpyFgYi7hCj5rWDf9TgS3AjAbyA8KWN Q5Yvg7rRO4HanH3w+n+Z/XzAl+KkCyeW5T3to/ne552YUFvWcrKd0vDKt0MOVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772496; 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=v54CJsm+fB0bCRG2llp9+wi5B3aGOuHUoSbEEuafK0Y=; b=l10i1JpEQRlNaMVgpQvVq8GYoKP4l7Vlxd98/Ic3seS+PohsD5ONgeruUBh0rgpumBZmwp bKiFyPQ/CKRb9R95t7qoUrK93zorOsSvj0L14PJWWDuZZDfY4kgdtNssavVIob/bKMltza IXcoSdSxvonSwxqSqEtTcsEcwaUFt8jbfUdM7FPIrboypj5Ue0JAAATCMPc39JCNMXFjvA T4ZHTonU2iVoFoo8QYpCHXo/lW8rZHQsVkUB+JSvZZOInDCeXEs22vWgQWRyRTfZk+o0Zt 4Lav0Czjyl8wTaS9BmdHVwjOR7920MixdyI8RepGGNx2RX9ynOoPTtxtFm9QXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674772496; a=rsa-sha256; cv=none; b=X/abr2Pghldvq+YMU0Aq5n2p1lgHIbgvvm9NWYXJ5TfwGXXY+/6sVtMEAiMPpJgcwns8dF 0YMD2Q5+Sf9zbshwg6nQfH9v40xpayPL8ZxMhveCWb9vBTyzh7GOhKirTkPoQb6SWinh2o QIvwTc/JbdvZuVJMhoktQRVb6XIwsLGmoqDBMLH782Ck9vi7lFm51RLwhUqoSfgGbmF1PJ LmUBNGK4yjHRcnzQj1EjrXszj1SqDLnPHOFfTt9gKQj7+xOf+poRxL1i70AMHht9ypL7FG +wTfKLMQT4FRx0gh/KFURMIXyG2zkwk98LZogkh4wF2E1nJ5f1RqTuGe45PXHQ== 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 4P2wWN2trszm9V; Thu, 26 Jan 2023 22:34:56 +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 30QMYuYj051422; Thu, 26 Jan 2023 22:34:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QMYuFk051421; Thu, 26 Jan 2023 22:34:56 GMT (envelope-from git) Date: Thu, 26 Jan 2023 22:34:56 GMT Message-Id: <202301262234.30QMYuFk051421@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: 8dbc7c17aeb8 - stable/13 - bhyve: Remove the unused vcpu argument from all of the I/O port handlers. 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: 8dbc7c17aeb893806c3364880307ceafaa2dd31a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8dbc7c17aeb893806c3364880307ceafaa2dd31a commit 8dbc7c17aeb893806c3364880307ceafaa2dd31a Author: John Baldwin AuthorDate: 2022-12-09 18:35:44 +0000 Commit: John Baldwin CommitDate: 2023-01-26 22:17:11 +0000 bhyve: Remove the unused vcpu argument from all of the I/O port handlers. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37653 (cherry picked from commit 08b05de1e21a7f3720eb618613276e3f3ab665f3) --- usr.sbin/bhyve/atkbdc.c | 4 ++-- usr.sbin/bhyve/fwctl.c | 2 +- usr.sbin/bhyve/inout.c | 6 +++--- usr.sbin/bhyve/inout.h | 2 +- usr.sbin/bhyve/pci_emul.c | 6 +++--- usr.sbin/bhyve/pci_lpc.c | 2 +- usr.sbin/bhyve/pctestdev.c | 12 ++++++------ usr.sbin/bhyve/pm.c | 14 +++++++------- usr.sbin/bhyve/post.c | 2 +- usr.sbin/bhyve/vga.c | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/usr.sbin/bhyve/atkbdc.c b/usr.sbin/bhyve/atkbdc.c index 42430ad1169e..5acde3874be3 100644 --- a/usr.sbin/bhyve/atkbdc.c +++ b/usr.sbin/bhyve/atkbdc.c @@ -307,7 +307,7 @@ atkbdc_dequeue_data(struct atkbdc_softc *sc, uint8_t *buf) } static int -atkbdc_data_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, +atkbdc_data_handler(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg) { struct atkbdc_softc *sc; @@ -393,7 +393,7 @@ atkbdc_data_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, } static int -atkbdc_sts_ctl_handler(struct vmctx *ctx, int vcpu __unused, int in, +atkbdc_sts_ctl_handler(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg) { struct atkbdc_softc *sc; diff --git a/usr.sbin/bhyve/fwctl.c b/usr.sbin/bhyve/fwctl.c index f74380a426b2..047a1050e7fd 100644 --- a/usr.sbin/bhyve/fwctl.c +++ b/usr.sbin/bhyve/fwctl.c @@ -516,7 +516,7 @@ fwctl_outl(uint32_t val) } static int -fwctl_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, +fwctl_handler(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c index bdbdd0d1c223..225697906393 100644 --- a/usr.sbin/bhyve/inout.c +++ b/usr.sbin/bhyve/inout.c @@ -66,7 +66,7 @@ static struct { } inout_handlers[MAX_IOPORTS]; static int -default_inout(struct vmctx *ctx __unused, int vcpu __unused, int in, +default_inout(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (in) { @@ -186,7 +186,7 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) if (!in) vm_copyin(iov, &val, bytes); - retval = handler(ctx, vcpu, in, port, bytes, &val, arg); + retval = handler(ctx, in, port, bytes, &val, arg); if (retval != 0) break; @@ -225,7 +225,7 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) } else { eax = vmexit->u.inout.eax; val = eax & vie_size2mask(bytes); - retval = handler(ctx, vcpu, in, port, bytes, &val, arg); + retval = handler(ctx, in, port, bytes, &val, arg); if (retval == 0 && in) { eax &= ~vie_size2mask(bytes); eax |= val & vie_size2mask(bytes); diff --git a/usr.sbin/bhyve/inout.h b/usr.sbin/bhyve/inout.h index 19b2975b94e5..a3a37e03ff68 100644 --- a/usr.sbin/bhyve/inout.h +++ b/usr.sbin/bhyve/inout.h @@ -39,7 +39,7 @@ struct vm_exit; /* * inout emulation handlers return 0 on success and -1 on failure. */ -typedef int (*inout_func_t)(struct vmctx *ctx, int vcpu, int in, int port, +typedef int (*inout_func_t)(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg); struct inout_port { diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 74a648799757..cca0932180d6 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -447,7 +447,7 @@ pci_msix_pba_bar(struct pci_devinst *pi) } static int -pci_emul_io_handler(struct vmctx *ctx, int vcpu __unused, int in, int port, +pci_emul_io_handler(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg) { struct pci_devinst *pdi = arg; @@ -2217,7 +2217,7 @@ pci_cfgrw(struct vmctx *ctx, int in, int bus, int slot, int func, static int cfgenable, cfgbus, cfgslot, cfgfunc, cfgoff; static int -pci_emul_cfgaddr(struct vmctx *ctx __unused, int vcpu __unused, int in, +pci_emul_cfgaddr(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { uint32_t x; @@ -2247,7 +2247,7 @@ 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 __unused, int in, int port, +pci_emul_cfgdata(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg __unused) { int coff; diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index 7af8d6647edc..e275946d9621 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -180,7 +180,7 @@ lpc_uart_intr_deassert(void *arg __unused) } static int -lpc_uart_io_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, +lpc_uart_io_handler(struct vmctx *ctx __unused, int in, int port, int bytes, uint32_t *eax, void *arg) { int offset; diff --git a/usr.sbin/bhyve/pctestdev.c b/usr.sbin/bhyve/pctestdev.c index d450d3cc977b..8b810e641bbc 100644 --- a/usr.sbin/bhyve/pctestdev.c +++ b/usr.sbin/bhyve/pctestdev.c @@ -72,14 +72,14 @@ static bool pctestdev_inited; static uint8_t pctestdev_iomem_buf[IOMEM_LEN]; static uint32_t pctestdev_ioport_data; -static int pctestdev_debugexit_io(struct vmctx *ctx, int vcpu, int in, +static int pctestdev_debugexit_io(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg); static int pctestdev_iomem_io(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, int size, uint64_t *val, void *arg1, long arg2); -static int pctestdev_ioport_io(struct vmctx *ctx, int vcpu, int in, +static int pctestdev_ioport_io(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg); -static int pctestdev_irq_io(struct vmctx *ctx, int vcpu, int in, +static int pctestdev_irq_io(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg); const char * @@ -178,7 +178,7 @@ fail: } static int -pctestdev_debugexit_io(struct vmctx *ctx __unused, int vcpu __unused, int in, +pctestdev_debugexit_io(struct vmctx *ctx __unused, int in, int port __unused, int bytes __unused, uint32_t *eax, void *arg __unused) { if (in) @@ -211,7 +211,7 @@ pctestdev_iomem_io(struct vmctx *ctx __unused, int vcpu __unused, int dir, } static int -pctestdev_ioport_io(struct vmctx *ctx __unused, int vcpu __unused, int in, +pctestdev_ioport_io(struct vmctx *ctx __unused, int in, int port, int bytes, uint32_t *eax, void *arg __unused) { uint32_t mask; @@ -234,7 +234,7 @@ pctestdev_ioport_io(struct vmctx *ctx __unused, int vcpu __unused, int in, } static int -pctestdev_irq_io(struct vmctx *ctx, int vcpu __unused, int in, int port, +pctestdev_irq_io(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg __unused) { int irq; diff --git a/usr.sbin/bhyve/pm.c b/usr.sbin/bhyve/pm.c index e8967c1b342c..b941536b0e5b 100644 --- a/usr.sbin/bhyve/pm.c +++ b/usr.sbin/bhyve/pm.c @@ -60,7 +60,7 @@ static const unsigned gpe0_valid = (1u << GPE_VMGENC); * reset. */ static int -reset_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, +reset_handler(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { int error; @@ -158,7 +158,7 @@ sci_update(struct vmctx *ctx) } static int -pm1_status_handler(struct vmctx *ctx, int vcpu __unused, int in, +pm1_status_handler(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { @@ -182,7 +182,7 @@ pm1_status_handler(struct vmctx *ctx, int vcpu __unused, int in, } static int -pm1_enable_handler(struct vmctx *ctx, int vcpu __unused, int in, +pm1_enable_handler(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { @@ -235,7 +235,7 @@ static uint16_t pm1_control; #define PM1_ALWAYS_ZERO 0xc003 static int -pm1_control_handler(struct vmctx *ctx, int vcpu __unused, int in, +pm1_control_handler(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { int error; @@ -285,7 +285,7 @@ acpi_raise_gpe(struct vmctx *ctx, unsigned bit) } static int -gpe0_sts(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, +gpe0_sts(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { /* @@ -309,7 +309,7 @@ gpe0_sts(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, INOUT_PORT(gpe0_sts, IO_GPE0_STS, IOPORT_F_INOUT, gpe0_sts); static int -gpe0_en(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, +gpe0_en(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (bytes != 1) @@ -333,7 +333,7 @@ INOUT_PORT(gpe0_en, IO_GPE0_EN, IOPORT_F_INOUT, gpe0_en); * This write-only register is used to enable and disable ACPI. */ static int -smi_cmd_handler(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, +smi_cmd_handler(struct vmctx *ctx, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { diff --git a/usr.sbin/bhyve/post.c b/usr.sbin/bhyve/post.c index a16eaa074f96..69cf5cf39db7 100644 --- a/usr.sbin/bhyve/post.c +++ b/usr.sbin/bhyve/post.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include "pci_lpc.h" static int -post_data_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, +post_data_handler(struct vmctx *ctx __unused, int in, int port __unused, int bytes, uint32_t *eax, void *arg __unused) { assert(in == 1); diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/vga.c index cd42e2a9e4cf..f139dc38937b 100644 --- a/usr.sbin/bhyve/vga.c +++ b/usr.sbin/bhyve/vga.c @@ -1215,7 +1215,7 @@ vga_port_out_handler(struct vmctx *ctx __unused, int in __unused, int port, } static int -vga_port_handler(struct vmctx *ctx, int vcpu __unused, int in, int port, +vga_port_handler(struct vmctx *ctx, int in, int port, int bytes, uint32_t *eax, void *arg) { uint8_t val;