summaryrefslogtreecommitdiff
path: root/kernel/virtio_disk.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-02xRobert Morris1-0/+26
2022-08-08tweak virtio commentsRobert Morris1-3/+3
2021-10-17port virtio_disk to virtio spec 1.0+Xi Wang1-33/+45
The legacy interface is confusing. It's better to make virtio_disk conform to the virtio spec. This is supported in QEMU since 4.2 by disabling force-legacy for virtio-mmio.
2020-10-05eliminate virtio DMA into kernel stacks.Robert Morris1-10/+12
2020-10-05improve virtio_disk comments; bring it closer to wording in the specRobert Morris1-30/+56
2020-10-05avoid deadlock by disk intr acking interrupt first, then processing ringRobert Morris1-17/+34
2020-04-18Write interrupt ack register in virtio_disk_intr()Takahiro1-0/+1
2019-08-12Wrap state of disk driver in a struct so that it is easier to supportFrans Kaashoek1-69/+71
several disks (e.g., in a mount lab).
2019-07-30Track in buf if disk "owns" bufferFrans Kaashoek1-3/+4
2019-07-30The driver should free descriptors, not interrupt handler. ThisFrans Kaashoek1-3/+3
avoids handler freeing descriptors before driver sees that the request has completed.
2019-07-29Remove B_DIRTYFrans Kaashoek1-7/+5
Use refcnt to pin blocks into the cache Replace flags/B_VALID with a boolean field valid Use info[id].status to signal completion of disk interrupt Pass a read/write flag to virtio_disk_rw
2019-07-24rationalize some vm function namesRobert Morris1-2/+2
2019-07-23simplify kernel mapping callsRobert Morris1-0/+2
2019-07-19One way of supporting a guard page below kstack: allocate kstacks inFrans Kaashoek1-1/+1
procinit() and map them high up (below TRAMPOLNE) with an empty mapping below each stack. Never free a kernel stack. Another way would be to allocate and map them dynamically, but then we need to reload page table when switching processes in scheduler() and/or have a kernel pagetable per proc (if we want k->stack to be the same virtual address in each process). One gotcha: kernel addresses are not equal to physical addresses for stack addresses. A stack address must be translated if we need its physical address (e.g., virtio passes a stack address to the disk).
2019-07-11cosmetic changesRobert Morris1-8/+8
2019-07-01xFrans Kaashoek1-1/+0
2019-07-01Introduce alloc3_desc and UsedArea to make code easier to readFrans Kaashoek1-33/+28
2019-06-13clean up virtio codeRobert Morris1-30/+34
2019-06-13virtio disk driverRobert Morris1-0/+268