From nobody Mon Dec 02 21:04:57 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 4Y2GXJ2k5Yz5gRKb for ; Mon, 02 Dec 2024 21:05:36 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 4Y2GXJ0fjKz419l; Mon, 2 Dec 2024 21:05:36 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-21577f65bdeso13331725ad.0; Mon, 02 Dec 2024 13:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733173534; x=1733778334; 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=HpFV+5khVZE7q1hIKaiQ8Z/y/ajKTGR1C4pkBwJyuCc=; b=N7T94QBIVpV7aep8hnLnrBVRy1A8OTXO9iuOmuFi5mHQFwxmIbkv42RGrVHz5hnsCG u7rzZEC5ljCxnI17b4J364N1XcdgyF9DBNRinTg2W6set+oCptHd7WkQvj4rqL97gx8v Zdlp0hQliAbd7p9pU3Ec46XwAygEP15wiJ37CIPHCbV6RFZcWfLE7OeAn6qq/OPV0ATb UhQ16iuevwdlgwcuz2VYOJgttdPIoIzxwpQ3foDhJfT3KGWIOCsPI0G3prgjB88oH2Oo 5gSXFRfsfHoh9ZoLEz1m1ecZAU9I+kYzFoD4RPbJAkw0rlugVOlljG8fUFUKzjwRdwEQ PwRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733173534; x=1733778334; 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=HpFV+5khVZE7q1hIKaiQ8Z/y/ajKTGR1C4pkBwJyuCc=; b=ZRc+Se7Af/8L+ms1KTX7LSUiMqSN+lVEfeRZ4yagPSTB+Iv73BI7kgVmIBj/fLA4N1 PwaGler3x6vcjtzQvUKw9iGX9snsLwgJkFVCFpmXjqkNXUV28LAgODBquyvLcULzCUTX kBLu+V9LxCOgh9XipCoTkX7cEbjPq9R4NuD+cNXHoPvtxpLIGdnjIVs3BREWW3eYxTuZ idb9p5RoaA3HEFQ/AAjleb+MyLiNakSQGu2fMke5pwaKCUdXeks0EXA45m9swB5KwFMA DczCVekTkj/84KRYSkdF/W03ks+LEse4A7jrruhgQPNa7JxoeofNyQquI92baFPPCnJg NI5g== X-Forwarded-Encrypted: i=1; AJvYcCWReG/HZAKQLb1hj8p6GOEZ7ZdGD0dF3UrdFX7cTrUQtFT002+RaR58/rB8oyrnxPj7ALb4cgKnh7uxnLfcAX7Uaj7U13Jj@freebsd.org X-Gm-Message-State: AOJu0YxgmEFn/x/FgiHWwPTEajtkQHJyPS++JXAkP2/km5FsIGILxklh mKhyoJiYQf/QTBq3XiB8NfR9pMFlQ4fhDWXwDQ5H/cF8HvvrkkNNFTjhX6y3PW8gRKAJJDaFe5d w729gn7lishMSX8Ur3PYRvlft5WPVz/+WrD0= X-Gm-Gg: ASbGnctroxBjUdx2rroPMYkxjl0ENursEy9+rBMwURT3UKXkytfyemwTlD9DRdHtE3V W6IR051yh/jUbvfJzCgzJa6cq1Kzew8Av X-Google-Smtp-Source: AGHT+IEjYw9Z/GJOfUFnUA32ij2xlvXmiFZs2AsDzQaX0DvsetiBLc70nDsqEQZqWuB5E3HKOzQJaiqy8VyN4y4G/VQ= X-Received: by 2002:a17:903:191:b0:215:ba2b:cd55 with SMTP id d9443c01a7336-215ba2bd12amr5097725ad.2.1733173534104; Mon, 02 Dec 2024 13:05:34 -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:04:57 +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="000000000000d5a35a06284fe80f" 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: 4Y2GXJ0fjKz419l X-Spamd-Bar: ---- --000000000000d5a35a06284fe80f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 the vmm.ko module. Can you offer a quick technical explanation of the reason why the exchange of the modules does not work for me ? On Mon, Dec 2, 2024 at 9:14=E2=80=AFPM Mark Peek wrote: > On Mon, Dec 2, 2024 at 11:54=E2=80=AFAM Mario Marietto > wrote: > >> Hello to everyone. >> >> Recently I've upgraded one of my FreeBSD systems and I see a strange >> error when I try to boot Android 7.1.1. I have never seen this error bef= ore >> and I also have another system where I haven't applied the latest pkg >> upgrades where Android is still able to boot. >> The bhyve parameters that I use in both systems are the following : >> >> /usr/sbin/./bhyve -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H -A= \ >> -s 0,hostbridge \ >> -s >> 1,ahci-hd,/mnt/zroot-133/bhyve/img/Android/DarkMatter-qemu.img,bootindex= =3D1 \ >> -s 8:0,passthru,4/0/0 \ >> -s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \ >> -s 13,virtio-net,tap13 \ >> -s 29,fbuf,tcp=3D0.0.0.0:5913,w=3D1440,h=3D900,wait \ >> -s 30,xhci,tablet \ >> -s 31,lpc \ >> -l >> bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,/usr/local/sha= re/uefi-firmware/BHYVE_UEFI_VARS.fd >> \ >> vm0:13 < /dev/null & sleep 5 && vncviewer 0:13 && echo vncviewer 0:13 & >> >> The error I get on this ZFS system : >> >> FreeBSD marietto 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64 >> >> is : >> >> *Failed to emulate instruction sequence [ 41f646040874064c017d88eb144c89 >> ] at 0xbea5fcf9* >> >> But I don't get this error on the system installed on the UFS disk (it i= s >> also 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64). Any >> suggestions about how I can fix it ? >> > > > This looks like a duplication of this bug: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282852 > > I need to tweak the patch (attached to the bug) before submitting for > review. Note that both the kernel and bhyve need to be recompiled after > applying the patch. > > Mark > > --=20 Mario. --000000000000d5a35a06284fe80f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Mark,

