Skip to content

fix(virtio): sync descriptor indices to resolve stressfs read hang#40

Open
ping-long-github wants to merge 1 commit intod0iasm:mainfrom
ping-long-github:fix-virtio-stressfs
Open

fix(virtio): sync descriptor indices to resolve stressfs read hang#40
ping-long-github wants to merge 1 commit intod0iasm:mainfrom
ping-long-github:fix-virtio-stressfs

Conversation

@ping-long-github
Copy link

Description:
Fixed a synchronization issue in virtio_blk.rs that caused the xv6 stressfs test to hang indefinitely during the read phase.
Changes:
Switched from using the guest's avail.idx to the device's internal cpu.bus.virtio.id to correctly fetch the head index for the next available descriptor.
Moved interrupt_status |= 0x1 to the end of disk_access to ensure the used ring is fully updated before the xv6 kernel receives the completion interrupt.
Testing:
Successfully ran xv6 stressfs and usertests without hanging.

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.

1 participant