summaryrefslogtreecommitdiffstats
path: root/backends
Commit message (Collapse)AuthorAgeFilesLines
* rng random backend: check for -EAGAIN errors on readAmit Shah2013-04-161-0/+3
| | | | | | | | | | | | | | | | Not handling EAGAIN triggers the assert qemu/backends/rng-random.c:44:entropy_available: assertion failed: (len != -1) Aborted (core dumped) This happens when starting a guest with '-device virtio-rng-pci', issuing a 'cat /dev/hwrng' in the guest, while also doing 'cat /dev/random' on the host. Reported-by: yunpingzheng <yunzheng@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Message-id: eacda84dfaf2d99cf6d250b678be4e4d6c2088fb.1366108096.git.amit.shah@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-156-8/+8
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tpm: reorganize headers and split hardware partPaolo Bonzini2013-04-151-1/+37
| | | | | | | | | | | | | The TPM subsystem does not have a full front-end/back-end separation. The sole available backend, tpm_passthrough, depends on the data structures of the sole available frontend, tpm_tis. However, we can at least try to split the user interface (tpm.c) from the implementation (hw/tpm). The patches makes tpm.c not include tpm_int.h, which is shared between tpm_tis.c and tpm_passthrough.c; instead it moves more stuff to tpm_backend.h. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-char: Call fe_claim / fe_release when not using qdev chr propertiesHans de Goede2013-04-051-0/+6
| | | | | | | | | | | | | | | | | | chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QOM-ify the TPM supportStefan Berger2013-04-022-0/+156
| | | | | | | | | | QOM-ified the TPM support with much code borrowed from the rng implementation. All other TPM related code moves will be provided in a subsequent patch. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Message-id: 1364469981.24703.1.camel@d941e-10 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_openHans de Goede2013-03-271-1/+1
| | | | | | | | To better reflect that it is for handling a backend being opened. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* chardev: add braille support to qapiGerd Hoffmann2013-03-131-2/+2
| | | | | | | This patch adds 'braille' support to qapi and also switches over the braille chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* chardev: add msmouse support to qapiGerd Hoffmann2013-03-131-2/+2
| | | | | | | This patch adds 'msmouse' support to qapi and also switches over the msmouse chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'bonzini/hw-dirs' into stagingAnthony Liguori2013-03-113-0/+721
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/hw-dirs: sh: move files referencing CPU to hw/sh4/ ppc: move more files to hw/ppc ppc: move files referencing CPU to hw/ppc/ m68k: move files referencing CPU to hw/m68k/ i386: move files referencing CPU to hw/i386/ arm: move files referencing CPU to hw/arm/ hw: move boards and other isolated files to hw/ARCH ppc: express FDT dependency of pSeries and e500 boards via default-configs/ build: always link device_tree.o into emulators if libfdt available hw: include hw header files with full paths ppc: do not use ../ in include files vt82c686: vt82c686 is not a PCI host bridge virtio-9p: remove PCI dependencies from hw/9pfs/ virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX hw: move device-hotplug.o to toplevel, compile it once hw: move qdev-monitor.o to toplevel directory hw: move fifo.[ch] to libqemuutil hw: move char backends to backends/ Conflicts: backends/baum.c backends/msmouse.c hw/a15mpcore.c hw/arm/Makefile.objs hw/arm/pic_cpu.c hw/dataplane/event-poll.c hw/dataplane/virtio-blk.c include/char/baum.h include/char/msmouse.h qemu-char.c vl.c Resolve conflicts caused by header movements. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * hw: move char backends to backends/Paolo Bonzini2013-03-013-0/+709
| | | | | | | | | | | | | | Braille and msmouse support is in hw/, but it is not hardware. Move it to the backends/ directory. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | rng-random: Use qemu_open / qemu_closeStefan Berger2013-03-081-2/+2
|/ | | | | | | | | In the rng backend use qemu_open and qemu_close rather than POSIX open/close. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Make all static TypeInfos constAndreas Färber2013-01-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move include files to include/qobject/Paolo Bonzini2012-12-193-3/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* rng-random: only build on POSIX platformsAnthony Liguori2012-11-191-1/+2
| | | | | | | There is no /dev/random on win32. Cc: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rng-egd: don't use gslist_free_fullAnthony Liguori2012-11-161-5/+14
| | | | | | This function was only introduced in glib 2.28.0. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rng-egd: introduce EGD compliant RNG backendAnthony Liguori2012-11-162-1/+216
| | | | | | | | | | | This backend talks EGD to a CharDriverState. A typical way to invoke this would be: qemu -chardev socket,host=localhost,port=1024,id=chr0 \ -object rng-egd,chardev=chr0,id=egd0 \ -device virtio-rng-pci,rng=egd0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rng-random: add an RNG backend that uses /dev/random (v3)Anthony Liguori2012-11-162-1/+162
| | | | | | | | | | | | | | | | | | | The filename can be overridden but it expects a non-blocking source of entropy. A typical invocation would be: qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0 This can also be used with /dev/urandom by using the command line: qemu -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - merged header split patch into this one v2 -> v3 - bug fix in rng-random (Paolo)
* rng: add RndBackend abstract object classAnthony Liguori2012-11-162-0/+94
This is the backend used by devices that need to request entropy. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>