Bug 1551452

Summary: RFE: Add support for qemu-system-riscv64
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amit, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-31 20:53:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1553405    
Attachments:
Description Flags
patch none

Description Richard W.M. Jones 2018-03-05 08:36:33 UTC
Description of problem:

This is a placeholder bug as, at time of writing, riscv64 support
is not yet upstream.  However with any luck it will be upstream
by qemu 2.12.

Please add support for building qemu-system-riscv64 and maybe
qemu-system-riscv32 (riscv64 is the only one we really care about).

Version-Release number of selected component (if applicable):

qemu 2.12

Additional info:

http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg00684.html
https://github.com/riscv/riscv-qemu/tree/qemu-upstream-v8

Comment 1 Richard W.M. Jones 2018-03-05 08:42:33 UTC
Created attachment 1404230 [details]
patch

Comment 2 Itamar Reis Peixoto 2018-03-05 10:55:52 UTC
probably sending a pull request here -> https://src.fedoraproject.org/rpms/qemu makes easy to merge.

Comment 4 Richard W.M. Jones 2018-03-10 18:30:11 UTC
I tried to cherry pick this for the 2.11 branch but it's pretty
difficult.  I wonder if (for Rawhide only) we could move to a
2.11.50/2.12 git version?

Comment 5 Cole Robinson 2018-03-11 22:35:19 UTC
https://wiki.qemu.org/Planning/2.12

2.12 rc0 is planned for mar 20 which isn't far away, but if you're motivated to do a git snapshot before then I say go for it

Comment 6 Richard W.M. Jones 2018-03-12 10:15:32 UTC
OK it's only a week so let's wait.  In the mean time we found a bug
in FPU support which is still being looked at.

Comment 7 Richard W.M. Jones 2018-03-20 12:07:14 UTC
We don't have any proper fix for the FPU problem, so we will need to
include this workaround:

https://github.com/rwmjones/fedora-riscv-bootstrap/blob/master/stage1-riscv-qemu/force-float-save.patch

It has a performance penalty in the guest because FP registers are saved
and loaded on every context switch, but that's better than corrupting
any math calculations, and in any case it only affects riscv64 guests.

Comment 8 Cole Robinson 2018-03-22 13:33:37 UTC
qemu-2.12.0-rc0 is building now with the patch in comment #7