VZCustomVirtioDeviceDelegate
A delegate protocol that defines the methods you implement to respond to the life cycle events of a custom Virtio device.
Declaration
protocol VZCustomVirtioDeviceDelegate : NSObjectProtocolOverview
When you define these methods and set the delegate on your VZCustomVirtioDevice instance, the Virtualization framework notifies you when the Virtio device stops, pauses, resumes, or resets by the invocation of the respective methods defined here, and you can provide code to handle each of these situations.
The framework considers the device to be ready when the guest driver sets DRIVER_OK, indicated by the invocation of customVirtioDeviceDidAcceptDriverOk(_:), this means that the guest driver is set up and ready to drive the device, and the device is ready to process any device operations.
Virtqueue (Virtio queue) notifications trigger device operations, then the framework invokes the customVirtioDevice(_:didReceiveNotificationFor:) method when the guest driver sends the device a virtqueue notification, and you can provide code to handle the notification.