summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-25console: zap ds arg from register_displaychangelistenerGerd Hoffmann9-16/+13
We don't have multiple DisplayStates any more, so passing it in as argument is not needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: switch ppm_save to qemu_openGerd Hoffmann1-2/+4
... so it works with fdset. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: add qemu_console_lookup_by_deviceGerd Hoffmann2-0/+20
Look up the QemuConsole for a given device, using the new link. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: add device link to QemuConsolesGerd Hoffmann23-28/+43
So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25console: qom-ify QemuConsoleGerd Hoffmann3-2/+30
Just the minimal bits to turn QemuConsoles into Objects. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-25virtio-ccw: Check indicators location.Cornelia Huck1-0/+6
If a guest neglected to register (secondary) indicators but still runs with notifications enabled, we might end up writing to guest zero; avoid this by checking for valid indicators and only writing to the guest and generating an interrupt if indicators have been setup. Cc: qemu-stable@nongnu.org Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-04-24pc: Kill the "use flash device for BIOS unless KVM" misfeatureMarkus Armbruster4-4/+39
Use of a flash memory device for the BIOS was added in series "[PATCH v10 0/8] PC system flash support", commit 4732dca..1b89faf, v1.1. Flash vs. ROM is a guest-visible difference. Thus, flash use had to be suppressed for machine types pc-1.0 and older. This was accomplished by adding a dummy device "pc-sysfw" with property "rom_only": * Non-zero rom_only means "use ROM". Default for pc-1.0 and older. * Zero rom_only means "maybe use flash". Default for newer machines. Not only is the dummy device ugly, it was also retroactively added to the older machine types! Fortunately, it's not guest-visible (thus no immediate guest ABI breakage), and has no vmstate (thus no immediate migration breakage). Breakage occurs only if the user unwisely enables flash by setting rom_only to zero. Patch review FAIL #1. Why "maybe use flash"? Flash didn't (and still doesn't) work with KVM. Therefore, rom_only=0 really means "use flash, except when KVM is enabled, use ROM". This is a Bad Idea, because it makes enabling/ disabling KVM guest-visible. Patch review FAIL #2. Aside: it also precludes migrating between KVM on and off, but that's not possible for other reasons anyway. Fix as follows: 1. Change the meaning of rom_only=0 to mean "use flash, no ifs, buts, or maybes" for pc-i440fx-1.5 and pc-q35-1.5. Don't change anything for older machines (to remain bug-compatible). 2. Change the default value from 0 to 1 for these machines. Necessary, because 0 doesn't work with KVM. Once it does, we can flip the default back to 0. 3. Don't revert the retroactive addition of device "pc-sysfw" to older machine types. Seems not worth the trouble. 4. Add a TODO comment asking for device "pc-sysfw" to be dropped once flash works with KVM. Net effect is that you get a BIOS ROM again even when KVM is disabled, just like for machines predating the introduction of flash. To get flash instead, use "--global pc-sysfw.rom_only=0". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24pc: Split pc_init_pci_1_0() off pc_init_pci_1_2()Markus Armbruster1-4/+12
Just to make the next commit easier to review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24pc: Inline pc_init_pci_1_3() into pc_init_pci_1_2()Markus Armbruster1-1/+2
Just to make the commit after next easier to review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24Merge remote-tracking branch 'alon/libcacard_ccid.1' into stagingAnthony Liguori19-342/+838
# By Alon Levy (15) and others # Via Alon Levy * alon/libcacard_ccid.1: (28 commits) libcacard/cac: change big switch functions to single return point dev-smartcard-reader: empty implementation for Mechanical (fail correctly) libcacard: move atr setting from macro to function libcacard/vreader: add debugging messages for apdu dev-smartcard-reader: copy atr protocol to ccid parameters dev-smartcard-reader: change default protocol to T=0 dev-smartcard-reader: define structs for CCID_Parameter internals ccid-card-passthru, dev-smartcard-reader: add debug environment variables ccid-card-passthru: add atr check libcacard: change default ATR dev-smartcard-reader: reuse usb.h definitions dev-smartcard-reader: support windows guest dev-smartcard-reader: remove aborts (never triggered, but just in case) dev-smartcard-reader: nicer debug messages dev-smartcard-reader: white space fixes libcacard: remove default libcoolkey loading libcacard: remove sql: prefix libcacard: teach vscclient to use GMainLoop for portability libcacard: vscclient to use QemuThread for portability libcacard: split vscclient main() from socket reading ... Message-id: 921423767.1475937.1366790789930.JavaMail.root@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24build: include config-{, all-}devices.mak after defining CONFIG_SOFTMMU and ↵Paolo Bonzini2-7/+7
CONFIG_USER_ONLY Moving the inclusions closer to Makefile, and before rules.mak, makes Makefile and Makefile.target more consistent with each other. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Markus Armbruster <armbru@redhat.com> Message-id: 1366102238-12374-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio: drop unused function prototypes.KONRAD Frederic1-10/+0
This removes the unused prototypes in virtio.h. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio: cleanup: init and exit function.KONRAD Frederic8-29/+10
This clean the init and the exit functions and rename virtio_common_cleanup to virtio_cleanup. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio: remove virtiobindings.KONRAD Frederic11-122/+73
This remove virtio-bindings, and use class instead. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio: remove the function pointer.KONRAD Frederic13-107/+62
This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-pci: cleanup.KONRAD Frederic2-54/+2
This remove the init, exit functions as they are no longer used. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-bus: make virtio_x_bus_new static.KONRAD Frederic6-8/+9
virtio_x_bus_new are only used in file scope. So this make them static. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-bus: add new functions.KONRAD Frederic2-0/+28
This add two functions: * virtio_bus_set_vdev_config. * virtio_bus_set_vdev_feature. Needed by virtio-ccw. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng: cleanup: use QOM casts.KONRAD Frederic2-13/+16
As the virtio-rng-pci, virtio-rng-s390 and virtio-rng-ccw are switched to the new API, we can use QOM casts. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-9-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng: cleanup: remove qdev field.KONRAD Frederic2-4/+0
The qdev field is no longer needed, just drop it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng: cleanup: init and exit functions.KONRAD Frederic2-68/+21
This remove old init and exit function as they are no longer needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng-ccw: switch to the new API.KONRAD Frederic2-28/+32
Here the virtio-rng-ccw is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng-s390: switch to the new API.KONRAD Frederic2-17/+34
Here the virtio-rng-s390 is modified for the new API. The device virtio-rng-s390 extends virtio-s390-device as before. It creates and connects a virtio-rng during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng-pci: switch to the new API.KONRAD Frederic2-90/+74
Here the virtio-rng-pci is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. The virtio_pci_reset function, is removed as no longer used. The virtio_pci_rst function, is renamed virtio_pci_reset. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng: add virtio-rng device.KONRAD Frederic4-16/+117
Create virtio-rng-device which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24virtio-rng: don't use pointer for configuration.KONRAD Frederic2-7/+7
The configuration field must not be a pointer as it will be used for virtio-rng properties. So *conf is replaced by conf. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24input: introduce keyboard handler listGerd Hoffmann4-16/+32
Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list will be used for events. This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events will be re-routed to the ps/2 kbd instead of being discarded. [ v2: fix cut+paste bug found my Markus ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-3-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann2-17/+20
There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-2-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24ich9: kill cmos_s3Hu Tao5-19/+6
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366799842-18550-1-git-send-email-hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24libcacard/cac: change big switch functions to single return pointAlon Levy1-21/+52
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: empty implementation for Mechanical (fail correctly)Alon Levy1-0/+4
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: move atr setting from macro to functionAlon Levy5-16/+58
Only because qemu's checkpatch complains about it. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard/vreader: add debugging messages for apduAlon Levy3-7/+85
Using g_debug with log domain libcacard Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: copy atr protocol to ccid parametersAlon Levy1-0/+45
Adds todos. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: change default protocol to T=0Alon Levy1-3/+3
We don't support T=1 so we shouldn't advertise it by default. Two independent changes: * Default ATR sets T=0. This gets overwritten by the client provided ATR later. * Class descriptor changes dwAdvertise dwProtocols.PPPP to 0x1 and dwProtocols.RRRR=0 per spec. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: define structs for CCID_Parameter internalsAlon Levy1-27/+47
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24ccid-card-passthru, dev-smartcard-reader: add debug environment variablesAlon Levy4-0/+31
Introduces a new utility function: parse_debug_env to avoid code duplication. This overrides whatever debug value is set on the corresponding devices from the command line, and is meant to ease the usage with any management stack. For libvirt you can set environment variables by extending the dom namespace, i.e: <domain type='kvm' id='3' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <qemu:commandline> <qemu:env name='QEMU_CCID_PASSTHRU_DEBUG' value='4'/> <qemu:env name='QEMU_CCID_DEBUG' value='4'/> </qemu:commandline> </domain> Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24ccid-card-passthru: add atr checkAlon Levy1-0/+59
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: change default ATRAlon Levy1-2/+10
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: reuse usb.h definitionsAlon Levy1-11/+5
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: support windows guestAlon Levy1-2/+2
By not advertising USB wakeup support (which we don't). Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: remove aborts (never triggered, but just in case)Alon Levy1-8/+12
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: nicer debug messagesAlon Levy1-6/+63
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24dev-smartcard-reader: white space fixesAlon Levy1-0/+4
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24libcacard: remove default libcoolkey loadingMarc-André Lureau1-16/+1
Use only the modules defined in the NSS database. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: remove sql: prefixMarc-André Lureau1-4/+2
For some reason, with sql:/ prefix, the PKCS11 modules are not loaded. This patch goes on top of Alon smartcard series. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: teach vscclient to use GMainLoop for portabilityMarc-André Lureau1-145/+246
This version handles non-blocking sending and receiving from the socket. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: vscclient to use QemuThread for portabilityMarc-André Lureau1-7/+2
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: split vscclient main() from socket readingMarc-André Lureau1-152/+162
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: fix mingw64 cross-compilationMarc-André Lureau2-3/+8
Compile and link with version.lo Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>