All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] Timing out virtio-pci config space access
@ 2021-11-04 17:07 Srivatsa Vaddagiri
  2021-11-05  4:52 ` [virtio-dev] " Jason Wang
  2021-11-05  7:38 ` [virtio-dev] " Michael S. Tsirkin
  0 siblings, 2 replies; 7+ messages in thread
From: Srivatsa Vaddagiri @ 2021-11-04 17:07 UTC (permalink / raw)
  To: virtio-dev; +Cc: mst, jasowang

We are working on a virtio-pci implementation on a Type-1 hypervisor where
backend drivers are hosted in another VM and are considered untrusted. PCI is
the virtio transport used in this case.

One issue that crops up is a read/write of config space can potentially block
forever, as the backend is untrusted and could be causing a denial-of-service of
sorts. This causes the vcpu to stall forever. I was wondering if we can timeout
in such case and have the hypervisor break the stall by letting read return
"error" (-1) along with setting DEVICE_NEEDS_RESET in status register. Will that
allow Linux guest driver to gracefully fail its probe? I don't see where Linux
handles DEVICE_NEEDS_RESET currently and also am not sure if returning -1 will
lead to graceful failure of the driver alone (we don't want VM to come down or
panic because of a mis-behaving device). 

I saw some discussions in this regard for vDPA where similar solution seem to
have been discussed.

https://lkml.org/lkml/2021/7/6/219

Would that work for PCI transport also?

Thanks
vatsa


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-05 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-04 17:07 [virtio-dev] Timing out virtio-pci config space access Srivatsa Vaddagiri
2021-11-05  4:52 ` [virtio-dev] " Jason Wang
2021-11-05 12:42   ` Srivatsa Vaddagiri
2021-11-05  7:38 ` [virtio-dev] " Michael S. Tsirkin
2021-11-05 12:29   ` Srivatsa Vaddagiri
2021-11-05 13:13     ` Michael S. Tsirkin
2021-11-05 14:12       ` Srivatsa Vaddagiri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.