Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2016 00:06:16 +0200
From:      Jan Beich <jbeich@vfemail.net>
To:        Peter Grehan <grehan@freebsd.org>
Cc:        "freebsd-virtualization\@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: VirtIO Ethernet driver in DragonFlyBSD under FreeBSD bhyve
Message-ID:  <ziq5-vuhz-wny@vfemail.net>
In-Reply-To: <b790cba6-dc86-aa51-2058-33525a6b4bd6@freebsd.org> (Peter Grehan's message of "Tue, 28 Jun 2016 08:08:13 -0700")
References:  <9893747.yFCcEWVR7f@gizmo.my.domain> <56ABFE12.4060805@freebsd.org> <60sv-b0so-wny@vfemail.net> <b790cba6-dc86-aa51-2058-33525a6b4bd6@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain

Oleg Ginzburg <olevole@olevole.ru> writes:

>>> /usr/sbin/bhyve -c 1 -m 4294967296 -A -H -P -s 0:0,hostbridge -s 2:0,virtio-
>>> rnd -s 3:0,virtio-net,tap0 ...

Does it crash with less than 4G of RAM for you as well?

  $ bhyve -m 1G ...
  Unhandled memory access to 0x100000000
  Failed to emulate instruction [0x81 0x3c 0x8f 0x5f 0x4d 0x50 0x5f 0x75 0x0e 0xeb 0x05 0xb9 0x00 0x00 0x00] at 0xffffffff80a2e0a7

Peter Grehan <grehan@freebsd.org> writes:

>> Any news since then? virtio-net and virtio-blk work fine if using Qemu +
>> OVMF 20160418 (a8c39ba) on the same DragonFly disk image where Bhyve +
>> BHYVE_UEFI_20160526.fd fails.

VirtIO issue isn't specific to UEFI but also happens with Grub2.

>>   virtio_pci0: <VirtIO PCI Block adapter> port 0x2000-0x203f mem
>> 0xc0002000-0xc0003fff irq 6 at device 4.0 on pci0
>
>  The irq value doesn't seem correct for that slot compared to booting
> FreeBSD.
>
>  Was this with a recent Dragonfly snapshot ? If you can point me to
> the release I'd like to give it a try.

I've used a daily snapshot where the installer still doesn't support
GPT/EFI yet. Tested as

  $ bhyve -l com1,stdio -l bootrom,BHYVE_UEFI.fd -m 4G -s 0,hostbridge \
    -s 31,lpc -s 4,virtio-blk,/dev/md0 -s 5,virtio-net,tap0 vm0

vs.

  $ qemu-system-x86_64 -nographic -bios OVMF.fd -m 256M \
    -drive if=virtio,file=/dev/md0 -net nic,model=virtio -net tap,ifname=tap0

after preparing image as follows

  # see https://www.dragonflybsd.org/mirrors/
  $ fetch http://mirrors.nycbug.org/pub/DragonflyBSD/snapshots/x86_64/images/DragonFly-x86_64-20160628-DEV-v4.5.0.1264.gc57fa.img.bz2
  $ bunzip2 DragonFly-x86_64-20160628-DEV-v4.5.0.1264.gc57fa.img.bz2
  $ mdconfig -f DragonFly-x86_64-20160628-DEV-v4.5.0.1264.gc57fa.img

  $ gpart destroy -F md0
  $ gpart create -s GPT md0
  $ gpart add -b 2112 -t dragonfly-ufs md0
  $ gpart add -t efi md0

  $ newfs_msdos -F 12 -m 0xf8 /dev/md0p2
  $ mount -t msdosfs /dev/md0p2 /mnt
  $ mkdir -p /mnt/efi/boot/

  $ mkdir /mnt2
  $ mount -t ufs /dev/md0p1 /mnt2

  $ install -p /mnt2/boot/boot1.efi /mnt/efi/boot/bootx64.efi
  $ echo boot_serial=YES >>/mnt2/boot/loader.conf
  $ echo vfs.root.mountfrom=\"ufs:vbd0s0\" >>/mnt2/boot/loader.conf

  $ umount /mnt; umount /mnt2; rmdir /mnt2

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQF8BAEBCgBmBQJXcvTYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF
NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3blcgH/jFuZGkCoqtUDaZ/nk6Xhn0c
Nm1dpe17kVHlZocWu+ileOnPVIXbyuEJhyicJgtZR3W89hP1+bv02SeyBrhegoMi
LUs/K76ZhpiMJBLCAKDJ1oJA3zpNZHoPP/cvlVbI9BxpsFxprzL/k78Xelhs8cZ1
9Sfqo4OQ6w7KN2vx/FowtkBu0JmKj3fBDKkptjWUnhEB5rwqBqMt4h9qlSOH9YGX
mCywULP/lO9sKyztDhtgnQVJsWiUzAnNXvClAV2LdvfOa3ct8wJ6ONb7X9OSVMh1
JR89oQ45VYwaUsuI3s9Ay8H0sYuIOZCyE5dyVLtJbCNITH4eREVDmR1kqDCDSvM=
=2v2z
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ziq5-vuhz-wny>