git: 8dbc7c17aeb8 - stable/13 - bhyve: Remove the unused vcpu argument from all of the I/O port handlers.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Jan 2023 22:34:56 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8dbc7c17aeb893806c3364880307ceafaa2dd31a commit 8dbc7c17aeb893806c3364880307ceafaa2dd31a Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-12-09 18:35:44 +0000 Commit: John Baldwin <jhb@FreeBSD.org> 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;