1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2024 Mark Johnston <markj@FreeBSD.org> 5 * 6 * This software was developed by the University of Cambridge Computer 7 * Laboratory (Department of Computer Science and Technology) under Innovate 8 * UK project 105694, "Digital Security by Design (DSbD) Technology Platform 9 * Prototype". 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33 #include <sys/types.h> 34 35 #include <err.h> 36 #include <fcntl.h> 37 #include <getopt.h> 38 #include <stdbool.h> 39 #include <stdio.h> 40 #include <stdlib.h> 41 #include <string.h> 42 #include <unistd.h> 43 44 #include <vmmapi.h> 45 46 #include "bhyvectl.h" 47 48 void 49 bhyvectl_dump_vm_run_exitcode(struct vm_exit *vmexit __unused, 50 int vcpu __unused) 51 { 52 } 53 54 struct option * 55 bhyvectl_opts(const struct option *options, size_t count) 56 { 57 struct option *all_opts; 58 59 all_opts = calloc(count + 1, sizeof(struct option)); 60 if (all_opts == NULL) 61 err(1, "calloc"); 62 memcpy(all_opts, options, count * sizeof(struct option)); 63 return (all_opts); 64 } 65 66 void 67 bhyvectl_handle_opt(const struct option *opts __unused, int opt __unused) 68 { 69 } 70 71 const char * 72 bhyvectl_opt_desc(int opt __unused) 73 { 74 /* No arm64-specific options yet. */ 75 return ("???"); 76 } 77 78 void 79 bhyvectl_md_main(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, 80 int vcpuid __unused, bool get_all __unused) 81 { 82 } 83