Skip to content

feat(riscv64): Add PCI support - #2550

Merged
mkroening merged 1 commit into
hermit-os:mainfrom
sbutz:sb/riscv_pci
Aug 13, 2026
Merged

feat(riscv64): Add PCI support#2550
mkroening merged 1 commit into
hermit-os:mainfrom
sbutz:sb/riscv_pci

Conversation

@sbutz

@sbutz sbutz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Follow-up Tasks:

  • PCI Handling is very similar across architectures. Reuse code across architectures where applicable.
  • Upgrade crate fdt to version 0.2 once released

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 009a6d8 Previous: 2e23902 Performance Ratio
startup_benchmark Build Time 217.89 s 80.34 s 2.71
startup_benchmark File Size 0.78 MB 0.80 MB 0.99
Startup Time - 1 core 2.22 s (±0.21 s) 0.75 s (±0.02 s) 2.98
Startup Time - 2 cores 2.21 s (±0.21 s) 0.74 s (±0.02 s) 3.00
Startup Time - 4 cores 2.29 s (±0.25 s) 0.74 s (±0.02 s) 3.08
multithreaded_benchmark Build Time 219.44 s 82.11 s 2.67
multithreaded_benchmark File Size 0.84 MB 0.86 MB 0.98
Multithreaded Pi Efficiency - 2 Threads 80.33 % (±13.63 %) 85.89 % (±6.61 %) 0.94
Multithreaded Pi Efficiency - 4 Threads 52.72 % (±9.68 %) 43.43 % (±2.56 %) 1.21
Multithreaded Pi Efficiency - 8 Threads 31.25 % (±5.33 %) 25.76 % (±1.53 %) 1.21
micro_benchmarks Build Time 205.57 s 80.40 s 2.56
micro_benchmarks File Size 0.85 MB 0.86 MB 0.98
Scheduling time - 1 thread 152.43 ticks (±34.03 ticks) 62.65 ticks (±4.06 ticks) 2.43
Scheduling time - 2 threads 92.54 ticks (±22.74 ticks) 34.08 ticks (±4.10 ticks) 2.72
Micro - Time for syscall (getpid) 9.59 ticks (±4.82 ticks) 3.45 ticks (±0.58 ticks) 2.78
Memcpy speed - (built_in) block size 4096 54566.20 MByte/s (±39075.43 MByte/s) 82448.38 MByte/s (±56997.13 MByte/s) 0.66
Memcpy speed - (built_in) block size 1048576 16264.68 MByte/s (±14277.99 MByte/s) 30585.98 MByte/s (±24707.84 MByte/s) 0.53
Memcpy speed - (built_in) block size 16777216 13957.74 MByte/s (±11760.94 MByte/s) 26340.06 MByte/s (±21720.96 MByte/s) 0.53
Memset speed - (built_in) block size 4096 54646.07 MByte/s (±39130.83 MByte/s) 82292.76 MByte/s (±56891.50 MByte/s) 0.66
Memset speed - (built_in) block size 1048576 16432.17 MByte/s (±14338.36 MByte/s) 31323.85 MByte/s (±25145.86 MByte/s) 0.52
Memset speed - (built_in) block size 16777216 14233.65 MByte/s (±11888.63 MByte/s) 27104.68 MByte/s (±22209.94 MByte/s) 0.53
Memcpy speed - (rust) block size 4096 54378.21 MByte/s (±38943.03 MByte/s) 74097.96 MByte/s (±51811.44 MByte/s) 0.73
Memcpy speed - (rust) block size 1048576 14580.25 MByte/s (±12514.67 MByte/s) 30361.60 MByte/s (±24602.37 MByte/s) 0.48
Memcpy speed - (rust) block size 16777216 13244.04 MByte/s (±10991.81 MByte/s) 27625.34 MByte/s (±22806.88 MByte/s) 0.48
Memset speed - (rust) block size 4096 55024.00 MByte/s (±39369.93 MByte/s) 74373.47 MByte/s (±51976.48 MByte/s) 0.74
Memset speed - (rust) block size 1048576 14833.27 MByte/s (±12620.15 MByte/s) 31110.89 MByte/s (±25033.24 MByte/s) 0.48
Memset speed - (rust) block size 16777216 13619.05 MByte/s (±11210.01 MByte/s) 28386.93 MByte/s (±23265.03 MByte/s) 0.48
alloc_benchmarks Build Time 196.99 s 74.76 s 2.63
alloc_benchmarks File Size 0.86 MB 0.87 MB 0.99
Allocations - Allocation success 91.35 % 91.31 % 1.00
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.55 % 61.44 % 1.00
Allocations - Average Allocation time 16295.72 Ticks (±992.36 Ticks) 5860.58 Ticks (±98.43 Ticks) 2.78
Allocations - Average Allocation time (no fail) 17337.51 Ticks (±1184.78 Ticks) 6554.81 Ticks (±92.86 Ticks) 2.65
Allocations - Average Deallocation time 4387.58 Ticks (±1245.13 Ticks) 1805.01 Ticks (±250.35 Ticks) 2.43
mutex_benchmark Build Time 200.15 s 79.82 s 2.51
mutex_benchmark File Size 0.85 MB 0.86 MB 0.98
Mutex Stress Test Average Time per Iteration - 1 Threads 31.58 ns (±7.59 ns) 12.10 ns (±0.41 ns) 2.61
Mutex Stress Test Average Time per Iteration - 2 Threads 30.70 ns (±9.23 ns) 40.26 ns (±1.68 ns) 0.76

This comment was automatically generated by workflow using github-action-benchmark.

@sbutz
sbutz marked this pull request as ready for review July 13, 2026 18:57

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Excellent work! :)

Could you enable the RISC-V PCI tests on CI that are currently disabled for RISC-V?

@mkroening

Copy link
Copy Markdown
Member

I think CI needs ixpe-qemu on all architectures now. I have added it.

@mkroening mkroening changed the title Add pci support for risc-v feat(riscv64): Add PCI support Aug 13, 2026
@mkroening

Copy link
Copy Markdown
Member

RTL8139 does not work, but that is not relevant for this PR. I have excluded them for RISC-V again and opened #2636.

@mkroening

Copy link
Copy Markdown
Member

mio seems broken too, though I am not sure if that is because of PCI, since we don't test it on MMIO.

@mkroening
mkroening enabled auto-merge August 13, 2026 11:12
@mkroening
mkroening disabled auto-merge August 13, 2026 14:07
@mkroening
mkroening added this pull request to the merge queue Aug 13, 2026
Merged via the queue into hermit-os:main with commit cd53141 Aug 13, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants