From nobody Sun Nov 03 00:50:14 2024 X-Original-To: freebsd-arm@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 4XgwxL3J4Zz5b6Cw for ; Sun, 03 Nov 2024 00:50:14 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XgwxL03cYz4Z5K for ; Sun, 3 Nov 2024 00:50:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730595014; 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=GU2VXJnxVCFYTtu9ImRFheb9/5r21eZnbYnWYD7ZfNw=; b=LizFDYBDhAqThctsOMm6o1/gsFmexr0uGdzS4BKGC7XhGwiHpBboBuRHL+7px1zv8RPFG2 mrcoHlarPC9YzS27L3uiF5ES7gUSlt7paMyaiq0kgUNNqWYTYIUFgOZ2UDECL4TC1GfloC KqS8Ivd7v4PPRntn508AK5Ti+EhZKCg8zNDV1G3oiF8HJfPEsPm/c2xzTjXQtCBw9J6qCa NOLbNAzN/bv8M9ublUnYwOFPGMuHc6UrEofxCCigZrO8yengJXMhZhE4GnpXt5vZPNI65u XdtbeRuW2aMfqxpy+LTmYZsr2cYWLoVR1ydYL/w1mX7jZoyxtzZvPM28znirNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730595014; a=rsa-sha256; cv=none; b=FnrzmEZ6YtDZ2vjZ7bRr+4cbyhxpP2A5Eyi++tOqmwof5PiLTbDKNdx5h9fLl4lbiXNT/L EeF2r5djlJec57YEoWY3x3LheO3UTOXNvQOE39m87BM9vouhNLV6luLtGj6r0Z/uc35Qv6 3+VZumTt+TbyMJipr3cdCicGVFuLWzIaxq4AQ5TYPCLYjzQ+05uJEejtKrM3ejit1hZ/fq 58D136ElayKXPlW3LyoRd8TNYvwXSrJPb9IC+A05HtR/GGlaT0b0/OwXVB8V4y7VEjEJlt p0pnDtsEezUZsLk2WjVivXALWnHcd1A9hr+Ku2Xy+TY6Axs/FfCE0N1wehLMdg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4XgwxK6S5XzRZx for ; Sun, 3 Nov 2024 00:50:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4A30oDHp018948 for ; Sun, 3 Nov 2024 00:50:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4A30oDeO018947 for freebsd-arm@FreeBSD.org; Sun, 3 Nov 2024 00:50:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 282505] 13.3 kernel running under bhyve accesses unimplemented watchpoint Date: Sun, 03 Nov 2024 00:50:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282505 Bug ID: 282505 Summary: 13.3 kernel running under bhyve accesses unimplemented watchpoint Product: Base System Version: 15.0-CURRENT Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: jfc@mit.edu Short version: vmm might provide a bad value for id_aa64dfr0_el1 on my hardware. A 13.3 kernel crashes almost immediately running under bhyve on a RockPro64 running 15.0-CURRENT. Function dbg_monitor_enter accesses an unimplemented watchpoint 4. The hardware supported range is 0-3. The A53 and A72 TRMs s= ay 4 watchpoints and dbg_watchpoint_num=3D4 on the host. This is all too early = to enter the debugger or examine memory. I have console output and a register dump. Panic string is panic: Undefined instruction: d51004e2 The instruction decodes to msr dbgwcr4_el1, x2 This is consistent with the register dump, which shows dbg_wb_write_reg cal= led from this loop in dbg_monitor_enter with i=3D=3D4: for (i =3D 0; i < dbg_watchpoint_num; i++) { dbg_wb_write_reg(DBG_REG_BASE_WCR, i, 0); dbg_wb_write_reg(DBG_REG_BASE_WVR, i, 0); } The watchpoint count comes from dbg_watchpoint_num =3D ((READ_SPECIALREG(id_aa64dfr0_el1) >> 20) & = 0xf) + 1; I do not yet know what the mrs instruction here returns running under bhyve. The SOC has 4 Cortex A53 and 2 Cortex A72. --=20 You are receiving this mail because: You are the assignee for the bug.=