History log of /src/sys/dev/pci/vio9p.c |
Revision | | Date | Author | Comments |
1.12 |
| 22-Apr-2025 |
ozaki-r | vio9p: export tag via sysctl
With this change, we can see tags of virtio-9p devices via sysctl: # sysctl hw.vio9p hw.vio9p.vio9p0.tag = test hw.vio9p.vio9p1.tag = test2
PR kern/59165
|
1.11 |
| 23-Mar-2023 |
yamaguchi | Added functions to set interrupt handler and index into virtqueue
|
1.10 |
| 23-Mar-2023 |
yamaguchi | Set virtqueues in virtio_child_attach_finish
The number of virtqueue maybe change in a part of VirtIO devices (e.g. vioif(4)). And it is fixed after negotiation of features. So the configuration is moved into the function.
|
1.9 |
| 20-Apr-2022 |
uwe | branches: 1.9.4; vio9p: avoid null pointer dereference on attach.
Pass "vqs" argument to virtio_child_attach_start(). The virtio API is not quite clear to me here - there's also a separate setter virtio_child_attach_set_vqs that performs some additional actions.
Queue setup for Virtio 1.0 accesses virtio_softc::sc_vqs and we didn't set it. QEMU exposes only the old virtio interface, so it doesn't trigger the problem.
|
1.8 |
| 13-Apr-2022 |
uwe | vio9p: Bump max tag len to match QEMU.
QEMU defines it to 32 but includes the final zero byte into the limit. Our code counts the final zero byte separately, so adjust this define appropriately.
|
1.7 |
| 13-Apr-2022 |
uwe | vio9p: Properly negotiate MOUNT_TAG feature.
I _think_ that this is what is intended here. The code used to actually test for the presence of any random device independent feature bits (the test would happen to succeed b/c of INDIRECT_DESC).
|
1.6 |
| 13-Apr-2022 |
uwe | vio9p: Add definition for the MOUNT_TAG feature bit.
From QEMU sources.
|
1.5 |
| 31-Mar-2022 |
pgoyette | For device modules that provide both auto-config and /dev/xxx interfaces, make sure that initialization and destruction follow the proper sequence. This is triggered by the recent changes to the devsw stuff; per riastradh@ the required call sequence is:
devsw_attach() config_init_component() or config_cf*_attach() ... config_fini_component() or config_cf*_detach() devsw_detach()
While here, add a few missing calls to some of the detach routines.
Testing of these changes has been limited to: 1. compile without build break 2. no related test failures from atf 3. modload/modunload work as well as before.
No functional device testing done, since I don't have any of these devices. Let me know of any damage I might cause here!
XXX Some of the modules affected by this commit are already XXX broken; see kern/56772. This commit does not break any additional modules (as far as I know).
|
1.4 |
| 26-Sep-2021 |
thorpej | Change the kqueue filterops::f_isfd field to filterops::f_flags, and define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd. Field and flag name aligned with OpenBSD.
This does not constitute a functional or ABI change, as the field location and size, and the value placed in that field, are the same as the previous code, but we're bumping __NetBSD_Version__ so 3rd-party module source code can adapt, as needed.
NetBSD 9.99.89
|
1.3 |
| 20-Jan-2021 |
reinoud | Add VirtIO PCI v1.0 attachments and fix the drivers affected.
The vioif, ld, scsi, viornd and viomb devices were adjusted when needed and tested both in legacy 0.9 and v1.0 attachments trough PCI on amd64, sparc64, aarch64 and aarch64-eb. ACPI/FDT attachments also tested on aarch64/aarch64-eb.
Known issues
* viomb on aarch64 works only with ACPI/FDT attachment but not with PCI attachment. PCI and ACPI/FDT attachment works on aarch64-eb.
* virtio on sparc64 attaches but is it not functioning though not a regression.
|
1.2 |
| 18-Dec-2020 |
thorpej | Use sel{record,remove}_knote().
|
1.1 |
| 28-Oct-2019 |
ozaki-r | branches: 1.1.8; 1.1.10; Implement a front-end driver of virtio-9p called vio9p
In conjunction with mount_9p, it enables a NetBSD system running as a VM guest to mount an exported filesystem by the host via virtio-9p. It exports a 9p end-point of virtio-9p via a character device file for mount_9p.
Reviewed by yamaguchi@
|
1.1.10.2 |
| 03-Apr-2021 |
thorpej | Sync with HEAD.
|
1.1.10.1 |
| 03-Jan-2021 |
thorpej | Sync w/ HEAD.
|
1.1.8.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.1.8.1 |
| 28-Oct-2019 |
martin | file vio9p.c was added on branch phil-wifi on 2020-04-13 08:04:45 +0000
|
1.9.4.2 |
| 15-May-2025 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #1115):
sys/dev/pci/vio9p.c: revision 1.12
vio9p: export tag via sysctl
With this change, we can see tags of virtio-9p devices via sysctl: # sysctl hw.vio9p hw.vio9p.vio9p0.tag = test hw.vio9p.vio9p1.tag = test2
PR kern/59165
|
1.9.4.1 |
| 13-May-2023 |
martin | Pull up following revision(s) (requested by yamaguchi in ticket #139):
sys/dev/pci/vioscsi.c: revision 1.31 sys/dev/pci/vio9p.c: revision 1.10 sys/dev/pci/vioscsi.c: revision 1.32 sys/dev/pci/vio9p.c: revision 1.11 sys/dev/pci/vioscsi.c: revision 1.33 sys/dev/pci/ld_virtio.c: revision 1.31 sys/dev/virtio/viocon.c: revision 1.6 sys/dev/pci/vioscsi.c: revision 1.34 sys/dev/pci/ld_virtio.c: revision 1.32 sys/dev/virtio/viocon.c: revision 1.7 sys/dev/virtio/viocon.c: revision 1.8 sys/dev/pci/vioscsi.c: revision 1.36 sys/dev/pci/virtioreg.h: revision 1.12 sys/dev/pci/viornd.c: revision 1.19 sys/dev/pci/virtio.c: revision 1.66 sys/dev/pci/virtio.c: revision 1.67 sys/dev/pci/virtio.c: revision 1.68 sys/dev/pci/if_vioif.c: revision 1.103 sys/dev/pci/virtio.c: revision 1.69 sys/dev/pci/if_vioif.c: revision 1.104 sys/dev/pci/virtio_pci.c: revision 1.40 sys/dev/virtio/virtio_mmio.c: revision 1.8 sys/dev/virtio/virtio_mmio.c: revision 1.9 sys/dev/pci/viomb.c: revision 1.14 sys/dev/pci/viomb.c: revision 1.15 sys/dev/pci/viomb.c: revision 1.17 sys/dev/pci/viornd.c: revision 1.20 sys/dev/pci/viornd.c: revision 1.21 sys/dev/pci/virtiovar.h: revision 1.25 sys/dev/pci/virtiovar.h: revision 1.26 sys/dev/pci/virtiovar.h: revision 1.27 sys/dev/pci/virtiovar.h: revision 1.28 sys/dev/pci/virtio.c: revision 1.70 sys/dev/pci/virtio.c: revision 1.71 sys/dev/pci/virtio.c: revision 1.72 sys/dev/pci/virtio.c: revision 1.73 sys/dev/pci/virtio.c: revision 1.74 sys/dev/pci/virtio_pci.c: revision 1.39
Set virtqueues in virtio_child_attach_finish
The number of virtqueue maybe change in a part of VirtIO devices (e.g. vioif(4)). And it is fixed after negotiation of features. So the configuration is moved into the function.
viocon(4): fix not to allocate unused virtqueue
viocon(4) allocates 4 virtqueues but it only uses 2 (0 and 1) queues.
Added functions to set interrupt handler and index into virtqueue
Added check of pointer for allocated memory before release of resource
Setup virtqueues after registering them to virtio_softc restore fetch of qsize.
Mark as MPSAFE.
virtio(4): Avoid name collision with global intrhand on sparc64.
Pacifies -Werror=shadow. No functional change intended.
Use PRIuBUSSIZE to print bus_size_t variables.
virtio(4): Fix sizing of virtqueue allocation. vq->vq_avail[0].ring is a zero-length array, and thus sizeof is zero; likewise vq->vq_used[0].ring. Use vq->vq_avail[0].ring[0] and vq->vq_used[0].ring[0] to fix this and restore the previous allocation sizing logic. XXX We shouldn't use zero-length arrays here -- they are asking for trouble like this, and C99 has a standard way to express what we're actually trying to get at it, flexible array members. PR kern/57304
virtio(4): Use flexible array members, not zero-length arrays. This enables the compiler to detect sizeof mistakes like PR kern/57304.
Use descriptor chain for free slots instead of vq_entry list Descriptors can be chained by themself. And descriptors added to avail ring or used ring are already chained. But it was not used for unused descriptors and another linked list structure named vq_entry was used.
The chain is also used for unused descriptors to make virtio(4) simpler.
Added flags to store status of attaching a virtio device
This prevents a panic on reboot after a virtio device had called virtio_child_attach_failed().
Fix wrong variable names This fixes build errors in virtio_mmio.c
|