[PATCH 1/1] doc: qemu-riscv: describe booting with QEMU and KVM

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sun Aug 14 18:28:52 CEST 2022


On 8/14/22 17:51, Bin Meng wrote:
> On Sun, Aug 14, 2022 at 10:23 PM Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
>>
>> The ELF U-Boot image produced by qemu-riscv64_smode_defconfig can be
>> used to boot with QEMU and KVM.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> ---
>>   doc/board/emulation/qemu-riscv.rst | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst
>> index 782f37251c..7a21e12953 100644
>> --- a/doc/board/emulation/qemu-riscv.rst
>> +++ b/doc/board/emulation/qemu-riscv.rst
>> @@ -133,6 +133,19 @@ An attached disk can be emulated in RISC-V virt machine by adding::
>>
>>   You will have to run 'scsi scan' to use it.
>>
>> +Running with KVM
>> +----------------
>> +
>> +Running with QEMU using KVM requires an S-mode U-Boot binary as created by
>> +qemu-riscv64_smode_defconfig.
>> +
>> +Provide the U-Boot S-mode ELF image as *-kernel* parameter, and do not add a
>> +*-bios* parameter e.g.
>> +
>> +.. code-block:: bash
>> +
>> +    qemu-system-riscv64 -accel kvm -nographic -machine virt -kernel u-boot
>> +
>>   Debug UART
>>   ----------
> 
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> 
> Should we add the kernel version that contains the fix? Or we assume
> the latest and greatest kernel should be used?

QEMU will give you an error message if either Linux or QEMU does not 
support KVM.

I think Linux v5.17 and QEMU 7.0 are the minimum.

v5.17.0 was definitively buggy. v5.19.1 still has issues. So I would be 
reluctant to point users to those releases.

Best regards

Heinrich

> 
> Regards,
> Bin



More information about the U-Boot mailing list