History | View | Annotate | Download (7.3 kB)
qdev: nuke qdev_init_chardev()
I'm sure the intentions were good here, but there's no reason this should be inqdev. Move it to qemu-char where it belongs.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: rename qemu_chr_event to qemu_chr_be_event and make it public
Rename qemu_chr_event to qemu_chr_be_event, since it is only to becalled by backends and make it public so that it can be used by chardevcode which lives outside of qemu-char.c
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
main-loop: create main-loop.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
char: rename qemu_chr_get_msgfd() -> qemu_chr_fe_get_msgfd()
char: remove qemu_chr_send_event()
It's dead code.
char: document the functions that will be the public interface
char: rename qemu_chr_open() -> qemu_chr_new()
char: qemu_chr_open_opts() -> qemu_chr_new_from_opts()
char: rename qemu_chr_close() -> qemu_chr_delete()
char: qemu_chr_ioctl() -> qemu_chr_fe_ioctl()
char: rename qemu_chr_set_echo() -> qemu_chr_fe_set_echo()
char: rename qemu_chr_read() -> qemu_chr_be_write()
char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()
char: rename qemu_chr_guest_open() -> qemu_chr_fe_open()
char: rename qemu_chr_guest_close() -> qemu_chr_fe_close()
char: rename qemu_chr_write() -> qemu_chr_fe_write()
char: rename qemu_chr_printf() -> qemu_chr_fe_printf()
Introduce a 'client_add' monitor command accepting an open FD
Allow client connections for VNC and socket based characterdevices to be passed in over the monitor using SCM_RIGHTS.
One intended usage scenario is to start QEMU with VNC on aUNIX domain socket. An unprivileged user which cannot access...
char: Allow devices to use a single multiplexed chardev.
This fixes regression caused by commit2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6("char: Prevent multiple devices opening same chardev"):
-nodefaults -nographic -chardev stdio,id=stdio,mux=on,signal=off \...
chardev: Allow frontends to notify backends of guest open / close
Some frontends know when the guest has opened the "channel" and is activelylistening to it, for example virtio-serial. This patch adds 2 new qemu-chardevfunctions which can be used by frontends to signal guest open / close, and...
char: Prevent multiple devices opening same chardev
Prevent:
-chardev socket,path=/tmp/foo,server,nowait,id=c0 \-device virtserialport,chardev=c0,id=vs0 \-device virtserialport,chardev=c0,id=vs1
Reported-by: Mike Cao <bcao@redhat.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>
add qemu_chr_set_echo
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Introduce Memory driver
This driver handles in-memory chardev operations. That's, all writesto this driver are stored in an internal buffer and it doesn't talkto the external world in any way.
Right now it's very simple: it supports only writes. But it can be...
Use GCC_FMT_ATTR (format checking)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
RESEND: Inter-VM shared memory PCI device
resend for bug fix related to removal of irqfd
Support an inter-vm shared memory device that maps a shared-memory object as aPCI device in the guest. This patch also supports interrupts between guest bycommunicating over a unix domain socket. This patch applies to the qemu-kvm...
Always notify consumers of char devices if they're open
When using virtio-console on s390, the input doesn't work.
The root of the problem is rather simple. What happens is the following:
1) create character device for stdio 2) char device is done creating, sends OPENED event...
rename IOCanRWHandler to IOCanReadHandler
It was always only used for reads
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: Convert qemu_chr_info() to QObject
Each device is represented by a QDict. The returned QObject is a QListof all devices.
This commit should not change user output.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
un-static qemu_chr_parse_compat()
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename qemu_chr_reset to qemu_chr_generic_open
This function sends out the OPENED event to backends thathave drive the chardevs. The 'reset' is now a historicalartifact and we can now just call the function for what itis.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
char: Remove special init_reset handling
The initial_reset sent to chardevs doesn't do much other than settinga bool to true. Char devices are interested in the open event andthat gets sent whenever the device is opened.
Moreover, the reset logic breaks as and when qemu's bh scheduling...
Revert "char: emit the OPENED event only when a new char connection is opened"
This reverts commit 6cfa64de908d67fb6f6b6e3ae4888dd863f69e44.
This breaks the monitor prompt. Proper fix will come from Amit.
char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED
The char event RESET is emitted when a char device is opened.Give it a better name.
Patchworks-ID: 35287Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: emit the OPENED event only when a new char connection is opened
The OPENED event gets sent also when qemu resets its state initially.The consumers of the event aren't interested in receiving this eventon reset.
Patchworks-ID: 35288Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Allow -serial chardev:<name>
Lets put -chardev into use now. With this patch applied chardev:name isaccepted as chardev specification everywhere, i.e. now you can:
-chardev stdio,id=ttyS0 -serial chardev:ttyS0
which does the same as '-serial stdio"....
move mux focus field from CharDriverState to MuxDriver
Now that monitor stopped using focus we can make it internalto the mux driver.
switch chardev to QemuOpts: infrastructure, null device
start switching chardevs to QemuOpts. This patch adds theinfrastructure and converts the null device.
The patch brings two new functions:
qemu_chr_open_opts() same as qemu_chr_open(), but uses QemuOpts instead of a...
char: Emit 'CLOSED' events on char device close
Notify users of the char interface whenever the file / connection isclosed.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add SCM_RIGHTS support to unix socket character devices
If a file descriptor is passed via a message with SCM_RIGHTS ancillarydata on a unix socket, store the file descriptor for use in thechr_read() handler. Close the file descriptor if it was not used....
monitor: Improve mux'ed console experience (Jan Kiszka)
Up to now, you never really knew if you already switched the consoleafter pressing CTRL-A C or if you mistyped it again. This patchclarifies the situation by providing a prompt in a new line andinjecting a linebreak when switching away again. For this purpose, the...
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
char: Fix initial reset (Jan Kiszka)
Recent changes to the graphical console initialization broke the initialCHR_EVENT_RESET distribution. The reset BHs generated on char deviceinitialization are now already consumed during machine init (ide init... -> qemu_aio_wait -> qemu_bh_poll). Therefore, this patch moves the...
add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced inrevision 6352.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
Move some declarations around in the QEMU CharDriver code
The goal of this series is to move the CharDriverState code out of vl.c andinto its own file, qemu-char.c. This patch moves around some declarations sothe next patch can be pure code motion.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use andimplements a "info chardev" monitor command to print a list.
qemu_chr_open() sticks the devices into a linked list now. It got a newargument (label), so there is a name for each device. It also assigns a...
qemu-char.h: Fix IOCTL values
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5073 c046a42c-6fe2-441c-8c8c-71466251a162
Parallel Port Direction Fix
The direction bit in the control register should not be directly
set using PPWCONTROL. The kernel gives the following debug message.
parport0 (ppdev0): use data_reverse for this!
More over setting the data pins to forward mode does not work,...
Upgrade emulated UART to 16550A (Stefano Stabellini)
This patch upgrades the emulated UART to 16550A, the code comes fromxen-unstable. The main improvement was introduced with the following patch andsubsequent email thread:
http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00129.html...
Add input buffer to mux chr (patch by Tristan Gingold).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3735 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162