You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit enhances the VirtioDeviceActions Trait to accommodate Vhost
and Vhost-User devices effectively. It introduces four new methods to
the VirtioDeviceActions trait to facilitate seamless interaction with
these devices:
- `read_config` and `write_config`: These methods are invoked when the
driver intends to read from or write to the device configuration space.
Given that the device configuration space can be managed by various
handlers outside of the VMM, such as vhost-user when the protocol
feature CONFIG is negotiated, dedicated logic is necessary to handle
these operations (e.g. GET_CONFIG/SET_CONFIG requests).
- `negotiate_driver_features`: This method is called when the driver
finishes the negotiation of the device features with the frontend
device (selecting page 0). This method is crucial when the device
handler is implemented outside of the VMM since the frontend
device needs to negotiate the features with the backend device.
Otherwise, the device will not be prepared to support, for example,
multiple queues and configuration space reads and writes.
- `interrupt_status`: When the driver requires reading the interrupt
status from the device, this method is invoked. Since the responsibility
for managing interrupt status lies with the frontend device, specialized
logic is needed to update the interrupt status appropriately (Used Buffer
Notification or Configuration Change Notification). If the device is
implemented within the VMM, the interrupt status is direct management
and updating by the device.
Signed-off-by: joaopeixoto13 <[email protected]>
0 commit comments