From nobody Wed May 22 19:39:51 2024 X-Original-To: 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 4Vl1qd6YQ8z5KZhn for ; Wed, 22 May 2024 19:40:29 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl1qd3RkHz41nF for ; Wed, 22 May 2024 19:40:29 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2b12b52fbe0so1547151a91.0 for ; Wed, 22 May 2024 12:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716406828; x=1717011628; 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=OYWvk/AnXT2Ftr8+0vi8cGvjn6w7kBMm7on2Nxv8AQ4=; b=ErZioIdaoJqjvlQpWcG7EKkYG/0Ua58D9wRV2r2PwojIfedUgxsB3CIpR0mYQ8iAsN 49rU77qMxlcvSPbz++YDJy0XoAQi+kENKC/gEIiSED9AWpvXqPrYTwySHRT0ZhEpoRHu cfw7Yl/+vaaUzBTUxn/8mGSzFZKM3K/+elu834EN+jRHq6L3KR1ajXING7LOGFFFrYpT QDkVsRd/AUig5kL2EC2ZYEZqpwaSzXaOoJSbAxmWHtixCn6c2u77tzvkhCuT3KYX6ojP adM3SdBdVQO2RfIi2UmyMiM10Bstys9LhtkE6TqT4EOSRx5LeD8baW1zxrjLyYrpVzPI SBYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716406828; x=1717011628; 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=OYWvk/AnXT2Ftr8+0vi8cGvjn6w7kBMm7on2Nxv8AQ4=; b=Cdxmd8IeBfbgObc6107QNhXRsxSmm4n6qKSCoWNwF4vk2VVOPveEnbHzLses7wuKdW P987PPR6gRNZ6DUA4eVfIFDOhRx+VIQTCG/gOr4tS5tqzoioodwtHFIena6905d2ghrZ zMlvmCDv59fj24GMQVdj5Ktnw5lM5MP7tdFVaQkk1eEuNTEdTwWekbotLZ6pBkcM06xx ZI8VbnV+ymSdVdx9wbM3rVK2UldzPmkF0xjxxpZ5GYKWUGY0PBjFdpjBd7QWmY0+dVK6 Rqymdm7/q2hG/JzABRCo30r9Dt9dz/WKDI30oiuV9MGEBf1VFnneBkAJjOYMw9mKxUwu qvFg== X-Forwarded-Encrypted: i=1; AJvYcCVrXsLUv6RFg0lU/UzdqSvMDFiY6CJEmf2N8jVmCKVOjlcbUSBS4MZz2IYA+2YaZRPMynZeatQNp/KMpMQHaUU= X-Gm-Message-State: AOJu0Yyq4iH51kRc6wKV31V3YNlnBAfT1lRZZX5Y1Nl2UmxLaBQ++SUO cKHjSq14AoYup3lDk1na9zTZOgyZ7syc49skel2UyaOdpMIWbk8LDb6tZhNCKyua3VsrnYsJSU2 1HqqYiiCyucvKxaoWdtf7pIfB84TLUBS0UL/UOA== X-Google-Smtp-Source: AGHT+IHxO89GVZ6a1+VPtJz+T24M8EvYKPZvFagFgk8+gKSuwp8oLnt/UOvRvLKMeu5aPAToOd+/9n28aAuRdO3BYxQ= X-Received: by 2002:a17:90a:2ca1:b0:2b6:c4d7:fc31 with SMTP id 98e67ed59e1d1-2bd9f5bc52emr3694647a91.40.1716406828066; Wed, 22 May 2024 12:40:28 -0700 (PDT) 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 References: <18B789E4-5891-4F3E-BAB6-05FD45949438@yahoo.com> <1923834610.13708.1716392599662@localhost> <6117F301-D584-40F7-9022-F90103FF5468@yahoo.com> <71FB8C8C-DA84-469B-8742-1C3DD5F3E773@mit.edu> In-Reply-To: <71FB8C8C-DA84-469B-8742-1C3DD5F3E773@mit.edu> From: Mario Marietto Date: Wed, 22 May 2024 21:39:51 +0200 Message-ID: Subject: Re: vmm (bhyve) on GICv2 To: John F Carr Cc: Mark Millard , Ronald Klop , "arm@freebsd.org" , Lexi Winter Content-Type: multipart/alternative; boundary="00000000000046f2fc0619101b27" X-Spamd-Bar: ---- 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: 4Vl1qd3RkHz41nF --00000000000046f2fc0619101b27 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This ? https://pine64.com/product/quartz64-model-a-8gb-single-board-computer/ On Wed, May 22, 2024 at 9:20=E2=80=AFPM John F Carr wrote: > > On May 22, 2024, at 13:20, Mario Marietto > wrote: > > > > Can someone confirm that bhyve works ok on the RockPro64 (RK3399) ? Has > bhyve been patched in relation to this bug : > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277559 > > > > ? > > > > I read that there is a huge amount of work to do on the RPI5 before it > works with FreeBSD. And anyway,it does not support bhyve. So if I will bu= y > a soc,it will be the RockPro64.... > > The RockPro64 should be usable for development, not production use > of virtual machines. The kernel sometimes locks up the first time the > vmm module is loaded. Once the module loads it can be unloaded > and reloaded without risk. > > I was able to boot FreeBSD-13.3-RELEASE-arm64-aarch64.raw in bhyve > on my RockPro64 with this script: > > NCPU=3D1 > MEM=3D384m > DISK0=3D/dev/nda0s4 > VMNAME=3Dthirteen > bhyve -c "${NCPU:?}" -m "${MEM:?}" \ > -s 0:0,hostbridge \ > -s 1:0,virtio-blk,"${DISK0:?}" \ > -o bootrom=3D/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin \ > -o rtc.use_localtime=3Dfalse \ > -o console=3Dstdio \ > -o config.dump=3Dfalse \ > -o acpi_tables=3Dtrue \ > "${VMNAME:?}" > > I had copied the image to /dev/nda0s4. It should work just as well with > the > regular file after "virtio-blk". > > Some observations: > > 1. There is no clock visible to the guest OS: > > Warning: no time-of-day clock registered, system time will not be set > accurately > > 2. The RockPro system has two types of cores. One has a physically > indexed I-cache, > the other virtually indexed. The virtual CPU reports a virtually indexed > cache. > > CPU 0: ARM Foundation-Model r0p0 affinity: 0 > Cache Type =3D <64 byte D-cacheline,64 byte > I-cacheline,VIPT ICache,64 byte ERG,64 byte CWG> > > I think this will cause correct behavior despite being technically wrong. > > I have a Quartz64, a newer Pine64 SBC, but I have not yet tried to instal= l > BSD on it. > > John Carr > > --=20 Mario. --00000000000046f2fc0619101b27 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This ?=C2=A0


