From nobody Mon Dec 2 21:34:28 2024 X-Original-To: freebsd-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 4Y2HBM1ts5z5gT64 for ; Mon, 02 Dec 2024 21:35:07 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y2HBM061tz458n; Mon, 2 Dec 2024 21:35:07 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2ee6abf124aso2643185a91.3; Mon, 02 Dec 2024 13:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733175305; x=1733780105; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=W59pfqJUiQ7ueFzhUETu0seFbfCMN/DPtsvSPMMYwZI=; b=fe8HBcHHoAGmpboJ6JEsdy70b0jiX3pxuwbh3LFdzl8Ys4rFktaRnw+qUJMwsqvBjQ bHOYeNrwR+ScbEUz+K+gWMHYIu+NL6uSDr2MHZ+VS3opIr/qWFle5XRcuWKEMI0tpDFD pBmUMNHE7Wr+aATCgk3HG/ely0HhHI9Gj+NP/nlQc+zh6FPSfdhS2gnbEj49QL3YaisK B3DvK+4/9X88cMc2SOLoqK8L0TtbqPpjkW9k1kStz0nepP9Uz8OEAPGMRmKmwIFtd9BV gWMbCW1bJRbCTBV4I8CoAUQqN/dBMuIsobx7+H88q5OGhKVH8WEinYMiv3kEEvtREswL UzXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733175305; x=1733780105; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W59pfqJUiQ7ueFzhUETu0seFbfCMN/DPtsvSPMMYwZI=; b=WGNjXe4pL9EScu4Wfe4VycSyEj9/Gz9kMPaDerr27gx12T3ySZQnCzCyEj4UPKNx9N BVJ3trfN9GYc/LiPcG0M3NV0dvtO3eAspEjhsMQVG87a8ImJUGjy+1c3gwFgLUspwYMa PWcSST4cbke4Jo6EIuD7fUiMY6IrpiSzfuR/SUFMc+Gwfw2JRFPBbWIso7mmvFzlZ13l py8fbaF5yKWTlsacitpJIyANKeFc6+eAvNi/2lTo7HXycHb+GZH5YDWu6hyo6wm2gVTB afVdbE6AqntItlf48RiSTkwZNHtvO7CGsnPC+5XelGGxSf0vWLdcezxhoYM6imS6u5vR Y2og== X-Forwarded-Encrypted: i=1; AJvYcCXa3VxacDcJR6est5B6ua1DvW62Q9mRyvjwAoRSYQj7bn8HSf0PyID1XhWc5O7wOgL3DcqO8d32Kzmuh5JYNxzIG5hJN5T1@freebsd.org X-Gm-Message-State: AOJu0Yw2cnMrQsY8QMdNirhxZeyidzWHNAbJa2JIz1dCemZiWLzXv9H5 JVlrFXO4RkP2euJKw0Mw8MLhGUmsggdxvzVRj1r9OL0A+i+GcimvmhP/C8md6TlgbCnpUN8fP7l pQeP/TrO3Nba+It42WObTtDooAbQF/rzvM9QQ8A== X-Gm-Gg: ASbGncuGIVF00iYtl3H64clExrlRfTTaeCS5a7T4qwADZWsWd28WPVwDG3Sg1gnKqXT 7h2pT7JewaVBlJarDhe7IdCwqrga7o3Pz X-Google-Smtp-Source: AGHT+IHdnopJssHJpWNLCXxrJsXFIADbW32TnFVvDzhoJfw/hHC7b7UFHtuFmQiumz26SyhS9xvaNl75aGvuCKx2+dM= X-Received: by 2002:a17:90b:3944:b0:2ee:9902:18b4 with SMTP id 98e67ed59e1d1-2ef01244d2dmr109753a91.27.1733175304941; Mon, 02 Dec 2024 13:35:04 -0800 (PST) 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 References: In-Reply-To: From: Mario Marietto Date: Mon, 2 Dec 2024 22:34:28 +0100 Message-ID: Subject: Re: Failed to emulate instruction sequence [ 41f646040874064c017d88eb144c89 ] at 0xbea5fcf9 To: Mark Peek Cc: =?UTF-8?Q?Corvin_K=C3=B6hne?= , FreeBSD virtualization Content-Type: multipart/alternative; boundary="00000000000062799506285052a6" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Y2HBM061tz458n X-Spamd-Bar: ---- --00000000000062799506285052a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes,I have also exchanged the bhyve binary. Now I'm trying to apply your patch and then I will rebuild vmm. I see that your code is : [0xF6] =3D { /* XXX Group 3 extended opcode - not just TEST */ .op_byte =3D 0xF6, .op_type =3D VIE_OP_TYPE_TEST, .op_flags =3D VIE_OP_F_IMM, }, but it seems wrong. Shouldn't be .op_flags =3D VIE_OP_F_IMM8 ? On Mon, Dec 2, 2024 at 10:16=E2=80=AFPM Mark Peek wrote: > On Mon, Dec 2, 2024 at 1:05=E2=80=AFPM Mario Marietto > wrote: > >> Hello Mark, >> >> I see that your patch is about to modify the code of the vmm.ko module. >> I've just exchanged the vmm.ko module that I'm using on the ZFS system w= ith >> the module that I use on the UFS system (where I don't see the error) bu= t >> this operation didn't solve the problem. I suspect that the wrong code i= s >> not inside the vmm.ko module. Can you offer a quick technical explanatio= n >> of the reason why the exchange of the modules does not work for me ? >> > > I'm assuming you applied the patch and rebuilt the vmm.ko module. Did you > also recompile the bhyve binary per my comments in my last message? The > emulated instructions are detected in vmm.ko but are emulated in the bhyv= e > binary. In other words, vmm_instruction_emul.c is used in both vmm.ko and > bhyve. > > Mark > --=20 Mario. --00000000000062799506285052a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes,I have also exchanged the bhyve binary. Now I'= ;m trying to apply your patch and then I will rebuild vmm.
I= see that your code is :

[0xF6] =3D {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* XXX Group 3 extende= d opcode - not just TEST */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 .op_byte =3D 0xF6,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 .op_type =3D VIE_OP_TYPE_TEST,
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .op_flags =3D VIE_OP_F_IMM,
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 },

but it seems wrong. Should= n't be .op_flags =3D VIE_OP_F_IMM8 ?

On Mon,= Dec 2, 2024 at 10:16=E2=80=AFPM Mark Peek <mp@freebsd.org> wrote:
On Mon, Dec 2, 2024 a= t 1:05=E2=80=AFPM Mario Marietto <marietto2008@gmail.com> wrote:
Hello Mark,

I see that your patch is= about to modify the code of the vmm.ko module. I've just exchanged the= vmm.ko module that I'm using on the ZFS system with the module that I = use on the UFS system (where I don't see the error) but this operation = didn't solve the problem. I suspect that the wrong code is not inside t= he vmm.ko module. Can you offer a quick technical explanation of the reason= why the exchange of the modules does not work for me ?

I'm assuming you applied the patch and rebuilt= the vmm.ko module. Did you also recompile the bhyve binary per my comments= in my last message? The emulated instructions are detected in vmm.ko but a= re emulated in the bhyve binary. In other words, vmm_instruction_emul.c is = used in both vmm.ko and bhyve.

Mark=C2=A0


--
Ma= rio.
--00000000000062799506285052a6--