From nobody Fri Feb 28 04:29:19 2025 X-Original-To: virtualization@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 4Z3wGD3rJ2z5PHkd for ; Fri, 28 Feb 2025 04:29:24 +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 4Z3wGD1Z9Yz40f7 for ; Fri, 28 Feb 2025 04:29:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740716964; 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: in-reply-to:in-reply-to:references:references; bh=dPUn9bHh8gp+3zJa13MtgtK4YaI1RLpNtAoHqcXT0Dk=; b=ecJ0FNqGhS1ww8Dn6HPH1I/CA+pJweO3R+YA90eZQxE4rwPM/vK/AJDc4SZgIYzEPGLRor piF5Nex0Qz0HT2hsZBai8jNR2M3tmDW6ItmxXP2gT+n/emGy/sLTMiX1tpoFpU4xN5klJa aumCBv5b0aPDx8XpIY8m7Gs4jiMIFHKqBDfmkMRq5MUXhEhci5a3NCpAH6n8iL+54Ery/p mfAD8Ys9Rg/kTTrrCBY3DvPsQ5aBkahglEjv8/RlKKaUKvsdBsB+Cbsjs59KnGFEAThPAA dIWTfmq6gpQr2tpoqSkF9wnf64/oqiVTYEFv90aPJDa0ViP39CdgVY1+gIasZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740716964; a=rsa-sha256; cv=none; b=cwUhArv80lx/R6a7ftVwR2NWcKaWLSJ9naxFdcC7Wt0jWyYwmEhaNJCcwAIEf3xndi02wF Ks6cEj2OL+PxI3MPU0A0ba3+4eoHW6TgxxNsgFhF/aYz3oUHoXSd5zc+Lafxbto4Z+Ht3j RWBUZT/qEAkDOIEoJlxCffRikcc2DRkVCl+k0G0OtGG21oEmlawpk2ZHa2NMluZc8yMB0O Mt5+up4Qn5X44jn+3giTw5BN8Yks3jfdu5BCCQehgLAQJ+7ALeoEw3f+AGuV+TWY7i1ZYJ 2v3VwQ3OzIPTx/ialDzUPzMCi9blV7wPrFuXWyf0pPilcLnB2W0mZY1Ps7KVZA== 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=1740716964; 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: in-reply-to:in-reply-to:references:references; bh=dPUn9bHh8gp+3zJa13MtgtK4YaI1RLpNtAoHqcXT0Dk=; b=UmZJ/3Dtg8jnLH5X9X7hXZ0EO9OIPOgSPJ2nxl3ijbuVDmiPcNu9mzM6Rbb7Nf60w1gjz1 Gp7gUEFZBy/+ddcNkFTO+PYIGkb2TMvIwUilT/joDYdNLwUTSLJ+WvKLD1COyYZK/w8CmY lB3ilrxNA8pPlB0FPUt9HqerGh4HcCqYpnJg0JJ8xh2fqu/oUz4unl/booAY7nDZFerbSD gtvTm4Nrlz4bvZY+d7Zki6ak/x/SUDxQRFojyEZ5po+eJ7RR2GG/2lMC14CfGf2tT8rI3p hX5Vz43MLRiKavahn7BFLkrC7jijeCAJjl6dBYA87sjjSSX65oOD77zNCA/8Hg== 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 4Z3wGD17WFz1C6C for ; Fri, 28 Feb 2025 04:29:24 +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 51S4TOcc048491 for ; Fri, 28 Feb 2025 04:29:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51S4TOTl048489 for virtualization@FreeBSD.org; Fri, 28 Feb 2025 04:29:24 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: virtualization@FreeBSD.org Subject: [Bug 279901] glibc-2.39-2 and above on the host segfault Date: Fri, 28 Feb 2025 04:29:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: meta@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279901 --- Comment #68 from Koichiro Iwao --- (In reply to Koichiro Iwao from comment #65) This wasn't correct. > The bhyve patch means here is the following: >=20 >--- a/sys/amd64/vmm/x86.c >+++ b/sys/amd64/vmm/x86.c >@@ -152,6 +152,8 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, ui= nt64_t *rbx, > * pkg_id_shift and other OSes may rely on = it. > */ > width =3D MIN(0xF, log2(threads * cores)); >+ if (width < 0x4) >+ width =3D 0; > logical_cpus =3D MIN(0xFF, threads * cores= - 1); > regs[2] =3D (width << AMDID_COREID_SIZE_SH= IFT) | logical_cpus; This is the correct patch I meant.=20 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -258,7 +256,7 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, func =3D 3; /* unified cache */ break; default: - logical_cpus =3D 0; + logical_cpus =3D sockets * threads * cores; level =3D 0; func =3D 0; break; @@ -268,7 +266,7 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, regs[0] =3D (logical_cpus << 14) | (1 << 8) | (level << 5) | func; regs[1] =3D (func > 0) ? (CACHE_LINE_SIZE - 1) : 0; - regs[2] =3D 0; + regs[2] =3D 1; /* Num of cache ways */ regs[3] =3D 0; break; --=20 You are receiving this mail because: You are the assignee for the bug.=