Skip to content

fix(pci): configure legacy interrupts level triggered and active low - #2611

Open
stlankes wants to merge 1 commit into
hermit-os:mainfrom
stlankes:apic
Open

fix(pci): configure legacy interrupts level triggered and active low#2611
stlankes wants to merge 1 commit into
hermit-os:mainfrom
stlankes:apic

Conversation

@stlankes

@stlankes stlankes commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

A legacy PCI interrupt is signalled level triggered and active low, while the IOAPIC defaults to the edge triggered, active high behavior of the ISA interrupts. A passed-through device therefore stops delivering interrupts after its first one, because the host only unmasks it once the guest has completed a level triggered interrupt.

Correct the redirection entry where a legacy interrupt line is handed out.

@stlankes stlankes closed this Aug 6, 2026
@stlankes stlankes reopened this Aug 6, 2026
@stlankes
stlankes force-pushed the apic branch 2 times, most recently from 4658338 to 8514e14 Compare August 6, 2026 14:05
A legacy PCI interrupt is signalled level triggered and active low,
while the IOAPIC defaults to the edge triggered, active high behavior of
the ISA interrupts. A passed-through device therefore stops delivering
interrupts after its first one, because the host only unmasks it once
the guest has completed a level triggered interrupt.

Correct the redirection entry where a legacy interrupt line is handed
out.

@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: 5cf80eb Previous: 2e23902 Performance Ratio
startup_benchmark Build Time 82.34 s 80.34 s 1.02
startup_benchmark File Size 0.76 MB 0.80 MB 0.96
Startup Time - 1 core 0.76 s (±0.02 s) 0.75 s (±0.02 s) 1.01
Startup Time - 2 cores 0.75 s (±0.02 s) 0.74 s (±0.02 s) 1.01
Startup Time - 4 cores 0.76 s (±0.02 s) 0.74 s (±0.02 s) 1.03
multithreaded_benchmark Build Time 83.95 s 82.11 s 1.02
multithreaded_benchmark File Size 0.87 MB 0.86 MB 1.02
Multithreaded Pi Efficiency - 2 Threads 88.83 % (±6.15 %) 85.89 % (±6.61 %) 1.03
Multithreaded Pi Efficiency - 4 Threads 43.90 % (±3.07 %) 43.43 % (±2.56 %) 1.01
Multithreaded Pi Efficiency - 8 Threads 25.44 % (±1.65 %) 25.76 % (±1.53 %) 0.99
micro_benchmarks Build Time 77.57 s 80.40 s 0.96
micro_benchmarks File Size 0.88 MB 0.86 MB 1.02
Scheduling time - 1 thread 64.53 ticks (±2.57 ticks) 62.65 ticks (±4.06 ticks) 1.03
Scheduling time - 2 threads 34.61 ticks (±4.16 ticks) 34.08 ticks (±4.10 ticks) 1.02
Micro - Time for syscall (getpid) 4.49 ticks (±0.63 ticks) 3.45 ticks (±0.58 ticks) 1.30
Memcpy speed - (built_in) block size 4096 83283.77 MByte/s (±57604.46 MByte/s) 82448.38 MByte/s (±56997.13 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 30374.19 MByte/s (±24413.93 MByte/s) 30585.98 MByte/s (±24707.84 MByte/s) 0.99
Memcpy speed - (built_in) block size 16777216 28924.88 MByte/s (±23722.26 MByte/s) 26340.06 MByte/s (±21720.96 MByte/s) 1.10
Memset speed - (built_in) block size 4096 83763.68 MByte/s (±57916.32 MByte/s) 82292.76 MByte/s (±56891.50 MByte/s) 1.02
Memset speed - (built_in) block size 1048576 31132.31 MByte/s (±24850.16 MByte/s) 31323.85 MByte/s (±25145.86 MByte/s) 0.99
Memset speed - (built_in) block size 16777216 29694.74 MByte/s (±24170.70 MByte/s) 27104.68 MByte/s (±22209.94 MByte/s) 1.10
Memcpy speed - (rust) block size 4096 75673.77 MByte/s (±52802.25 MByte/s) 74097.96 MByte/s (±51811.44 MByte/s) 1.02
Memcpy speed - (rust) block size 1048576 30215.99 MByte/s (±24437.46 MByte/s) 30361.60 MByte/s (±24602.37 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 29329.02 MByte/s (±24091.73 MByte/s) 27625.34 MByte/s (±22806.88 MByte/s) 1.06
Memset speed - (rust) block size 4096 76215.58 MByte/s (±53173.86 MByte/s) 74373.47 MByte/s (±51976.48 MByte/s) 1.02
Memset speed - (rust) block size 1048576 30946.87 MByte/s (±24865.76 MByte/s) 31110.89 MByte/s (±25033.24 MByte/s) 0.99
Memset speed - (rust) block size 16777216 30091.86 MByte/s (±24532.22 MByte/s) 28386.93 MByte/s (±23265.03 MByte/s) 1.06
alloc_benchmarks Build Time 76.36 s 74.76 s 1.02
alloc_benchmarks File Size 0.84 MB 0.87 MB 0.96
Allocations - Allocation success 91.34 % 91.31 % 1.00
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.54 % 61.44 % 1.00
Allocations - Average Allocation time 2624.68 Ticks (±814.50 Ticks) 5860.58 Ticks (±98.43 Ticks) 0.45
Allocations - Average Allocation time (no fail) 3665.98 Ticks (±721.04 Ticks) 6554.81 Ticks (±92.86 Ticks) 0.56
Allocations - Average Deallocation time 706.61 Ticks (±147.30 Ticks) 1805.01 Ticks (±250.35 Ticks) 0.39
mutex_benchmark Build Time 81.94 s 79.82 s 1.03
mutex_benchmark File Size 0.88 MB 0.86 MB 1.02
Mutex Stress Test Average Time per Iteration - 1 Threads 12.22 ns (±0.46 ns) 12.10 ns (±0.41 ns) 1.01
Mutex Stress Test Average Time per Iteration - 2 Threads 41.12 ns (±2.55 ns) 40.26 ns (±1.68 ns) 1.02

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

@stlankes stlankes assigned stlankes and mkroening and unassigned stlankes Aug 6, 2026
@stlankes
stlankes requested a review from mkroening August 6, 2026 18:39
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.

2 participants