OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: virtio mmio reset - driver requirements


On Mon, Jul 05, 2021 at 10:07:15PM +0530, Srivatsa Vaddagiri wrote:
> I noticed this in virtio spec for PCI transport based devices:
> 
> "After writing 0 to device_status, the driver MUST wait for a read of
> device_status to 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_mmio does 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);
> }
> 
> 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.

> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]