Re: [PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-29 Thread Jason Wang
On Fri, May 27, 2022 at 6:50 PM Michael S. Tsirkin wrote: > > At a minimum, I don't see why it's part of the series. Host can always > crash the guest if it wants to ... Probably not with some recent technology. In those cases, a fault will be generated if the hypervisor tries to access the memor

Re: [PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-27 Thread Michael S. Tsirkin
At a minimum, I don't see why it's part of the series. Host can always crash the guest if it wants to ... The point of BUG_ON is device or driver is already corrupted so we should not try to drive it. If you still want this in pls come up with a better commit log explaining the why. On Fri, May 2

Re: [PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-27 Thread Stefano Garzarella
On Fri, May 27, 2022 at 02:01:20PM +0800, Jason Wang wrote: We used to use BUG_ON() in virtio_device_ready() to detect illegal status value, this seems sub-optimal since the value is under the control of the device. Switch to use WARN_ON() instead. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "P

Re: [PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-27 Thread Xuan Zhuo
On Fri, 27 May 2022 14:01:20 +0800, Jason Wang wrote: > We used to use BUG_ON() in virtio_device_ready() to detect illegal > status value, this seems sub-optimal since the value is under the > control of the device. Switch to use WARN_ON() instead. > > Cc: Thomas Gleixner > Cc: Peter Zijlstra >

[PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-26 Thread Jason Wang
We used to use BUG_ON() in virtio_device_ready() to detect illegal status value, this seems sub-optimal since the value is under the control of the device. Switch to use WARN_ON() instead. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Corne