History | View | Annotate | Download (65.1 kB)
Fix mingw32 build
Don't define qemu_chr_open_eventfd() on Windows.
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...
block: Decouple block device "commit all" from DriveInfo
do_commit() and mux_proc_byte() iterate over the list of drivesdefined with drive_init(). This misses host block devices defined byother means. Such means don't exist now, but will be introduced later...
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hxfile, it's is a copy of this information.
While it's good to keep it near code, maintaining two copies ofthe same information is too hard and has little benefit as we...
stash away SCM_RIGHTS fd until a getfd command arrives
If there is already a fd in s->msgfd before recvmsg it isclosed by parts that this patch does not touch. So, onlyone descriptor can be "leaked" by attaching it to a commandother than getfd.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
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...
fix function signature of qemu_chr_open_pty on !linux
Signed-off-By: Riku Voipio <riku.voipio@nokia.com>Signed-off-By: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Restore terminal monitor attributes - addition
Patch 2d753894c7553d6a05e8fdbed5f4704398919a35 was missing this check,when running monitor as /dev/tty and other serial device, i.e: qemu -monitor /dev/tty -serial /dev/pts/1
Without this patch any serial device will override the monitor stored...
Fix some compilation warnings on FreeBSD hosts
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Revert "Convert atexit users to exit_notifier"
This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025.
Conflicts:
hw/xen_machine_pv.c
This should have never been committed.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Convert atexit users to exit_notifier
All of these users have global state so we really don't see a benefit fromexit_notifier. However, using exit_notifier means that there's one lessjustification for having global state in the first place.
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>
Fix corner case in chardev udp: parameter
The missing '' broke 'udp::<port>:<port>' parsing.
' broke 'udp::<port>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Restore terminal attributes for tty based monitor
Patch http://permalink.gmane.org/gmane.comp.emulators.qemu/63472 handleclose when using tty devices (like /dev/ttyS0),yet tty based monitor are not restoring terminal attributes (as donewith stdio based monitor), when closing qemu after that command:...
qemu-char.c: drop debug printfs from qemu_chr_parse_compat
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
add close callback for tty-based char device
v1 -> v2 coding style changes
Add a tty close callback. Right now if a guest device that is connectedto a tty-based chardev in the host is removed, the tty is not closed.With this patch it is closed.
Example use case is connecting an emulated USB serial cable in the guest...
Do not ignore error, if open file failed (-serial /dev/tty)
In case, when qemu is executed with option like-serial /dev/ttyS0, report if there are problems withopening of devices. At now errors are silently ignoring.
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>...
char: Remove redundant qemu_chr_generic_open() call.
qemu_chr_open_fd() calls qemu_chr_generic_open(),so qemu_chr_open_tty() doesn't need to call it.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>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>
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on filedescriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix commit a167ba50851cdac2fa36633587e98c5956cd6b18
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add support for GNU/kFreeBSD
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: don't limit data sent to backends to 1k per buffer
chardevs have a 'can_read' function via which backends specifythe amount of data they can receive. When can_read returns > 0,apps can start sending data. However, each chardev driver hereallows a max. of 1k bytes inspite of the backend being able to...
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...
serial: Support additional serial speed values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
net: remove unused includes of if_tun.h and if_tap.h
Looks like these are just artifacts of vl.c being split up.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add chardev option to disable signal.
If I am using vga and serial which is stdio and hit C-c onserial console, qemu terminates. That is annoying for me.So make it configurable whether signal is generated when C-c is hit.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>...
char: check for initial_reset_issued unnecessary
At init, qemu_chr_reset is always called with initial_reset_issued set to 1.So checking for it to be set is not necessary.
Patchworks-ID: 35286Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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,...
convert windows console chardev to QemuOpts.
convert tty + parport chardevs to QemuOpts.
new cmd line syntax: -chardev tty,id=name,path=/dev/tty* -chardev parport,id=name,path=/dev/parport*
convert vc chardev to QemuOpts.
new cmd line syntax: -chardev vc,id=name -chardev vc,id=name,width=pixels,height=pixels -chardev vc,id=name,cols=chars,rows=chars
convert mux chardev to QemuOpts.
new cmd line syntax: you can add mux=1 to any chardev to enable muxing,then attach it multiple times, like this:
-chardev pty,name=mux,mux=on
convert udp chardev to QemuOpts.
While being at it: create a new inet_dgram_opts() function for udp setup,so udp can handle IPv6 now.
new cmd line syntax: -chardev udp,id=name,host=remotehost,port=remoteport,\ localaddr=bindaddr,localport=bindport...
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"....
monitor: fix muxing
make the mux driver send mux_in and mux_out events when switchingfocus while hooking up more handlers.
stop using CharDriverState->focus in monitor.c, track state usingthe mux events instead. This also removes the implicit assumtion...
move mux focus field from CharDriverState to MuxDriver
Now that monitor stopped using focus we can make it internalto the mux driver.
convert unix+tcp chardevs to QemuOpts.
new cmd line syntax: unix socket: -chardev socket,id=name,path=/path/to/socket tcp socket: -chardev socket,id=name,host=hostaddr|ipaddr,port=portnr
server and nowait options work as usual. Alternatively you can use...
convert pty chardev to QemuOpts.
convert stdio chardev to QemuOpts.
convert msmouse chardev to QemuOpts.
convert braille chardev to QemuOpts.
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...
convert file+pipe chardevs to QemuOpts.
new cmd line syntax: -chardev file,id=name,path=/path/to/file -chardev pipe,id=name,path=/path/to/pipe
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>
More NULL pointer fixes
Fix typo WIN32 -> _WIN32
This was spotted by Juan Quintela
rename HOST_BSD to CONFIG_BSD
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
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....
Make tcp_chr_read() use recvmsg()
Split out tcp_chr_recv() out of tcp_chr_read() and implement it onnon-win32 using recvmsg(). This is needed for a subsequent patchwhich implements SCM_RIGHTS support.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
mux-term: Localize timestamps
As we can have multiple multiplexed terminals, timestamp control andtracking should better take place per MuxDriver.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
mux-term: Fix timestamp association
So far a new timestamp was generated after a full line had beenprinted. Fix this.
Win32: Don't remove const attribute in type casts.
Type casts removing the const attribute are bad becausethey hide the fact that the argument remains const.
They also result in a compiler warning (at least with MS-C).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Fix mingw32 build warnings
Work around buffer and ioctlsocket argument type signedness problemsSuppress a prototype which is unused on mingw32Expand a macro to avoid warnings from some GCC versions
Refactor how display drivers are selected
My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). Thisis because it's necessary to tell when the no special display parameters havebeen passed and default to SDL or VNC appropriately.
This refactors the display selection logic to be less complicated which has...
Fix OpenSolaris gcc4 warnings: iovec type mismatches, missing 'static'
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7103 c046a42c-6fe2-441c-8c8c-71466251a162
char: Fix closing of various char devices (Jan Kiszka)
This patch fixes several issues around closing char devices. Affectedwere pty (timer was left behind, even running), udp (no close handlingat all) and tcp (missing async IO handler cleanup). The bugs either...
Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka)
This allows to create monitor terminals that do not make use of theinteractive readline back-end but rather send complete commands. Thepass-through monitor interface of the gdbstub will be an example....
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: Decouple terminals (Jan Kiszka)
Currently all registered (and activate) monitor terminals work inbroadcast mode: Everyone sees what someone else types on some otherterminal and what the monitor reports back. This model is broken whenyou have a management monitor terminal that is automatically operated...
monitor: Drop banner hiding (Jan Kiszka)
There is no use for the hide/show banner option, and it is appliedinconsistently anyway (or what makes the difference between -serial mon:stdio and -nographic for the monitor?). So drop this mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
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-mux: Use separate input buffers (Jan Kiszka)
Currently, the intermediate input buffer of mux'ed character devicesrecords data across all sub-devices. This has the side effect that weeasily leak data recorded over one sub-devices to another once we switch...
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...
qemu_chr_open_tcp: allow ipv4 and ipv6 options
Those new options are parsed in qemu-sockets.c. Allow them instead ofprinting "Unknown option".
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6584 c046a42c-6fe2-441c-8c8c-71466251a162
QEMU Microsoft serial mouse emulation
Adds "msmouse" character device, which emulates a serial mouse.Use it with -serial msmouse.
Signed-Off-By: Lubomir Rintel <lkundrak@v3.sk>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6559 c046a42c-6fe2-441c-8c8c-71466251a162
fix use of host serial port
Signed-off-by: David Ahern <daahern@cisco.com>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6556 c046a42c-6fe2-441c-8c8c-71466251a162
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
monitor-mux: fix timestamp prefixes (Jan Kiszka)
rt_clock returns milliseconds. Fix mux'ed monitor terminal timestampsaccordingly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6399 c046a42c-6fe2-441c-8c8c-71466251a162
add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced inrevision 6352.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
Fix character devices after DisplayState refactoring
The DisplayState refactoring changed the machine init function to create aDisplayState for each VGA device instead of being passed an existingDisplayState. This change is critical to enable multiple graphics device...
graphical_console_init change (Stefano Stabellini)
Patch 5/7
This patch changes the graphical_console_init function to return anallocated DisplayState instead of a QEMUConsole.
This patch contains just the graphical_console_init change and few othermodifications mainly in console.c and vl.c....
Make OpenBSD sparc-softmmu compile warning free
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6299 c046a42c-6fe2-441c-8c8c-71466251a162
Fix warning from sparse
Remove unnecessary declaration for errno (this fixes a warning from sparse)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5833 c046a42c-6fe2-441c-8c8c-71466251a162
Native FreeBSD parallel port (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5779 c046a42c-6fe2-441c-8c8c-71466251a162
fix some variable initizalization issues (Stefano Stabellini)
this patch fixes two variable initialization issues.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5705 c046a42c-6fe2-441c-8c8c-71466251a162
sockets: switch over tcp/telnet/unix serial line to new helper functions (Gerd Hoffman)
This switches the tcp, telnet and unix socket support for characterdevices (serial/parallel, ...) to the new socket helpers. Thereby theygain IPv6 support and also get ability to search for a free tcp port....
sockets: helper functions for qemu (Gerd Hoffman)
This patch creates a new source file qemu-sockets.c with a bunch ofhelper functions to create listening and connected sockets.
New features of this code are (a) support for searching for a freeport in a given range and (b) support for IPv6....
Fix some build issues for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5646 c046a42c-6fe2-441c-8c8c-71466251a162
qemu-char: include hw/baum.h
Fix a warning introduced in r5580 when brlapi is enabled.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5584 c046a42c-6fe2-441c-8c8c-71466251a162
Remove extraneous inline keyword.
Spotted by Blue Swirl.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5582 c046a42c-6fe2-441c-8c8c-71466251a162
Move CharDriverState code out of vl.c
The motivating goal behind this is to allow other tools to use the CharDrivercode. This patch is pure code motion except for the Makefile changes and thecopyright/header in qemu-char.c.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...