From nobody Wed Oct 04 16:53: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 4S11452sb9z4wGnV; Wed, 4 Oct 2023 16:53:57 +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 4S11445PJQz3CLB; Wed, 4 Oct 2023 16:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438436; 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=g727BTWPkOqSZad2UxIqglTpUx5T1urqhVYSBMS0gEo=; b=rjiOZ81XWloQjg3VtIopGx5lPoQqokoG8syOIBcnnAzh6AwYBWccMYWISUw8ENJDD8mzhB KycZA9NXhiwB/LwPkoply0sSG5WnBaZbH2xqvNTmKTPtL9+rhxJHe9anpjK07jrecvl3m1 TRa22qMOZRw7foMkMy5MEC3F9WQu07WIJiMxNIVXR0esNT3y/XWx1iIOdIRJVz3LomDciC 1UzIBbjF471ShGyFPzRYop1SoihNvjCd/LscroKwjSL3w+2TEspk9CDgbLK/G86vbto7hY 5xh6v8Q6wS+ZvVnu0SosvbqBJ3+sNeHQnNEz1T2FwT8d18PrV/6YoLmG8ZCTVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438436; a=rsa-sha256; cv=none; b=MovqZh7VuvvCZ/alIfxwkByVW/g4ZnPJQlLfg1VDo4Lrg0Vrdk152hirU5hEszDdeBoSfv 3DGkUT4x3nljm5CUYi7jbXft4YKpnG/YAhsy9hpYdw/K3IqG/D/LdqXHXOfQQ6XYJUYKGo zAJLQDg2ZRqoBGS2FHaumsSkdr6YWKMgTl8reShs/TZ09yhYjWKQ/2rQ0qWlL9mvNnsd/3 LQyqipLfkebcOqjSk3gL27yH/QIck5U5Rf+JLa8tKGatFR0lJJ3ZZ4t3xSofly9AdhHjmM RUDOdWu3OsiwE2MWInCeAefXgk9xVOGMsLRkB8si3GRl661rK9xWpOB0o2Nesg== 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=1696438436; 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=g727BTWPkOqSZad2UxIqglTpUx5T1urqhVYSBMS0gEo=; b=brHc2R9Unu5wAnX09OcDyAKpGmqdBJuwHJIjjdEg06K6/28QMAG2+LImi0JUkLbERpD7yv bjdkpPu9AfuRLsw1hJS38t/gGkKIjS0Jmk/tRP1/FeOyfAfi5isDeVu0o1iVIqE85gvDf3 EzwEhtlxRY4A7p+pBBjjphI4lqxK433fNhvEZoeaqVNzcqVIsWPJa6Rl4i73ibSJauhptN TUISxISipxlKgcH9FDidvjsbz/tVL4dnttH+9SPiT7tBByLnG4vGzy2E/7IKWF22EVIB/5 5CKR7vV71NdGUE2XUWKzeSbd+jZguMYa4hi3pToL278ezoTbgX80EllDJQPrxA== 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 4S11444KKkzm0S; Wed, 4 Oct 2023 16:53:56 +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 394GruYx037491; Wed, 4 Oct 2023 16:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GruGI037488; Wed, 4 Oct 2023 16:53:56 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:53:56 GMT Message-Id: <202310041653.394GruGI037488@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: f927afc1a6fe - main - bhyve: Move some more amd64-specific drivers to their own subdir 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f927afc1a6fe8257e28d79e8bb77305c2958724a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f927afc1a6fe8257e28d79e8bb77305c2958724a commit f927afc1a6fe8257e28d79e8bb77305c2958724a Author: Mark Johnston AuthorDate: 2023-10-04 16:20:57 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:16 +0000 bhyve: Move some more amd64-specific drivers to their own subdir No functional change intended. Reviewed by: corvink, jhb, emaste MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40551 --- usr.sbin/bhyve/Makefile | 6 ------ usr.sbin/bhyve/amd64/Makefile.inc | 7 +++++++ usr.sbin/bhyve/{ => amd64}/atkbdc.c | 0 usr.sbin/bhyve/{ => amd64}/atkbdc.h | 0 usr.sbin/bhyve/{ => amd64}/post.c | 0 usr.sbin/bhyve/{ => amd64}/ps2kbd.c | 0 usr.sbin/bhyve/{ => amd64}/ps2kbd.h | 0 usr.sbin/bhyve/{ => amd64}/ps2mouse.c | 0 usr.sbin/bhyve/{ => amd64}/ps2mouse.h | 0 usr.sbin/bhyve/bhyverun.c | 6 +++++- usr.sbin/bhyve/snapshot.c | 15 +++++++++++++-- 11 files changed, 25 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 794bfbe4c8a3..86039a8c45da 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -17,7 +17,6 @@ BHYVE_SYSDIR?=${SRCTOP} SRCS= \ acpi.c \ acpi_device.c \ - atkbdc.c \ audio.c \ basl.c \ bhyvegc.c \ @@ -63,9 +62,6 @@ SRCS= \ pci_xhci.c \ pctestdev.c \ pm.c \ - post.c \ - ps2kbd.c \ - ps2mouse.c \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ @@ -138,6 +134,4 @@ NO_WTHREAD_SAFETY= NO_WCAST_ALIGN= -SUBDIR= kbdlayout - .include diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 62de5f211a23..c52219cb8dd1 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -1,6 +1,13 @@ SRCS+= \ + atkbdc.c \ fwctl.c \ + post.c \ + ps2kbd.c \ + ps2mouse.c \ task_switch.c + .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c + +SUBDIR+= kbdlayout diff --git a/usr.sbin/bhyve/atkbdc.c b/usr.sbin/bhyve/amd64/atkbdc.c similarity index 100% rename from usr.sbin/bhyve/atkbdc.c rename to usr.sbin/bhyve/amd64/atkbdc.c diff --git a/usr.sbin/bhyve/atkbdc.h b/usr.sbin/bhyve/amd64/atkbdc.h similarity index 100% rename from usr.sbin/bhyve/atkbdc.h rename to usr.sbin/bhyve/amd64/atkbdc.h diff --git a/usr.sbin/bhyve/post.c b/usr.sbin/bhyve/amd64/post.c similarity index 100% rename from usr.sbin/bhyve/post.c rename to usr.sbin/bhyve/amd64/post.c diff --git a/usr.sbin/bhyve/ps2kbd.c b/usr.sbin/bhyve/amd64/ps2kbd.c similarity index 100% rename from usr.sbin/bhyve/ps2kbd.c rename to usr.sbin/bhyve/amd64/ps2kbd.c diff --git a/usr.sbin/bhyve/ps2kbd.h b/usr.sbin/bhyve/amd64/ps2kbd.h similarity index 100% rename from usr.sbin/bhyve/ps2kbd.h rename to usr.sbin/bhyve/amd64/ps2kbd.h diff --git a/usr.sbin/bhyve/ps2mouse.c b/usr.sbin/bhyve/amd64/ps2mouse.c similarity index 100% rename from usr.sbin/bhyve/ps2mouse.c rename to usr.sbin/bhyve/amd64/ps2mouse.c diff --git a/usr.sbin/bhyve/ps2mouse.h b/usr.sbin/bhyve/amd64/ps2mouse.h similarity index 100% rename from usr.sbin/bhyve/ps2mouse.h rename to usr.sbin/bhyve/amd64/ps2mouse.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 4e2d5467cfaf..707e21caf506 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -82,7 +82,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "bootrom.h" #include "config.h" #include "inout.h" @@ -1454,7 +1456,9 @@ main(int argc, char *argv[]) init_inout(); kernemu_dev_init(); init_bootrom(ctx); +#ifdef __amd64__ atkbdc_init(ctx); +#endif pci_irq_init(ctx); ioapic_init(ctx); diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 7d8959756757..593930c7f8a3 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -75,7 +75,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "debug.h" #include "inout.h" #include "ipc.h" @@ -892,7 +894,12 @@ vm_restore_devices(struct restore_state *rstate) return (ret); } - return (vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL)); +#ifdef __amd64__ + ret = vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL); +#else + ret = 0; +#endif + return (ret); } int @@ -1131,8 +1138,12 @@ vm_snapshot_devices(int data_fd, xo_handle_t *xop) goto snapshot_err; } +#ifdef __amd64__ ret = vm_snapshot_device(atkbdc_snapshot, "atkbdc", NULL, data_fd, xop, meta, &offset); +#else + ret = 0; +#endif xo_close_list_h(xop, JSON_DEV_ARR_KEY);