On Tue, May 23, 2023 at 04:05:04PM +0300, David Abdurachmanov wrote:
We run QEMU in a similar way as any other board.
So it's U-Boot SPL, which then loads U-Boot ITB (which typically
contains U-Boot proper, OpenSBI FW_DYNAMIC generic binary, and DTB).
U-Boot SPL transfers control to OpenSBI and tells it how to load the
next stage (i.e U-Boot proper).
Is there any documentation on how RISC-V boots now? And about the
eventual goal that we're aiming for?
> > For the benefit of the search engine gods, this works for
now:
> >
> > # virt-install --import --memory 8192 -n fedora-37-riscv \
> > --arch riscv64 --vcpus 8 \
> > --disk fedora-37-riscv.qcow2,format=qcow2 \
> > --osinfo fedora37 \
> > --qemu-commandline=' -bios /path/to/u-boot-spl.bin -device
loader,file=/path/to/u-boot.itb,addr=0x80200000 '
This doesn't disable Sv48 and Sv57. I don't know the overall status,
but at least Golang 1.20 has a fix to support anything above Sv39.
Not sure about other runtimes that do pointer tagging.
See:
https://bugs.launchpad.net/ubuntu/+source/linux-riscv/+bug/1991790
Interesting and informative bug. I guess I'm not using any golang
binaries, as the guest totally seems to work fine. I'm a bit confused
how this kernel detail leaks into userspace though. I thought
userspace can use all 64 bits in pointers.
Simply put, older disk images on newer QEMU versions might not work
properly.
Note that we might want to switch to EDK2 in the future for QEMU, and
that probably will use two 32MiB pflash devices in virt machine. I
have seen, but haven't tested QEMU + EDK2 patches.
Rich.
Cheers,
david
>
> Based on the information above, using
>
> --boot kernel=/path/to/u-boot.bin
>
> should work...
>
> > 'Course you have to disable SELinux ...
>
> ... without requiring this :)
>
> --
> Andrea Bolognani / Red Hat / Virtualization
>
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top