From nobody Wed Dec 21 18:34:07 2022 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 4Ncht81gNTz1Gj2F; Wed, 21 Dec 2022 18:34:08 +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 4Ncht76nBXz40rD; Wed, 21 Dec 2022 18:34:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671647647; 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=YdaqSqDFCxECabAIsWki4YQ9rE404mHtf1NWse7DxUA=; b=WFOKc/h4kYsSLyL2d+7j9xQAcYbZqPnVGU8ouKGrD2xNlFdXtxeeD9Qx77Qzc6X/nPh/jS 4VN0JyvxlB0xTcaq5j9XP3HRxEbef6M3K4oKcBI9mBz95xdqMcik+tMA4RHFYrZOMScFV/ TgeKTSN/v0D6IZphI/IgEAvH7ZpAAxPCJWVOD3Us1IOuy5qyq1L9hwYWxYMVHQTl0pILsF bxwxl8wT3xYsBQ/fn93+e6g2VPuft8BeYAg9uthicvijaiKWe0Qo53Lt6PoWpmRhNZZPg4 CS5UrtFPTt/bWxLEGvvhOFx9ybNqE4DXb7TU6DwTk+YMqhlFYCOmx4ViFNpiVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671647647; 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=YdaqSqDFCxECabAIsWki4YQ9rE404mHtf1NWse7DxUA=; b=fypauxXSLJO22ahNQVFLUUEM7wFc39MiuJqa81ABUL+vQSqYPESi5MWTwe2n1rzvXP35Gf 4+Rh/WRolsk4b9YJxEjCoPFGJMLoNMOF3h48jt5LcfYWDe4Kg8zHkaUWucw/lS6QaGrr6H WR4PY8v3j2UZPoygLNLEhMpcH04oxStlpVFZOZP6YC8PFzwxR0VZfGMEfkv8vkjePXbzbi nUkJfKwrNE+USKeAua868kxdqLTdgyiEgsWnRSKfi1bxXQ7ep+hnX9YZ2z2gw6OxNzhuDX zbi8wbgU/JwRdOqf4dDqippAKkQY56bKg/HLFduP7re0ai22Vtgs/joCyaHm2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671647647; a=rsa-sha256; cv=none; b=JBnPRzMq6N4VmVE3f9xhosX3PVGBrZKjQ5x9R9D7Rgbw9D1YH+D0/hCm025UjHAx7RYajn felOM13YKS0fkcCLps3mSf8U2WaNnzymEM+VfbGkni97IlesPKxZmgRkRqhh4VqcL7GJAl v68nnC+RayNn3EwYpcv4QhI2/5MQuZ27DGhIB8jQIfnv37b+uWZvdP3tyTmrt6R7VFr2aM JhItLtgvQcATxOI0C9hQ5qz2B3BMHdUQAPrNWWeRQHlxvgwwrZpJ9s15J8ojVRz+ONfMkN goE86RIA1SiwST/LrNPQVFFZYhSwp1gS0vH98/ZTGZePZ+DVQnb56dyXvFkFMA== 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 4Ncht75trzzQLw; Wed, 21 Dec 2022 18:34:07 +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 2BLIY7Sf068973; Wed, 21 Dec 2022 18:34:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BLIY7CM068972; Wed, 21 Dec 2022 18:34:07 GMT (envelope-from git) Date: Wed, 21 Dec 2022 18:34:07 GMT Message-Id: <202212211834.2BLIY7CM068972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e53fcff1848b - main - bhyve: Simplify spinup_ap_realmode slightly. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e53fcff1848bb5acafc3dc38cfeb34724d9b0b96 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e53fcff1848bb5acafc3dc38cfeb34724d9b0b96 commit e53fcff1848bb5acafc3dc38cfeb34724d9b0b96 Author: John Baldwin AuthorDate: 2022-12-21 18:33:34 +0000 Commit: John Baldwin CommitDate: 2022-12-21 18:33:34 +0000 bhyve: Simplify spinup_ap_realmode slightly. There is no reason to modify the passed in rip variable. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37647 --- usr.sbin/bhyve/spinup_ap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/spinup_ap.c b/usr.sbin/bhyve/spinup_ap.c index af8d40030a08..0498ee91232d 100644 --- a/usr.sbin/bhyve/spinup_ap.c +++ b/usr.sbin/bhyve/spinup_ap.c @@ -45,21 +45,20 @@ __FBSDID("$FreeBSD$"); #include "spinup_ap.h" static void -spinup_ap_realmode(struct vmctx *ctx, int newcpu, uint64_t *rip) +spinup_ap_realmode(struct vmctx *ctx, int newcpu, uint64_t rip) { int vector, error; uint16_t cs; uint64_t desc_base; uint32_t desc_limit, desc_access; - vector = *rip >> PAGE_SHIFT; - *rip = 0; + vector = rip >> PAGE_SHIFT; /* * Update the %cs and %rip of the guest so that it starts * executing real mode code at at 'vector << 12'. */ - error = vm_set_register(ctx, newcpu, VM_REG_GUEST_RIP, *rip); + error = vm_set_register(ctx, newcpu, VM_REG_GUEST_RIP, 0); assert(error == 0); error = vm_get_desc(ctx, newcpu, VM_REG_GUEST_CS, &desc_base, @@ -87,7 +86,7 @@ spinup_ap(struct vmctx *ctx, int newcpu, uint64_t rip) error = vcpu_reset(ctx, newcpu); assert(error == 0); - spinup_ap_realmode(ctx, newcpu, &rip); + spinup_ap_realmode(ctx, newcpu, rip); vm_resume_cpu(ctx, newcpu); }