From nobody Wed May 22 20:29:48 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 4Vl2xJ1Ydvz5Kg3n for ; Wed, 22 May 2024 20:30:28 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 4Vl2xH1cy9z461g for ; Wed, 22 May 2024 20:30:27 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=i0RWpvPC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6f4d6b7168eso2082157b3a.2 for ; Wed, 22 May 2024 13:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716409825; x=1717014625; 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=SvFuq9ITy+DI2BZRY+Rwdoa890Aw2Z3Q22GkJWb2SfU=; b=i0RWpvPCLD+ugDYLZ6fGyEOr9WJ4awBEzMzn2DWhuOJRStioyZZHN5ag6ynKYE0scd U6ntK5g1OVRt9HM/6E4TWASYYTLIKcFf8fcKayrn3WcNdEF+kypWjcA4jbvQbVCKu+nd Qq9a0KFyiijrTGXJZ9nxxNH9pcOje04FnHSOYTzv0ZKa+9tpvk7tyvny2e9b+0w1vGsU 5Uqa36qG0pdc6zZ3BUtKCi1zLyEKsd67cygg7jKT0xZNLgUZhmSt86wLgFA2mqBTNVEp QPadPVORXgEj3Y7PZS9n2/6wRsNaXwz9vYTKxKl4Ja2Kj56sbaf4pZ587qQAMUSr0/pO rghw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716409825; x=1717014625; 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=SvFuq9ITy+DI2BZRY+Rwdoa890Aw2Z3Q22GkJWb2SfU=; b=KjB/l2Xj6kaaOpbmA17K20UYbEnpZ54IEH2DJi7wREkLfTBaMvUo6N0ipNXRC0De+G jIt4lV9dNX7qT8IVmeg17YFs18Yl2oLpdoIiVv14uHN3S4vFx7AySs6hhyeuh3rpQdIq nxeSFheFT98zDdo9xs2qRjx7eMF8pVaAzD30o5O1SNOxNerqG1G8OLFD/K2l5ccs9Kfg ka5xfcB7LXjuUNqiEk9wNk3zFdNpXYLataULR4pAlseqHcJ6foefbFRM5TRy34RDovGC lZcqD9yDV83ihf2HelqxXIQMNZ8cL52g0GUQjj50/PfMKP6uiqBq1nQ7bNDmdS2PrLYq SAug== X-Forwarded-Encrypted: i=1; AJvYcCU+FiDDF2y2F2avFOgyWW69L/BKKLqnSh2/kHZhA9332abUQmTrswwB/2ZUHQd5EbWqCQbFmVy4jULE7zE/t24= X-Gm-Message-State: AOJu0Ywet/e7715zW7X8sTWE57fm/SSRHf7kDrIjmN2z8mLFWIn+vzlf MpXb+KTr6K+zrwix693ZnEl0MmwwS9BN3NDl6sgssbXhiMrH/708QrSmcMmlkyIjqGgwDBXB0fk pboy5EJswjCug3teGpPpsNcVlMGc= X-Google-Smtp-Source: AGHT+IF3b9J2pQfY6NLgW+YTeaKYUt/xpBGIAeG9yTTMiFQel3oFc/49C9lHeL50y3VGVB/dfFXVgZ+DANgWV4svsEA= X-Received: by 2002:a05:6a20:d045:b0:1af:a617:86ac with SMTP id adf61e73a8af0-1b1f8a8bad2mr3498903637.53.1716409824873; Wed, 22 May 2024 13:30:24 -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: From: Mario Marietto Date: Wed, 22 May 2024 22:29:48 +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="000000000000e69533061910cd7d" X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_CC(0.00)[yahoo.com,klop.ws,freebsd.org,le-fay.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::432:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[arm@freebsd.org]; MLMMJ_DEST(0.00)[arm@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4Vl2xH1cy9z461g --000000000000e69533061910cd7d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Is there another cheap alternative to the RockPro64 / Quartz64 that works well on FreeBSD if one wants to test bhyve ? On Wed, May 22, 2024 at 9:39=E2=80=AFPM Mario Marietto wrote: > 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) ? Ha= s >> 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 b= uy >> 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 indexe= d >> 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 >> install BSD on it. >> >> John Carr >> >> > > -- > Mario. > --=20 Mario. --000000000000e69533061910cd7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is there another cheap alternative to the RockPro64 / Quar= tz64 that works well on FreeBSD if one wants to test bhyve ?

=
On Wed, Ma= y 22, 2024 at 9:39=E2=80=AFPM Mario Marietto <marietto2008@gmail.com> wrote:

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 <<= a href=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gma= il.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.


--
Mario.
--000000000000e69533061910cd7d--