I see that your = patch is about to modify the code of the vmm.ko module. I've just excha= nged 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 op= eration didn't solve the problem. I suspect that the wrong code is not = inside the vmm.ko module. Can you offer a quick technical explanation of th= e reason why the exchange of the modules does not work for me ?
<= /div>
On Mon, Dec 2, 2024 at 9:14=E2=80=AFPM Mark Peek <<= a href=3D"mailto:mp@freebsd.org">mp@freebsd.org> wrote:
On Mon, Dec 2, 2024 at 11:54=E2=80=AFAM Mario Marietto <marietto2008@gmail.com> wrote:
/usr/sbin/./bhyve -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8= G -w -H -A \
-s 0,hostbridge \
-s 1,ahci-hd,/mnt/zroot-133/bhyve/img/= Android/DarkMatter-qemu.img,bootindex=3D1 \
-s 8:0,passthru,4/0/0 \
-= s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \
-s 13,virtio-net,tap13 \
-s= 29,fbuf,tcp=3D
0.0.0.0:59= 13,w=3D1440,h=3D900,wait \
-s 30,xhci,tablet \
-s 31,lpc \
-l = bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,/usr/local/share/= uefi-firmware/BHYVE_UEFI_VARS.fd \
vm0:13 < /dev/null & sleep 5 &= amp;& vncviewer 0:13 && echo vncviewer 0:13 &
The error I get on this ZFS system :

F= reeBSD marietto 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64
=

is :

Failed to emulate inst= ruction sequence [ 41f646040874064c017d88eb144c89 ] at 0xbea5fcf9

But I don't get this error on the system instal= led on the UFS disk (it is also 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GEN= ERIC amd64). Any suggestions about how I can fix it ?


This looks like a duplication of this= bug:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D= 282852

I need to tweak the patch (attached to = the bug) before submitting for review. Note that both the kernel and bhyve = need to be recompiled after applying the patch.

Ma= rk
=C2=A0


--
Ma= rio.
--000000000000d5a35a06284fe80f--