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-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset

在 2021/8/17 下午8:48, Srivatsa Vaddagiri 写道:
* Srivatsa Vaddagiri <quic_svaddagi@quicinc.com> [2021-08-17 15:33:33]:

Handling reset is the only open issue we have, as guest triggering reset has
currently no provision to poll for reset completion and hypervisor itself cannot
handle reset completly. This is where we observed discrepancy between PCI vs
MMIO in handling reset, which we wanted to address with this discussion.

I think the option we discussed earlier of a new feature bit seems less
intrusive than incrementing MMIO version?

Alternately would it be fine to merge a change like this to Linux virtio_mmio
driver w/o requiring any further changes to spec?

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 56128b9..9db81e6 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -262,6 +262,9 @@ static void vm_reset(struct virtio_device *vdev)
/* 0 status means a reset. */
  	writel(0, vm_dev->base + VIRTIO_MMIO_STATUS);
+	while (vm_get_status(vdev))
+		msleep(1);

I think we still need some clarification on the spec.

Note that doing this, with an untrusted device the system tool like modprobe may block at this forever

We probably need a way to fail the reset.

VDUSE meets similar issue.


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