search for: device_ready

Displaying 15 results from an estimated 15 matches for "device_ready".

2018 Jul 23
1
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...I won't be too worried. > - When the device isn't ready, ballooning won't happen, that is, > vb->num_pages will be 0, which results in shrinker_count=0 and shrinker_scan > won't be called. > > So I think it would be better to have shrinker registered before > device_ready. > > Best, > Wei
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...dev_info.inode->i_mapping->a_ops = &balloon_aops; > #endif > + err = virtio_balloon_register_shrinker(vb); > + if (err) > + goto out_del_vqs; > So we can get scans before device is ready. Leak will fail then. Why not register later after device is ready? > virtio_device_ready(vdev); > > @@ -637,7 +654,7 @@ static void virtballoon_remove(struct virtio_device *vdev) > { > struct virtio_balloon *vb = vdev->priv; > > - unregister_oom_notifier(&vb->nb); > + virtio_balloon_unregister_shrinker(vb); > > spin_lock_irq(&vb->s...
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...dev_info.inode->i_mapping->a_ops = &balloon_aops; > #endif > + err = virtio_balloon_register_shrinker(vb); > + if (err) > + goto out_del_vqs; > So we can get scans before device is ready. Leak will fail then. Why not register later after device is ready? > virtio_device_ready(vdev); > > @@ -637,7 +654,7 @@ static void virtballoon_remove(struct virtio_device *vdev) > { > struct virtio_balloon *vb = vdev->priv; > > - unregister_oom_notifier(&vb->nb); > + virtio_balloon_unregister_shrinker(vb); > > spin_lock_irq(&vb->s...
2023 Apr 05
3
[PATCH v2 0/2] rust: virtio: add virtio support
This used to be a single patch, but I split it into two with the addition of struct Scatterlist. Again a bit new with Rust submissions. I was told by Gary Guo to rebase on top of rust-next, but it seems *very* behind? The first patch does not build on its own due to a dead_code warning. It is hard to not have dead code when one is adding infrastructure to be used by others at a later
2018 Jul 23
0
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...r not to set device ready when register_shrinker failed. - When the device isn't ready, ballooning won't happen, that is, vb->num_pages will be 0, which results in shrinker_count=0 and shrinker_scan won't be called. So I think it would be better to have shrinker registered before device_ready. Best, Wei
2014 Oct 12
1
[PATCH v3 10/25] virtio: add API to enable VQs early
virtio spec 0.9.X requires DRIVER_OK to be set before VQs are used, but some drivers use VQs before probe function returns. Since DRIVER_OK is set after probe, this violates the spec. Even though under virtio 1.0 transitional devices support this behaviour, we want to make it possible for those early callers to become spec compliant and eventually support non-transitional devices. Add API for
2014 Oct 12
1
[PATCH v3 10/25] virtio: add API to enable VQs early
virtio spec 0.9.X requires DRIVER_OK to be set before VQs are used, but some drivers use VQs before probe function returns. Since DRIVER_OK is set after probe, this violates the spec. Even though under virtio 1.0 transitional devices support this behaviour, we want to make it possible for those early callers to become spec compliant and eventually support non-transitional devices. Add API for
2015 Mar 19
2
[PATCH 1/1] Add virtio-input driver.
...NT; abs++) { > + if (!test_bit(abs, vi->idev->absbit)) > + continue; > + virtinput_cfg_abs(vi, abs); > + } > + } > + > + err = input_register_device(vi->idev); Once you do this, virtinput_status can get called, and that will kick, correct? If so, you must call device_ready before this. > + if (err) > + goto out4; > + > + return 0; > + > +out4: > + input_free_device(vi->idev); > +out3: > + vdev->config->del_vqs(vdev); > +out2: > + kfree(vi); > +out1: > + return err; free on error is out of order with initialization. M...
2015 Mar 19
2
[PATCH 1/1] Add virtio-input driver.
...NT; abs++) { > + if (!test_bit(abs, vi->idev->absbit)) > + continue; > + virtinput_cfg_abs(vi, abs); > + } > + } > + > + err = input_register_device(vi->idev); Once you do this, virtinput_status can get called, and that will kick, correct? If so, you must call device_ready before this. > + if (err) > + goto out4; > + > + return 0; > + > +out4: > + input_free_device(vi->idev); > +out3: > + vdev->config->del_vqs(vdev); > +out2: > + kfree(vi); > +out1: > + return err; free on error is out of order with initialization. M...
2015 Mar 20
0
[PATCH 1/1] Add virtio-input driver.
...ents explaining why these #s make sense? See other subthread, will be changed to be host-provided (like name). > > + err = input_register_device(vi->idev); > > Once you do this, virtinput_status can get called, > and that will kick, correct? Correct. > If so, you must call device_ready before this. Ok. > > + if (err) > > + goto out4; > > + > > + return 0; > > + > > +out4: > > + input_free_device(vi->idev); > > +out3: > > + vdev->config->del_vqs(vdev); > > +out2: > > + kfree(vi); > > +out1: > &g...
2015 Mar 20
0
[PATCH 1/1] Add virtio-input driver.
...ents explaining why these #s make sense? See other subthread, will be changed to be host-provided (like name). > > + err = input_register_device(vi->idev); > > Once you do this, virtinput_status can get called, > and that will kick, correct? Correct. > If so, you must call device_ready before this. Ok. > > + if (err) > > + goto out4; > > + > > + return 0; > > + > > +out4: > > + input_free_device(vi->idev); > > +out3: > > + vdev->config->del_vqs(vdev); > > +out2: > > + kfree(vi); > > +out1: > &g...
2015 Mar 21
3
[PATCH 1/1] Add virtio-input driver.
...other subthread, will be changed to be host-provided (like name). > > > > + err = input_register_device(vi->idev); > > > > Once you do this, virtinput_status can get called, > > and that will kick, correct? > > Correct. > > > If so, you must call device_ready before this. > > Ok. > > > > + if (err) > > > + goto out4; > > > + > > > + return 0; > > > + > > > +out4: > > > + input_free_device(vi->idev); > > > +out3: > > > + vdev->config->del_vqs(vdev); >...
2015 Mar 21
3
[PATCH 1/1] Add virtio-input driver.
...other subthread, will be changed to be host-provided (like name). > > > > + err = input_register_device(vi->idev); > > > > Once you do this, virtinput_status can get called, > > and that will kick, correct? > > Correct. > > > If so, you must call device_ready before this. > > Ok. > > > > + if (err) > > > + goto out4; > > > + > > > + return 0; > > > + > > > +out4: > > > + input_free_device(vi->idev); > > > +out3: > > > + vdev->config->del_vqs(vdev); >...
2015 Mar 19
5
[PATCH 0/1] Add virtio-input driver.
Hi, This patch adds a virtio driver for input devices. Specification: https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input https://www.kraxel.org/virtio/virtio-v1.0-csprd03-virtio-input.html#x1-2640007 Qemu patches; https://lists.gnu.org/archive/html/qemu-devel/2015-03/threads.html#03973 Gerd Hoffmann (1): Add virtio-input driver. drivers/virtio/Kconfig | 10 ++
2015 Mar 19
5
[PATCH 0/1] Add virtio-input driver.
Hi, This patch adds a virtio driver for input devices. Specification: https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input https://www.kraxel.org/virtio/virtio-v1.0-csprd03-virtio-input.html#x1-2640007 Qemu patches; https://lists.gnu.org/archive/html/qemu-devel/2015-03/threads.html#03973 Gerd Hoffmann (1): Add virtio-input driver. drivers/virtio/Kconfig | 10 ++