From nobody Thu Jan 26 22:35:05 2023 X-Original-To: dev-commits-src-branches@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 4P2wWZ0SZyz3cCXh; Thu, 26 Jan 2023 22:35:06 +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 4P2wWY53b4z4DqF; Thu, 26 Jan 2023 22:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772505; 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=Dm2uJPdetippoqA0yEcFi00FC97RG9L46Wms0VOo6Uw=; b=HMoaha3jjXnE/kME+7Cx7fbaRrSAMGj2ikS1M0wbm7odT3jwkg6oFFJPhX21SrDN2j0Y75 kUIapJ0JJMoqyUmbtakhfuGozaGiLss5tQ9VVAPu3f2ghUbuw6CMtgmj8ggiHV8oCpjFMs Pn6tt9qllkzvwrot+L8VGlY65BeTVgveqtq732WzPOFhdI9AtmllgbUISlNvEaqDkQXYXZ gNcrHKg5+rFr2hlsg1U2F8XDn0wFlhGUq0n395BvQosk+9AB+rP2VDGVnJzgs/mrxu1BJs ZS3iLS/yy48bqlac6daRv7vxGM9k7NMVXeOMCYWGevJddZUx+pJKh0yeGXUMNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674772505; 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=Dm2uJPdetippoqA0yEcFi00FC97RG9L46Wms0VOo6Uw=; b=Ed0DO/CBqKd2HP4Wnehb0ajqcvERpUrrYlJKYT4Y6EsXZIfy/E350CO+VOUcoqX4BIT0ek I1olcZJz9cqgI8N37YTkWqLXPm6WgA5lq3gtbD5Cpa/ZJWgoFJ0laXkM7aSMo3w+vFxzaj DD1Dlqni2k+wAgnEfF6eJJGwgjZJQwjNDqHBZItux/T0wMv87X11zsefohj7HfvQLy45h3 wgA+6aV8mvLfCK4mhlUJzHrV3CjWhVHE9n7AHlYGdjHXSbmeVqQ/DNPtVVKsk7YbNGjWng ykYR7fErupB5UkiUKnZdSS2QzAGQ+yK+5G1W/6pPPTdGn1j2MzDqz882krwleA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674772505; a=rsa-sha256; cv=none; b=kOYwgAA8AVR5LkMsln/WJiCKx6nalM9NuNc9KZuqRp9PUXYW8se4K0C8S7iIoRMTNpQQBn CmT4x6BOfu74+5CaKA/vKVO+e+xEA+7cIrT9ZpRnI9wClksXFHERlEBaYf6o3Z1VUwgrZ3 uPl43GUArW0GF49oGk70318yJLCsSXfITROS3AN0FbLYNrdmTip8HcqNnQgt0nXyqbKl91 5NmRcRIby4OngGOAJBIDKG171vEI+MgW6yo2EFLD1ZlfqPLY/MgaUnDyEZB8A17yzPfy+2 0xTOKKNLZtJOhN95UfwdpJKZqjj+H3UZpVGKYja9Kfr6lz30KH+uT8JU4XaW5w== 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 4P2wWY3JJtzmLq; Thu, 26 Jan 2023 22:35:05 +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 30QMZ5ti051645; Thu, 26 Jan 2023 22:35:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QMZ5i2051644; Thu, 26 Jan 2023 22:35:05 GMT (envelope-from git) Date: Thu, 26 Jan 2023 22:35:05 GMT Message-Id: <202301262235.30QMZ5i2051644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 622e092eeca4 - stable/13 - bhyve: Simplify spinup_ap_realmode slightly. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 622e092eeca40db6229c891e8b29a79a69962f63 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=622e092eeca40db6229c891e8b29a79a69962f63 commit 622e092eeca40db6229c891e8b29a79a69962f63 Author: John Baldwin AuthorDate: 2022-12-21 18:33:34 +0000 Commit: John Baldwin CommitDate: 2023-01-26 22:18:27 +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 (cherry picked from commit e53fcff1848bb5acafc3dc38cfeb34724d9b0b96) --- 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); }