According virtio specification v1.2 there is a DEVICE_NEEDS_RESET
flag in device status register is available.
If i set this flag with interrupt in virtio_pci_common_cfg.mxix_config
(or 1-bit of ISR
) from device after successfull probe there are not any reset from driver is happens.
In linux kernel sources (https://elixir.bootlin.com/linux/v6.5.2/source/include/uapi/linux/virtio_config.h#L44) this bit define but not used (exept mlx5_vnet.c - custom device).
What is right way to initiate guest driver reset from device side?
Thanx.
According 2.1 Device Status Field of specification there is a
DEVICE_NEEDS_RESET
bit is enable for indicate to driver that the device has experienced an error.In
2.1.2 Device Requirements: Device Status Field
:According
4.1.4.3 Common configuration structure layout
, there are few type of notification (device to driver) is enable:common interrupt (
config_msix_vector
)queue interrupt (
queue_msix_vector
)I play with
virtio-pci-net
deice. In general case, it hase 3 queue:tx
,rx
,control
. Device driver settx_msix=2
,rx_msix=1
,control_msix=0
,config_msix_vector=0
.Device need reset case (my sequence):
virtio_pci_common_cfg.config_generation
DEVICE_NEEDS_RESET
in status registerconfig_msix_vector
But driver only check control queue settings at all.
What i am doing wrong?
some info from my stand.
Guest OS
PCI config space
PCI BAR0
interrupts
Thanks