From nobody Wed Oct 04 16:54:16 2023 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 4S114T2VNcz4wH9h; Wed, 4 Oct 2023 16:54:17 +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 4S114T0ZDBz3DN1; Wed, 4 Oct 2023 16:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696438457; 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=8lxM8k8BOlEhiakCGU7CAmiYXn8oC41zTeFxiuf/cbA=; b=cbhhxuUMiMzt3VFHV9GaDIupHfHrBehOkrVchJDGwmfgactkEga402lCKTFZ+otd6GycZo +Ua+n6ZR7J1h5XjO301bErGhZjGp5H4Bb5Rc6FxD6GEzaS1uokQJukZdxJdxTNmo33Pv68 lUxnIvMDatD82v1N3UfIX41ebgpqsRjnOXH/DXFfV6T5GrmD88UAs6ecsGYj3FiOiC4EFR t4BQ1KO03S7T8YAOOqG+J1Oc8JIFeRHK40Pqv2+kdgD9EhZClu9h/SAU0pcgBhaZTCHbxA anSk+FMRWE7+0BlcKirf1nq1xP1nBdDWuXHbIlPnSiSuB5/jGV1BqZHZSeQCpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696438457; a=rsa-sha256; cv=none; b=Dnvzs+sJTsfcyMiFn2NSmrO/rwMLH4L1Tx+LRZBJxcq7Lboyfchb6O9ql33bcUlJcIE3dG lsJtGlVPcEF7xqxAZQsA3yxMWLVSEE1Alauxzdm+wyqIhBr3IAd49lbh8MzeJ15ETPiZPp csE3TsomZ3C+VZlFVxIDVYv4JnDNyjqW1+bIT/HpS6WtGK0OmAJIzqpmucjL55mhUbX+qo gm5ucOh/Q/vZbMwtCvNuowftoBvZDI2xOv+WwBWKBC25Rd/splhCJGEXZjz3u/Uuh9Du3m oD3JgBixajb5jsCcKBFCeWpfQkaIDs9k3MK2HcL+9R+FGp2pz/MQpuVLaTV4EQ== 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=1696438457; 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=8lxM8k8BOlEhiakCGU7CAmiYXn8oC41zTeFxiuf/cbA=; b=QSQ4ZUFh78Zx/Q4uGOUxefvfB6J2jKjJ4U4B/B+MFROiTq1k2uFCOOHfDC8uLIkbYkiwii 2bTiziaObb9B00RjlN0s+jkCyALV92pCJ2VG1Uj9/H/bNX88V8lyOC71WU9Skp0lq/9NW2 x1cS+NvQd4XIJis2p9X5CzaD7u8otM2EszDuaJM3Fw88wwhxXR7DCmLSrcWk3FeK08/cRG xOW1RckFC69aT9PuayPbqCcLzXNXicuVzi2lDqvQ6P2Wa1Z8nX7vw+MYQl5qUPfzn6sSNk mTrFQ5K9tZz62NeHzT157z+N1OcbAP5zZUxZXdHtJmw9pzd97vx0zWOGa/6D0w== 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 4S114S6bh7zlmH; Wed, 4 Oct 2023 16:54:16 +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 394GsGaN038423; Wed, 4 Oct 2023 16:54:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394GsGkZ038420; Wed, 4 Oct 2023 16:54:16 GMT (envelope-from git) Date: Wed, 4 Oct 2023 16:54:16 GMT Message-Id: <202310041654.394GsGkZ038420@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: 7228ad8da93b - main - bhyve: Move the vm_inject_fault() implementation to vmexit.c 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 7228ad8da93bcce820c85b733972d0d9cc767d27 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7228ad8da93bcce820c85b733972d0d9cc767d27 commit 7228ad8da93bcce820c85b733972d0d9cc767d27 Author: Mark Johnston AuthorDate: 2023-10-04 16:29:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-04 16:53:17 +0000 bhyve: Move the vm_inject_fault() implementation to vmexit.c This function isn't generic and has a different signature on arm64. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40991 --- usr.sbin/bhyve/amd64/vmexit.c | 13 +++++++++++++ usr.sbin/bhyve/bhyverun.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index 152fecaf424c..5d903d98f277 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -56,6 +56,19 @@ #include "vmexit.h" #include "xmsr.h" +void +vm_inject_fault(struct vcpu *vcpu, int vector, int errcode_valid, + int errcode) +{ + int error, restart_instruction; + + restart_instruction = 1; + + error = vm_inject_exception(vcpu, vector, errcode_valid, errcode, + restart_instruction); + assert(error == 0); +} + static int vmexit_inout(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) { diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 8d9ad3750d43..027042cf0c14 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -380,19 +380,6 @@ build_vcpumaps(void) } } -void -vm_inject_fault(struct vcpu *vcpu, int vector, int errcode_valid, - int errcode) -{ - int error, restart_instruction; - - restart_instruction = 1; - - error = vm_inject_exception(vcpu, vector, errcode_valid, errcode, - restart_instruction); - assert(error == 0); -} - void * paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) {