From nobody Fri Mar 17 10:29:33 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 4PdL3L1FrVz3yBcK; Fri, 17 Mar 2023 10:29:34 +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 4PdL3K5FlYz3GtP; Fri, 17 Mar 2023 10:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679048973; 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=uwJ6q8tE+aV4CUyx/9jsMk+Zqwh0JvTznUJykzTKJpE=; b=DMbfqKtOD8CyO0G3mKw2v4qKzrdVPpCTKxwV/BHWKLwijeOyIiU7Z6yKREibD/Uibr+z+1 H02wJqAbIjrNtevetGnYClDiHbKeorFFIStWfkN2HyVDZSDHtj+uJy1x/Ju24pYDuXTuE7 mVZ9y53uhh8Zuspx+ZOlzJXXajlxJeg8BrBcBFb9bK1sKEXwdFtAHAdOamx+nrJAz9Kgep 7myUbIQZ5imudIo/KSVTdpnRwke1jHNQ7dpxPSY9ORaGVGUI3rtHwWAULxkWwEVqnkf9M/ 2Tlz+i46r+5D3yJGEONWijFDdxKWDWrKmcDaX11CXea4opa6RiB/SM9/qJzPpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679048973; 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=uwJ6q8tE+aV4CUyx/9jsMk+Zqwh0JvTznUJykzTKJpE=; b=pNRgBOfmkZNk3vOlWUGjnSqyYTZr33coZS9kdiDoR1LIFd+RWU4s4BShOUbumOb4tOj4Zu FE3KXHAVMggOZ8AgDy475ZHXUHktGL/jgr34BcoRBg6G/xOZtZ5Xukg/085yv44MEukOlH sUVXbTmfjZH+OSAMJhs93xK0d+zWKA6S6TJr5HGnKxMIVFOLIDbBBITAL+pMA7Z5DPsTlU RfKnUHtlbh+eMeun+Gbb6NrTToJsyPNQ92p05HCDXzEk9pUmxQLA1ZWjkSF0vDrghq9CT/ VIRbkn18N25GO/rE7+JiY5WAgM0gVW19JXlWMnpI60GvomZVBonmksBvpJOTRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679048973; a=rsa-sha256; cv=none; b=k585aIglGmnVgW8bF4WNzPAmRdbCEI23H97tve/svEZ7mxzCsEfQpbT1ij7/JlvzjiHCEK yu58UdKO7bfUZ2hAt3k1ndwxReHBR+M4G/ojZDTf3LBTV2qbudXhAzmSk9jpTUeXB8dE72 F4XqrXb4bD1uBcm6Jf75DxqzQEE0ojvh70AKMygbVAlfCfyji5atNe//FJ4b9u5UvrMVfM r0GL4K4wny43Kf7wyhqoK/0CQJszqYFlNWxhQTsgddamP81VT37G/8TP/i7/GlU4GjBHCX 2cyPt16XtbPKR4vtvHzXhLrp+b8nQy1vXKTr89lxZDqW9nK1wZrYK06SzIuTAA== 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 4PdL3K4MMbzMLy; Fri, 17 Mar 2023 10:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32HATXeM067533; Fri, 17 Mar 2023 10:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32HATX5Q067532; Fri, 17 Mar 2023 10:29:33 GMT (envelope-from git) Date: Fri, 17 Mar 2023 10:29:33 GMT Message-Id: <202303171029.32HATX5Q067532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 6efb053bea5f - stable/13 - bhyve: exit with EX_OSERR if init checkpoint or restore time failed 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: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6efb053bea5f94e2c29adafcaf5b9c56d99fa220 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=6efb053bea5f94e2c29adafcaf5b9c56d99fa220 commit 6efb053bea5f94e2c29adafcaf5b9c56d99fa220 Author: Vitaliy Gusev AuthorDate: 2023-03-06 12:30:54 +0000 Commit: Corvin Köhne CommitDate: 2023-03-17 10:26:35 +0000 bhyve: exit with EX_OSERR if init checkpoint or restore time failed Reviewed by: corvink, markj MFC after: 1 week Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D38872 (cherry picked from commit d213429e42d48c7de56baf60befd5d953654d337) --- usr.sbin/bhyve/bhyverun.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 3ff83f55474b..bf7b4856a2b4 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1579,12 +1579,13 @@ main(int argc, char *argv[]) /* * checkpointing thread for communication with bhyvectl */ - if (init_checkpoint_thread(ctx) < 0) - printf("Failed to start checkpoint thread!\r\n"); + if (init_checkpoint_thread(ctx) != 0) + errx(EX_OSERR, "Failed to start checkpoint thread"); if (restore_file != NULL) { destroy_restore_state(&rstate); - vm_restore_time(ctx); + if (vm_restore_time(ctx) < 0) + err(EX_OSERR, "Unable to restore time"); for (int i = 0; i < guest_ncpus; i++) { if (i == BSP)