From nobody Fri Nov 13 00:12:11 2026 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 4jQd3v6xCBz6xrss for ; Fri, 13 Nov 2026 00:12:11 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQd3v5zpJz4Z3k for ; Fri, 13 Nov 2026 00:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794528731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tOwA2dbmO05N8XXYhiG1OzCYbtJe8e30gxIYlgl5tTI=; b=FLMfK7UyQaDuI8wpS0aka73/iFb6NZE7RcI/tyBZHdkD33MzzkbCjZoKZpYBJpnaU+JUyP YIknHWD7Q8wbmhDoEnSd37WCQOeajzrEMEYa/YOSRXblrGAyXHz1FIm+tcbUnEGt/H7eku UqeCYrEtYcE6vYRizgEzXceRZg3f54kJSDDlo1I7i18IPuEnhLyNujDLA4jBgfh2VMoRxn fiFfpgsrJ9+WddxXXHMbOWvOvH22v5BpneFwo1/cDdQB8gcY6j5XDJn2n/IH/NSwWe2SW6 JwL5AA1Qh1oQzNXyloBC+KxDISguQ0v0tViWnUWENlOhv9dVEl/Quj8yT89PvA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794528731; b=PONaGgSfOMdlOI3MJyumDsMp8QRosbYaR70YL2HsYOmNS4NEbx9p7tz+XxIg8SXtCpQAom 3IyeqybjW+VQfth6oxjsII5vWKBHDGj8Y1ZoYwKiF8uG0JFpZrCtkYnotW3Jo5SZbLsnwe hD91FIPpcG2vlN9f6c3qzTfN6htCAxQhXf3QbMnVBiOw2xgDUuijFVJEk/p7noS+Zea5+H +j5uELoATwm+6mhv/2VTAOEViqgYRKkyQKaiIYQLohH/hm9ZUOeB6KDTZbAarrXI8haVYd 6E9VYsL6J6jGLYEzaaOJhLr5sGiAohHC6uzxGnMCGW4BMzngJ2WSb0E8kK2wuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794528731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tOwA2dbmO05N8XXYhiG1OzCYbtJe8e30gxIYlgl5tTI=; b=JFMOY42+hnpnJQaWXB08Eyvep9fTe7IU6YBSZbvatjbAe8moCw4A+dFfsHE3a7TDW9XSJc oFY5s9u/R3V3gc3NNauGlAA2yPF7o/K/4g+Cx9Yx+oIQ3f/RUHD7nkB70wh6i4/sjuZroz nkApyhX/L/Zk2gxl93CQSaKTkf08zlt63cXqvHhnnd3h9Ccc39lGIPTjnrurO6JsNKtiq/ aUIxHcc9d1YbIugsvaN4gFX2nHP0/D0n4L9EiB5nHEKNuQuu4Yu6pRgKBiROporHyJK9Js 7t5aOJcXHqljeGJSOL8034siAITxn0WHjedK7d8JYiM7wjMYiaWRO7+DjZYPBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQd3v5fs2z1PNh for ; Fri, 13 Nov 2026 00:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 14086 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 00:12:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hayzam Sherif From: Mark Johnston Subject: git: 821f8ae42f42 - main - vmm: Don't assert on device errors in MOVS emulation List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org List-Id: Commit messages for the main branch of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 821f8ae42f42f8004567a2e202d031d76525bae9 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 00:12:11 +0000 Message-Id: <6af655db.14086.5c3322e1@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=821f8ae42f42f8004567a2e202d031d76525bae9 commit 821f8ae42f42f8004567a2e202d031d76525bae9 Author: Hayzam Sherif AuthorDate: 2026-11-13 00:04:20 +0000 Commit: Mark Johnston CommitDate: 2026-11-13 00:05:15 +0000 vmm: Don't assert on device errors in MOVS emulation emulate_movs() asserts that it fails only with EFAULT, but a device read or write can fail with other errors, such as EINVAL from lapic_mmio_read() for an access whose 4-byte-aligned offset is not 16-byte aligned, or from lapic_mmio_write() for an unaligned or non-4-byte access. A guest could therefore panic a kernel with INVARIANTS using a MOVS from the local APIC. Return the error, as the other emulation functions do. Reviewed by: markj MFC after: 1 week Sponsored by: Alchemilla Ventures Private Limited --- sys/amd64/vmm/vmm_instruction_emul.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c index b588b3618764..3d1a43644e68 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -936,8 +936,6 @@ emulate_movs(struct vcpu *vcpu, uint64_t gpa, struct vie *vie, vm_restart_instruction(vcpu); } done: - KASSERT(error == 0 || error == EFAULT, ("%s: unexpected error %d", - __func__, error)); return (error); }