From nobody Wed May 01 13:01:58 2024 X-Original-To: dev-commits-src-main@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 4VTxzV2g85z5JM02; Wed, 1 May 2024 13:01:58 +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 4VTxzV1DCMz3ymM; Wed, 1 May 2024 13:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714568518; 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=AAOrYQ4Rfme6u6B1K2c4mbI40N3MPDwCFbegtRNvEMw=; b=Bxn0YXfdXHvr/HcUzOOwWlLL2gVd6/m+KJA0EbbpKr/qA++GiIJ2jHHFexPUYz6V2JZjWm kjqp4LBO58KYgXAUuhWc5jDFJd/9AhwuVWKW7cMNs4gwMY/TGf3oZkTyB1rm+gfG+cjGHx gLIB9+7W8NS+3DAd8rKMb8YesSmxKaPqLzlsyrid8txWPqGSteKUGYH5NBOEWHjPKqIQ6b jhhrcR5i/07T5FdC3296m8p3mNjk7naqsUcBBWuO+wNeebhEPaakUL+uzQaKzTWcjS2X1p Zhj2b02oubAcTnM9Ew16I0n8evEpgIt1x9wzvY3/JZDHvEoEJEtB9yp37/Fqwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714568518; a=rsa-sha256; cv=none; b=iP0VxesLZ/lxroC5NSisLuFGadjMQV5WvEqn+7gwK3IsyjoYDkOTjp/Bnr8v72o882TLRi IaeX+sVtUoWY5ya9zxbsvlDnjgrcTiPOwGqYc5RQm/zSKJFyGZ7VMszN/0axaMAb0lWLAk xYsnAM2reXnWFpeeO3Xxg8TNw/OD4qYL0c1pI6yg2LYzOkkieCB7r0xdI2/8OaRJwFe53G kSGoQ1GLC//k1wlZIAhzaghxQmcN4idfExnuwgWz8CbHkSNr9wquDimBYgw1rM+OtASNCl CNZpq895JSL8ZwLhcqNtxkhg2I06m2vAQGRQi3lRZUGNMW1ALHkg23UM+J5NFA== 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=1714568518; 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=AAOrYQ4Rfme6u6B1K2c4mbI40N3MPDwCFbegtRNvEMw=; b=HuuKWnd4UMaQZfQgc+ToG/2qvD5UFVyAKYNvt0U2xj80GcXQQUhEkm7ZcPjaaQxB7cs6nq ypj/FySEo3jR0xszN0IJxpgOhQ/VgGc/7gQJLTJNFy0jqLVhpcs9nYTj9yiS97xQTRp8DD igZNf5ro2/dwzCBzDKE3aXnSWh3V8UiWaA1nUg1T17vVJmORPFPso4Zzc5+QUP9QSFixOD 4OWLhsSpr84+NXoH2zdiDA+H0//0Yn8eXxCTV5INGFNPEeBQkX6BRhwI0un3IpGItkdzZ7 slg1robVG0uAnL60oeCmDadH8zlAz6my5Gb5TOJ2baHKHK39U7k+amDT++A/gw== 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 4VTxzV0qs2zKRx; Wed, 1 May 2024 13:01:58 +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 441D1wPq000587; Wed, 1 May 2024 13:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 441D1wAx000584; Wed, 1 May 2024 13:01:58 GMT (envelope-from git) Date: Wed, 1 May 2024 13:01:58 GMT Message-Id: <202405011301.441D1wAx000584@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: c1b37d909e59 - main - bhyvectl: Add arm64 bits and hook it up to the build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: c1b37d909e59829ec1234fb9dbdcc8e545b37585 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c1b37d909e59829ec1234fb9dbdcc8e545b37585 commit c1b37d909e59829ec1234fb9dbdcc8e545b37585 Author: Mark Johnston AuthorDate: 2024-05-01 12:33:23 +0000 Commit: Mark Johnston CommitDate: 2024-05-01 12:33:23 +0000 bhyvectl: Add arm64 bits and hook it up to the build For now this implementation doesn't provide any machine dependent functionality on arm64, but it's enough to be able to reset and destroy VMs. Reviewed by: jhb Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44932 --- usr.sbin/Makefile.aarch64 | 1 + usr.sbin/bhyvectl/aarch64/Makefile.inc | 1 + usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c | 82 ++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) diff --git a/usr.sbin/Makefile.aarch64 b/usr.sbin/Makefile.aarch64 index 6302b6a78ef7..32612c1621ac 100644 --- a/usr.sbin/Makefile.aarch64 +++ b/usr.sbin/Makefile.aarch64 @@ -3,4 +3,5 @@ SUBDIR+= acpi .endif .if ${MK_BHYVE} != "no" SUBDIR+= bhyve +SUBDIR+= bhyvectl .endif diff --git a/usr.sbin/bhyvectl/aarch64/Makefile.inc b/usr.sbin/bhyvectl/aarch64/Makefile.inc new file mode 100644 index 000000000000..047e8d6c70bc --- /dev/null +++ b/usr.sbin/bhyvectl/aarch64/Makefile.inc @@ -0,0 +1 @@ +SRCS+= bhyvectl_machdep.c diff --git a/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c b/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c new file mode 100644 index 000000000000..fc0541203de8 --- /dev/null +++ b/usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c @@ -0,0 +1,82 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Mark Johnston + * + * This software was developed by the University of Cambridge Computer + * Laboratory (Department of Computer Science and Technology) under Innovate + * UK project 105694, "Digital Security by Design (DSbD) Technology Platform + * Prototype". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "bhyvectl.h" + +void +bhyvectl_dump_vm_run_exitcode(struct vm_exit *vmexit __unused, + int vcpu __unused) +{ +} + +struct option * +bhyvectl_opts(const struct option *options, size_t count) +{ + struct option *all_opts; + + all_opts = calloc(count + 1, sizeof(struct option)); + if (all_opts == NULL) + err(1, "calloc"); + memcpy(all_opts, options, count * sizeof(struct option)); + return (all_opts); +} + +void +bhyvectl_handle_opt(const struct option *opts __unused, int opt __unused) +{ +} + +const char * +bhyvectl_opt_desc(int opt __unused) +{ + /* No arm64-specific options yet. */ + return ("???"); +} + +void +bhyvectl_md_main(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, + int vcpuid __unused, bool get_all __unused) +{ +}