From nobody Mon Apr 29 14:18:13 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 4VSlmP3Dmsz5JQfh; Mon, 29 Apr 2024 14:18:13 +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 4VSlmP2PwBz4Fym; Mon, 29 Apr 2024 14:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714400293; 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=5XE6PnocBMZyXiGUZEJpx+jXkn/ngqfsqbGMRjWaEUw=; b=UHS27KAxvvOMx2nyNxt751LiECcwOOOdLVgx1lKWfFDEMoHXmdTmaTSp+7CWKL5BBWripz 5vH5Rvd5GF7kCk2ByOTPPJ9y0UaFI7pqaipX7ZxYO9s1gj4dNO/Vq9c1Ltarf1qJOszH7q Niw0kvmcHxzApmhkryA2ExiQNZ5FDZqrGPE5+U5Ttutt/uKhcWsqBv2LWTZ8ZrIsmxQ8pa W+WVbyWN6WB0JbSff/lewSCdAlqb0CbrRAQNSBANxySpUHWM+nG8otYlNtETvy53SSje/0 h38jcX7UQnhPxmrUne3sthZiEZvWhGLCm8LCf7Z5RFmzw+2m9HdVkQdYMuzTAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714400293; a=rsa-sha256; cv=none; b=FNeRGwZvmfmBuWKPZcAD+/NCMY2D52V7NBDgrumRIrEIGMf4hTzJWP2Cxkfei63KE1TC49 YJiLW1K2dw/AzCUpXeRftJR+DCpq57YQLREkrB1ZJOelcH3tQyKMkI3bifInn5HD0Yu2LU wrlnkUdKFXbf9/rsENHDhY91c5G779820esrfmq6j1zuvph2EZHa/1VrIA2S5oiGoo3TYN acuNFcMOdTy+aJ1p7iJCYNFOsdXUsr4ra9/vR06VNdv6joTkp2L8L119ViZ0QrD8y/kK21 F7E4LfTktIG2dud8SAkM9Iab8NntuUKIw+WKIoTFhiZPzTdaQOv3iYnkOhBg5A== 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=1714400293; 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=5XE6PnocBMZyXiGUZEJpx+jXkn/ngqfsqbGMRjWaEUw=; b=TBGPUHeQHbjV+jd7BKDPZGotp254jcNwsi/Bojkc+xQ8ItI89xH8t+yDGViq5r6bVb/io9 3iPOCqf9FO63/y2+qLCmuYDG7WoJowAfLFgaJG2qOP+6i1CUpvtDP0ofi0TIpH5ylWdy/X tBMWPSgWnY8POKdAuuWPEq3jI7MN/+HMN/1em84BD9nbeM2A1minftzC/hqgYdtGwSkttt Acuoo/qf1EBIiee+omEfqgXtEGN6yaiE4k9SlQsQXZ8OnqV/BvKsaQRuvgzERyknhLtZ6F AzF5F4X1jd5OUBrNHKnbOzp5jcnJe7FEPUIMure/vR2d3rLzdurh8TdyyqjGtg== 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 4VSlmP20yYz1Bj1; Mon, 29 Apr 2024 14:18:13 +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 43TEIDvB046948; Mon, 29 Apr 2024 14:18:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43TEIDUx046945; Mon, 29 Apr 2024 14:18:13 GMT (envelope-from git) Date: Mon, 29 Apr 2024 14:18:13 GMT Message-Id: <202404291418.43TEIDUx046945@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: 390e44988aea - main - bhyve: Fix handling of -r 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: 390e44988aeaa824a9ea4f0e352f9a252093c170 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=390e44988aeaa824a9ea4f0e352f9a252093c170 commit 390e44988aeaa824a9ea4f0e352f9a252093c170 Author: Mark Johnston AuthorDate: 2024-04-29 14:13:50 +0000 Commit: Mark Johnston CommitDate: 2024-04-29 14:13:50 +0000 bhyve: Fix handling of -r Just make "restore_file" a global variable so that it can be set by the MD option handler. Reviewed by: corvink Reported by: bdrewery Fixes: 981f9f7495bb ("bhyve: Push option parsing down into bhyverun_machdep.c") Differential Revision: https://reviews.freebsd.org/D44974 --- usr.sbin/bhyve/bhyverun.c | 7 ++++--- usr.sbin/bhyve/bhyverun.h | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 1c3b810efb02..d199c32cc54b 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -100,6 +100,10 @@ uint16_t cpu_cores, cpu_sockets, cpu_threads; int raw_stdio = 0; +#ifdef BHYVE_SNAPSHOT +char *restore_file; +#endif + static const int BSP = 0; static cpuset_t cpumask; @@ -656,10 +660,7 @@ main(int argc, char *argv[]) size_t memsize; const char *value, *vmname; #ifdef BHYVE_SNAPSHOT - char *restore_file; struct restore_state rstate; - - restore_file = NULL; #endif bhyve_init_config(); diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index e6ff90e5daa0..005de6dc5410 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -37,6 +37,10 @@ extern int guest_ncpus; extern uint16_t cpu_cores, cpu_sockets, cpu_threads; +#ifdef BHYVE_SNAPSHOT +extern char *restore_file; +#endif + struct vcpu; struct vmctx; struct vm_run;