virtio mmio reset - driver requirements
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Srivatsa Vaddagiri
I noticed this in virtio spec for PCI transport based devices:
"After writing 0 to
device_status, the driver MUST wait for a read ofdevice_statusto return 0 before reinitializing the device."I was wondering why the spec does not recommend a similar "wait after writing 0
to status register" for other transports such as MMIO.Even the Linux code for
virtio_mmiodoes not have any such wait:static void
vm_reset(struct virtio_device *vdev){ struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); /* 0 status means a reset. */ writel(0, vm_dev->base + VIRTIO_MMIO_STATUS); }
Quoted 8 lines
Does that assume that backends are implemented in software when MMIO writes result in trap and backend synchronously does everything needed to handle reset
as part of trap handling? Wouldn't it break if we were to have backends implemented in hardware device accessed via MMIO transport?Thanks
vatsa
I guess yes.
Quoted 3 lines
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]