On= Wed, May 22, 2024 at 9:20=E2=80=AFPM John F Carr <jfc@mit.edu> wrote:
> On May 22, 2024, at 13:20, Mario Marietto <marietto2008@gmail= .com> wrote:
>
> Can someone confirm that bhyve works ok on the RockPro64 (RK3399) ? Ha= s bhyve been patched in relation to this bug :
>
> https://bugs.freebsd.org/bugzilla/sho= w_bug.cgi?id=3D277559
>
> ?
>
> I read that there is a huge amount of work to do on the RPI5 before it= works with FreeBSD. And anyway,it does not support bhyve. So if I will buy= a soc,it will be the RockPro64....

The RockPro64 should be usable for development, not production use
of virtual machines.=C2=A0 The kernel sometimes locks up the first time the=
vmm module is loaded.=C2=A0 Once the module loads it can be unloaded
and reloaded without risk.

I was able to boot FreeBSD-13.3-RELEASE-arm64-aarch64.raw in bhyve
on my RockPro64 with this script:

NCPU=3D1
MEM=3D384m
DISK0=3D/dev/nda0s4
VMNAME=3Dthirteen
bhyve -c "${NCPU:?}" -m "${MEM:?}" \
-s 0:0,hostbridge \
-s 1:0,virtio-blk,"${DISK0:?}" \
-o bootrom=3D/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin \
-o rtc.use_localtime=3Dfalse \
-o console=3Dstdio \
-o config.dump=3Dfalse \
-o acpi_tables=3Dtrue \
"${VMNAME:?}"

I had copied the image to /dev/nda0s4.=C2=A0 It should work just as well wi= th the
regular file after "virtio-blk".

Some observations:

1. There is no clock visible to the guest OS:

Warning: no time-of-day clock registered, system time will not be set accur= ately

2. The RockPro system has two types of cores.=C2=A0 One has a physically in= dexed I-cache,
the other virtually indexed.=C2=A0 The virtual CPU reports a virtually inde= xed cache.

CPU=C2=A0 0: ARM Foundation-Model r0p0 affinity:=C2=A0 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Cache = Type =3D <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ER= G,64 byte CWG>

I think this will cause correct behavior despite being technically wrong.
I have a Quartz64, a newer Pine64 SBC, but I have not yet tried to install = BSD on it.

John Carr



--
Mario.
--00000000000046f2fc0619101b27--