Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hypervisor extension #2841

Merged
merged 52 commits into from
Dec 27, 2021
Merged

Add hypervisor extension #2841

merged 52 commits into from
Dec 27, 2021

Commits on Dec 23, 2021

  1. Add hypervisor extension

    This PR implements v0.6.1 of the RISC-V Hypervisor Extension.
    
    The implementation was inspired by José Martins' and colleagues' work
    described in [1].  Much of the microarchitecture and essentially all of
    the code is new, but their implementation served as our baseline.
    We thank them for trailblazing hypervisor support in rocket-chip.
    
    Note that this PR only includes the mechanisms to virtualize the hart
    itself.  Virtualized interrupt controllers, IOMMUs, etc. are future work.
    Lots of future work.
    
    Note also that some features are (legally) not implemented.  Currently,
    misa.H is not writable, something we may or may not choose to fix.
    The mtval2 htval, mtinst, and htinst CSRs are hardwired to 0, placing
    additional onus on hypervisor software.  We think it's likely we'll
    eventually implement these CSRs less trivially, at least in some cases.
    
    [1] "A First Look at RISC-V Virtualization from an Embedded Systems Perspective", https://arxiv.org/abs/2103.14951
    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    5cad4b1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7788654 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb12a1a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c3f0be7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cbe61d8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    05f4681 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    eb63dc5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    41b48f9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1c4b1a5 View commit details
    Browse the repository at this point in the history
  10. GEILEN=0, so mask off SGEIP

    ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    202aa69 View commit details
    Browse the repository at this point in the history
  11. untie vsstatus.SXL [bit 35]

    ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    155498a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4f83c2b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    388c174 View commit details
    Browse the repository at this point in the history
  14. Stage-1 PTW DV from VS-mode

    ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    df7cbe1 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b387152 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d787b89 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b8bdcf0 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    5039f8f View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    7e7d2a7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8b53c2f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5f79178 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5dcdea4 View commit details
    Browse the repository at this point in the history
  23. Update the aux_count value to be 0 when vstage1 is disabled. RTL inco…

    …rrectly taking store access fault when stage1 MMU off.
    ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    725c171 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    ba6d279 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    0299687 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1714680 View commit details
    Browse the repository at this point in the history
  27. TLB/PTW: add htval/mtval2 support

    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    ebe27d6 View commit details
    Browse the repository at this point in the history
  28. CSRFile: add htval/mtval2 support

    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    20a73d1 View commit details
    Browse the repository at this point in the history
  29. D$: add htval/mtval2 support

    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    ee11a33 View commit details
    Browse the repository at this point in the history
  30. I$: add htval/mtval2 support

    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    dbe291c View commit details
    Browse the repository at this point in the history
  31. rocket: add htval/mtval2 support

    The change to take_pc_mem is necessary to guarantee that the GPA from
    the frontend is still valid at commit.
    aswaterman authored and ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    1ae8eec View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    9d8d991 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    6810179 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    3c0a43a View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    746a64b View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    4db3e3e View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    e4f038e View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    412c89f View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    617fa92 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    53bab37 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    834c54a View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    a87ef0d View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    297e058 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    2bb93eb View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    3c952ae View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    6b64fdc View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    3ed2918 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    0e0ee81 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    96be395 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    27dc0e0 View commit details
    Browse the repository at this point in the history
  51. PTW: Stage-2 should check for a PPN-out-of-range access fault before …

    …continuing to Stage-1
    ingallsj committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    f87dd6c View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    7dc906e View commit details
    Browse the repository at this point in the history