Displaying 20 results from an estimated 49 matches for "free_cdev".
2009 Aug 05
0
[PATCH] virtio_serial: A char device for simple guest <-> host communication
...return -ENOMEM;
+
+ devt = MKDEV(major, port_nr);
+ cdev_init(&port->cdev, &virtserial_fops);
+
+ ret = register_chrdev_region(devt, 1, "virtio-serial");
+ if (ret < 0) {
+ pr_err("%s: error registering chrdev region, ret = %d\n",
+ __func__, ret);
+ goto free_cdev;
+ }
+ ret = cdev_add(&port->cdev, devt, 1);
+ if (ret < 0) {
+ pr_err("%s: error adding cdev, ret = %d\n", __func__, ret);
+ goto free_cdev;
+ }
+ port->dev = device_create(virtserial.class, NULL, devt, NULL,
+ "vmch%u", port_nr);
+ if (IS_ERR(port->dev))...
2009 Aug 05
0
[PATCH] virtio_serial: A char device for simple guest <-> host communication
...return -ENOMEM;
+
+ devt = MKDEV(major, port_nr);
+ cdev_init(&port->cdev, &virtserial_fops);
+
+ ret = register_chrdev_region(devt, 1, "virtio-serial");
+ if (ret < 0) {
+ pr_err("%s: error registering chrdev region, ret = %d\n",
+ __func__, ret);
+ goto free_cdev;
+ }
+ ret = cdev_add(&port->cdev, devt, 1);
+ if (ret < 0) {
+ pr_err("%s: error adding cdev, ret = %d\n", __func__, ret);
+ goto free_cdev;
+ }
+ port->dev = device_create(virtserial.class, NULL, devt, NULL,
+ "vmch%u", port_nr);
+ if (IS_ERR(port->dev))...
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all,
This are the latest version of the patches.
Lots of things have changed since the last submission. A few of
which I remember:
- VNC copy / paste works* (* conditions apply)
- client vnc copies get propagated to guest port 3 (/dev/vmch3)
- guest writes to port 3 (/dev/vmch3) go straight to client's clipboard
- sysfs hooks to autodiscover ports
- support for 64 ports in this
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all,
This are the latest version of the patches.
Lots of things have changed since the last submission. A few of
which I remember:
- VNC copy / paste works* (* conditions apply)
- client vnc copies get propagated to guest port 3 (/dev/vmch3)
- guest writes to port 3 (/dev/vmch3) go straight to client's clipboard
- sysfs hooks to autodiscover ports
- support for 64 ports in this
2009 Sep 11
1
Multiple ports support for virtio_console; major number for dev
Hello,
This is the patch that I have for adding support for multiple ports to
virtio_console. It's pretty stable in my testing so far and the memory
corruption that I had earlier has been resolved in linux-next so I'm
proposing this for inclusion.
This currently uses device major number 60 from the experimental range;
Alan could you please reserve a new major number for virtio_console?
2009 Sep 11
1
Multiple ports support for virtio_console; major number for dev
Hello,
This is the patch that I have for adding support for multiple ports to
virtio_console. It's pretty stable in my testing so far and the memory
corruption that I had earlier has been resolved in linux-next so I'm
proposing this for inclusion.
This currently uses device major number 60 from the experimental range;
Alan could you please reserve a new major number for virtio_console?
2009 Jun 23
4
virtio-serial: A guest <-> host interface for simple communication
Hello,
Here are two patches. One implements a virtio-serial device in qemu
and the other is the driver for a guest kernel.
While working on a vmchannel interface that is needed for communication
between guest userspace and host userspace, I saw that most of the
interface can be abstracted out as a "serial" device with "ports".
Some requirements for a vmchannel are listed at
2009 Jun 23
4
virtio-serial: A guest <-> host interface for simple communication
Hello,
Here are two patches. One implements a virtio-serial device in qemu
and the other is the driver for a guest kernel.
While working on a vmchannel interface that is needed for communication
between guest userspace and host userspace, I saw that most of the
interface can be abstracted out as a "serial" device with "ports".
Some requirements for a vmchannel are listed at
2009 Sep 03
3
Multiple port support for virtio-console
Hello all,
Here is a new iteration of the patch series that implements a
transport for guest and host communications.
I've tested for compatibility (old qemu & new kernel, new qemu & old
kernel, new qemu & new kernel) and it all works fine*.
There are a few items on my todo list but this works well.
New since last send:
- live migration support**
- write path in the guest
2009 Sep 03
3
Multiple port support for virtio-console
Hello all,
Here is a new iteration of the patch series that implements a
transport for guest and host communications.
I've tested for compatibility (old qemu & new kernel, new qemu & old
kernel, new qemu & new kernel) and it all works fine*.
There are a few items on my todo list but this works well.
New since last send:
- live migration support**
- write path in the guest
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello,
This is a new iteration of the patches that implement virtio-serial. Changes
include:
* Adding support for port hot-add
* Creating ports at specific ids that can be bound to specific apps / usage
* Cleanups
This code still doesn't get rid of the support for assigning names
to ports but it just has to be ripped out.
Comments welcome.
Thanks,
Amit.
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello,
This is a new iteration of the patches that implement virtio-serial. Changes
include:
* Adding support for port hot-add
* Creating ports at specific ids that can be bound to specific apps / usage
* Cleanups
This code still doesn't get rid of the support for assigning names
to ports but it just has to be ripped out.
Comments welcome.
Thanks,
Amit.
2010 Apr 14
1
[PULL] virtio console fixes, abi change
...verted during git rebase operations
(thanks Juan).
The diff to the v6 version is attached below:
diff --git a/drivers/char/virtio_console.c
b/drivers/char/virtio_console.c
index b06a0e5..a64558f 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1083,6 +1083,8 @@ free_cdev:
free_port:
kfree(port);
fail:
+ /* The host might want to notify management sw about port add
failure */
+ send_control_msg(port, VIRTIO_CONSOLE_PORT_READY, 0);
return err;
}
@@ -1407,17 +1513,14 @@ static int __devinit virtcons_probe(struct
virtio_device *vdev)...
2010 Apr 14
1
[PULL] virtio console fixes, abi change
...verted during git rebase operations
(thanks Juan).
The diff to the v6 version is attached below:
diff --git a/drivers/char/virtio_console.c
b/drivers/char/virtio_console.c
index b06a0e5..a64558f 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1083,6 +1083,8 @@ free_cdev:
free_port:
kfree(port);
fail:
+ /* The host might want to notify management sw about port add
failure */
+ send_control_msg(port, VIRTIO_CONSOLE_PORT_READY, 0);
return err;
}
@@ -1407,17 +1513,14 @@ static int __devinit virtcons_probe(struct
virtio_device *vdev)...
2018 Apr 20
0
[PATCH 3/6] virtio_console: free buffers after reset
...ned int nr_added_bufs;
int err;
@@ -1513,8 +1512,6 @@ static int add_port(struct ports_device *portdev, u32 id)
return 0;
free_inbufs:
- while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf, true);
free_device:
device_destroy(pdrvdata.class, port->dev->devt);
free_cdev:
@@ -1539,34 +1536,14 @@ static void remove_port(struct kref *kref)
static void remove_port_data(struct port *port)
{
- struct port_buffer *buf;
-
spin_lock_irq(&port->inbuf_lock);
/* Remove unused data this port might have received. */
discard_port_data(port);
spin_unlock_irq(&a...
2009 Sep 29
0
[PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
...quot;, __func__, ret);
+ goto free_chrdev;
+ }
+ port->dev = device_create(virtconsole.class, NULL, devt, NULL,
+ "vcon%u", port_nr);
+ if (IS_ERR(port->dev)) {
+ ret = PTR_ERR(port->dev);
+ pr_err("%s: error creating device, ret = %d\n", __func__, ret);
+ goto free_cdev;
+ }
+ ret = sysfs_create_group(&port->dev->kobj, &virtcon_attribute_group);
+ if (ret) {
+ pr_err("%s: error creating sysfs device attributes, ret = %d\n",
+ __func__, ret);
+ goto free_cdev;
+ }
+
+ INIT_LIST_HEAD(&port->readbuf_head);
+ init_waitqueue_hea...
2009 Sep 29
0
[PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
...quot;, __func__, ret);
+ goto free_chrdev;
+ }
+ port->dev = device_create(virtconsole.class, NULL, devt, NULL,
+ "vcon%u", port_nr);
+ if (IS_ERR(port->dev)) {
+ ret = PTR_ERR(port->dev);
+ pr_err("%s: error creating device, ret = %d\n", __func__, ret);
+ goto free_cdev;
+ }
+ ret = sysfs_create_group(&port->dev->kobj, &virtcon_attribute_group);
+ if (ret) {
+ pr_err("%s: error creating sysfs device attributes, ret = %d\n",
+ __func__, ret);
+ goto free_cdev;
+ }
+
+ INIT_LIST_HEAD(&port->readbuf_head);
+ init_waitqueue_hea...
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all,
Here is a new iteration of the patch series that implements a
transport for guest and host communications.
The code has been updated to reuse the virtio-console device instead
of creating a new virtio-serial device.
I've tested for compatibility (old qemu & new kernel, new qemu & old
kernel, new qemu & new kernel) and it all works fine.
There are a few items on my
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all,
Here is a new iteration of the patch series that implements a
transport for guest and host communications.
The code has been updated to reuse the virtio-console device instead
of creating a new virtio-serial device.
I've tested for compatibility (old qemu & new kernel, new qemu & old
kernel, new qemu & new kernel) and it all works fine.
There are a few items on my
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...ufs++;
@@ -1234,7 +1279,7 @@ static int add_port(struct ports_device *portdev, u32 id)
free_inbufs:
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf);
+ free_buf(port->in_vq, buf, PAGE_SIZE);
free_device:
device_destroy(pdrvdata.class, port->dev->devt);
free_cdev:
@@ -1276,7 +1321,7 @@ static void remove_port_data(struct port *port)
/* Remove buffers we queued up for the Host to send us data in. */
while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
- free_buf(buf);
+ free_buf(port->in_vq, buf, PAGE_SIZE);
}
/*
@@ -1478,7 +1523,7 @@ s...