search for: virtio_init

Displaying 20 results from an estimated 72 matches for "virtio_init".

2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi, The following patches fix couple of memory leaks in the virtio and remoteproc cores when using these as modules, and going through a cycle of insmod and rmmod with at least a device registered with the corresponding cores in between. I ran into this on our downstream product kernels on both 3.14 and 4.1 based kernels, and should apply to the latest kernel as well. Patches can be picked up
2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi, The following patches fix couple of memory leaks in the virtio and remoteproc cores when using these as modules, and going through a cycle of insmod and rmmod with at least a device registered with the corresponding cores in between. I ran into this on our downstream product kernels on both 3.14 and 4.1 based kernels, and should apply to the latest kernel as well. Patches can be picked up
2015 Sep 17
0
[PATCH 1/2] virtio: fix memory leak of virtio ida cache layers
...: Suman Anna <s-anna at ti.com> --- drivers/virtio/virtio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index b1877d73fa56..7062bb0975a5 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -412,6 +412,7 @@ static int virtio_init(void) static void __exit virtio_exit(void) { bus_unregister(&virtio_bus); + ida_destroy(&virtio_index_ida); } core_initcall(virtio_init); module_exit(virtio_exit); -- 2.5.0
2015 Sep 17
0
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...1 insertion(+) > > > > > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > > > index b1877d73fa56..7062bb0975a5 100644 > > > --- a/drivers/virtio/virtio.c > > > +++ b/drivers/virtio/virtio.c > > > @@ -412,6 +412,7 @@ static int virtio_init(void) > > > static void __exit virtio_exit(void) > > > { > > > bus_unregister(&virtio_bus); > > > + ida_destroy(&virtio_index_ida); > > > } > > > core_initcall(virtio_init); > > > module_exit(virtio_exit); > > >...
2015 Sep 17
2
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...- > drivers/virtio/virtio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index b1877d73fa56..7062bb0975a5 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -412,6 +412,7 @@ static int virtio_init(void) > static void __exit virtio_exit(void) > { > bus_unregister(&virtio_bus); > + ida_destroy(&virtio_index_ida); > } > core_initcall(virtio_init); > module_exit(virtio_exit); > -- > 2.5.0
2015 Sep 17
2
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...- > drivers/virtio/virtio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index b1877d73fa56..7062bb0975a5 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -412,6 +412,7 @@ static int virtio_init(void) > static void __exit virtio_exit(void) > { > bus_unregister(&virtio_bus); > + ida_destroy(&virtio_index_ida); > } > core_initcall(virtio_init); > module_exit(virtio_exit); > -- > 2.5.0
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...virtio_config_changed(struct virtio_device *dev) +{ + struct virtio_driver *drv = container_of(dev->dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(dev); +} +EXPORT_SYMBOL_GPL(virtio_config_changed); + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index c600ccf..ef9a165 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...virtio_config_changed(struct virtio_device *dev) +{ + struct virtio_driver *drv = container_of(dev->dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(dev); +} +EXPORT_SYMBOL_GPL(virtio_config_changed); + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index c600ccf..ef9a165 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)...
2018 Jul 20
0
[RFC 1/4] virtio: Define virtio_direct_dma_ops structure
...ers/virtio/virtio.c @@ -3,6 +3,7 @@ #include <linux/virtio_config.h> #include <linux/module.h> #include <linux/idr.h> +#include <linux/dma-mapping.h> #include <uapi/linux/virtio_ids.h> /* Unique numbering for virtio devices. */ @@ -442,3 +443,62 @@ core_initcall(virtio_init); module_exit(virtio_exit); MODULE_LICENSE("GPL"); + +/* + * Virtio direct mapping DMA API operations structure + * + * This defines DMA API structure for all virtio devices which would not + * either bring in their own DMA OPS from architecture or they would not + * like to use archi...
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi, When booting a recent kernel under KVM with the virtio-rng device enabled, the boot process was stalling. Bisect pointed to a commit made during the 3.15 window to fetch randomness from newly-registered devices in the hwrng core. The details are in the patches. I considered a couple of approaches, but basing on the init() function being registered, as is done in patch 1 here, seems like
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi, When booting a recent kernel under KVM with the virtio-rng device enabled, the boot process was stalling. Bisect pointed to a commit made during the 3.15 window to fetch randomness from newly-registered devices in the hwrng core. The details are in the patches. I considered a couple of approaches, but basing on the init() function being registered, as is done in patch 1 here, seems like
2018 Jan 05
0
[PATCH v4 3/3] qemu: add linkspeed and duplex settings to virtio-net
...ot;'speed' must be between -1 (SPEED_UNKOWN) and " + "INT_MAX"); + } else if (n->net_conf.speed >= 0) { + n->host_features |= (1ULL << VIRTIO_NET_F_SPEED_DUPLEX); + } + virtio_net_set_config_size(n, n->host_features); virtio_init(vdev, "virtio-net", VIRTIO_ID_NET, n->config_size); @@ -2161,6 +2191,8 @@ static Property virtio_net_properties[] = { DEFINE_PROP_UINT16("host_mtu", VirtIONet, net_conf.mtu, 0), DEFINE_PROP_BOOL("x-mtu-bypass-backend", VirtIONet, mtu_bypass_backend,...
2014 Oct 05
0
[PATCH 04/16] virtio-pci: move freeze/restore to virtio core
...+ int ret = drv->restore(dev); + if (ret) { + add_status(dev, VIRTIO_CONFIG_S_FAILED); + return ret; + } + /* Finally, tell the device we're all set */ + add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + } + + return 0; +} +EXPORT_SYMBOL_GPL(virtio_device_restore); +#endif + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 58cbf6e..d34ebfa 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -57,9 +57,6 @@ struct virtio_pci_device /* Vectors allocated, excluding pe...
2014 Oct 06
0
[PATCH v2 03/15] virtio-pci: move freeze/restore to virtio core
...+ int ret = drv->restore(dev); + if (ret) { + add_status(dev, VIRTIO_CONFIG_S_FAILED); + return ret; + } + /* Finally, tell the device we're all set */ + add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + } + + return 0; +} +EXPORT_SYMBOL_GPL(virtio_device_restore); +#endif + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 58cbf6e..d34ebfa 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -57,9 +57,6 @@ struct virtio_pci_device /* Vectors allocated, excluding pe...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...+ int ret = drv->restore(dev); + if (ret) { + add_status(dev, VIRTIO_CONFIG_S_FAILED); + return ret; + } + } + + /* Finally, tell the device we're all set */ + add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + + return 0; +} +EXPORT_SYMBOL_GPL(virtio_device_restore); +#endif + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index f39f4e7..d34ebfa 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -57,9 +57,6 @@ struct virtio_pci_device /* Vectors allocated, excluding pe...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...+ int ret = drv->restore(dev); + if (ret) { + add_status(dev, VIRTIO_CONFIG_S_FAILED); + return ret; + } + } + + /* Finally, tell the device we're all set */ + add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + + return 0; +} +EXPORT_SYMBOL_GPL(virtio_device_restore); +#endif + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index f39f4e7..d34ebfa 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -57,9 +57,6 @@ struct virtio_pci_device /* Vectors allocated, excluding pe...
2014 Oct 05
0
[PATCH 02/16] virtio: unify config_changed handling
...virtio_config_changed(struct virtio_device *dev) +{ + struct virtio_driver *drv = container_of(dev->dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(dev); +} +EXPORT_SYMBOL_GPL(virtio_config_changed); + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index c600ccf..ef9a165 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)...
2014 Oct 06
0
[PATCH v2 02/15] virtio: unify config_changed handling
...MBOL_GPL(unregister_virtio_device); +void virtio_config_changed(struct virtio_device *dev) +{ + struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + + if (drv && drv->config_changed) + drv->config_changed(dev); +} +EXPORT_SYMBOL_GPL(virtio_config_changed); + static int virtio_init(void) { if (bus_register(&virtio_bus) != 0) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index c600ccf..ef9a165 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)...
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed significantly. See http://lguest.ozlabs.org/patches for the whole thing, from new-io.patch onwards). Changes since last version: - Switch to our own bus implementation, rather than relying on an implementation-specific bus to back this up. - Make virtio_config_ops much higher-level, don't assume layout of
2007 Sep 24
3
[PATCH 0/3] virtio implementation (draft VI)
I'm not reposting the drivers this time since they haven't changed significantly. See http://lguest.ozlabs.org/patches for the whole thing, from new-io.patch onwards). Changes since last version: - Switch to our own bus implementation, rather than relying on an implementation-specific bus to back this up. - Make virtio_config_ops much higher-level, don't assume layout of