From nobody Wed Oct 11 13:25:23 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 4S5D6C6LKZz4xNvv; Wed, 11 Oct 2023 13:25:23 +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 4S5D6C5DNGz3HNm; Wed, 11 Oct 2023 13:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697030723; 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=P1+1260G1hiGi0uDD8/yV4lmrJSy91E8djG6DKu4qaY=; b=fRipw8V8p9SDduYV9uRcti1Zz7r6Ld0RUyTBr+AoirYMP8X/z4Z/VIezWsTvWF+qNVrFH/ vAKJ+tIZCBpWyA1OOG7ErKA/0B4AWitELsMiBsuasqtmyqcpQn23p1Ky3T/kXZS4cKgLZR dpoYFYNyY23K04iaWz/1O7rdsMWvBGxTsQYKm5XEubtrT7dEbjHyqcEbDA/0yOafbOOP7m 9pVQ+6Lu0EOe+AIMVYzfsL0VD/qymFsj0ALy20ZlEEFdujcpPiQjLlyQLK+s84aNFP2uRo PvPxV5C8//iMvmZqs/JLQ10mJnF/4qQzEoxnYO1Tn9W3bZHgGCfVnIJOSVQntw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697030723; a=rsa-sha256; cv=none; b=isejhm45qFM6Hc7Rfe5VNMBsIx57/WOeM6e01jIDJzGZPAkMkQ1HkI7bSuzx9cPsX8I7Rk 3BX5eUQdi9bTn7iOrwwDn2Q+XaP46kZsKWSvm1eSC6sJkEVxWBtCdmBcQPU+Dwvu9xtc+m bkk8iOabzGeFOU99u7m54Mp5dBK6qAaI5ukEhzdK4Q0fBhMBbRR02glfxdhkHa+euHUTnf PCbfW0P4JMskSaBoa57CNyDyEVAuLq+RjvqMkIvXUexXYMx5jDWVPDelKog6LNhoLoTFox VhFJtJKJpotQkFAqfEBCxMHDuX3x6QdzZLxua+QD73fFhRaThqF5/W//bJayag== 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=1697030723; 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=P1+1260G1hiGi0uDD8/yV4lmrJSy91E8djG6DKu4qaY=; b=DdFFUZ/akaP/+UHFjLrUa8aiYHZrRR7ny7+iJiF+AM+BAeNB53+Qrn/XAjD2J92t+OKOCE kQ82X+Scjy8RVuOv7IVEtJ4ipscPUy9MSin95uYCNhCyPe5+0hAzif06VZufzzSv0VoN9r c6aA4yJ5Ba9LaspQAipTdJzsoFfsudl9soN862/9IN19aK8M6nLXIMw56tODMoZz05yA4+ OdcKn79muFXpq8hOLpUUtmdBGmHwjcpEMWt7/S1uqmvnND8XQVNje9jeUoW7lJ4gXIxV/i 99LxFCT9vwjAT2WvvkpgQE6adMWGMX3lYEMil/XRSLzQFS0BXipQzpTxHGkCWQ== 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 4S5D6C48Vvz7MN; Wed, 11 Oct 2023 13:25:23 +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 39BDPNfA090776; Wed, 11 Oct 2023 13:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BDPNvn090773; Wed, 11 Oct 2023 13:25:23 GMT (envelope-from git) Date: Wed, 11 Oct 2023 13:25:23 GMT Message-Id: <202310111325.39BDPNvn090773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8f485cac6302 - stable/14 - bhyve: Move the vm_inject_fault() implementation to vmexit.c 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8f485cac63024e1bd3a5328cdb2ccc08df364666 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8f485cac63024e1bd3a5328cdb2ccc08df364666 commit 8f485cac63024e1bd3a5328cdb2ccc08df364666 Author: Mark Johnston AuthorDate: 2023-10-04 16:29:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-11 13:24:41 +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 (cherry picked from commit 7228ad8da93bcce820c85b733972d0d9cc767d27) --- 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 e3b297cfccca..eda9711bccb8 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) {