summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-4' into stagingPeter Maydell2014-03-0743-742/+2330
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input handling rewrite. SDL2 support. # gpg: Signature made Wed 05 Mar 2014 11:16:08 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-input-4: (38 commits) ui/sdl2 : initial port to SDL 2.0 (v2.0) console: add QemuUIInfo console: add head to index to qemu consoles. input: remove index_from_keycode (no users) input: move do_mouse_set to new core input: move qmp_query_mice to new core input: add input_mouse_mode tracepoint input: move mouse mode notifier to new core input-legacy: remove kbd_mouse_event input-legacy: remove kbd_mouse_is_absolute input-legacy: remove kbd_mouse_has_absolute input-legacy: remove kbd_put_keycode input: trace events input: mouse: switch cocoa ui to new core input: keyboard: switch cocoa ui to new core input: mouse: switch monitor to new core input: mouse: switch spice ui to new core input: mouse: switch vnc ui to new core input: mouse: switch sdl ui to new core input: mouse: switch gtk ui to new core ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ui/sdl2 : initial port to SDL 2.0 (v2.0)Dave Airlie2014-03-057-9/+1123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've ported the SDL1.2 code over, and rewritten it to use the SDL2 interface. The biggest changes were in the input handling, where SDL2 has done a major overhaul, and I've had to include a generated translation file to get from SDL2 codes back to qemu compatible ones. I'm still not sure how the keyboard layout code works in qemu, so there may be further work if someone can point me a test case that works with SDL1.2 and doesn't with SDL2. Some SDL env vars we used to set are no longer used by SDL2, Windows, OSX support is untested, I don't think we can link to SDL1.2 and SDL2 at the same time, so I felt using --with-sdlabi=2.0 to select the new code should be fine, like how gtk does it. v1.1: fix keys in text console v1.2: fix shutdown, cleanups a bit of code, support ARGB cursor v2.0: merge the SDL multihead patch into this, g_new the number of consoles needed, wrap DCL inside per-console structure. Signed-off-by: Dave Airlie <airlied@redhat.com> Fixes & improvements by kraxel: * baum build fix * remove text console logic * adapt to new input core * codestyle fixups Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * console: add QemuUIInfoGerd Hoffmann2014-03-052-0/+29
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * console: add head to index to qemu consoles.Gerd Hoffmann2014-03-0524-31/+52
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: remove index_from_keycode (no users)Gerd Hoffmann2014-03-052-15/+0
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: move do_mouse_set to new coreGerd Hoffmann2014-03-052-43/+21
| | | | | | | | | | | | | | This removes the last user of the lecagy input mouse handler list, so we can remove more legacy bits with this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: move qmp_query_mice to new coreGerd Hoffmann2014-03-052-23/+29
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: add input_mouse_mode tracepointGerd Hoffmann2014-03-052-0/+2
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: move mouse mode notifier to new coreGerd Hoffmann2014-03-054-37/+35
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input-legacy: remove kbd_mouse_eventGerd Hoffmann2014-03-052-50/+0
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input-legacy: remove kbd_mouse_is_absoluteGerd Hoffmann2014-03-052-11/+1
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input-legacy: remove kbd_mouse_has_absoluteGerd Hoffmann2014-03-052-22/+2
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input-legacy: remove kbd_put_keycodeGerd Hoffmann2014-03-052-24/+0
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: trace eventsGerd Hoffmann2014-03-052-0/+56
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch cocoa ui to new coreGerd Hoffmann2014-03-052-21/+44
| | | | | | | | | | | | Build fixes by Peter Maydell. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch cocoa ui to new coreGerd Hoffmann2014-03-051-12/+6
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch monitor to new coreGerd Hoffmann2014-03-051-5/+26
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch spice ui to new coreGerd Hoffmann2014-03-051-24/+38
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch vnc ui to new coreGerd Hoffmann2014-03-052-24/+23
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch sdl ui to new coreGerd Hoffmann2014-03-051-45/+39
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch gtk ui to new coreGerd Hoffmann2014-03-051-39/+19
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: switch legacy handlers to new coreGerd Hoffmann2014-03-051-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legacy mouse event handlers are registered in the new core, so they receive events submitted to the new input core. legacy kbd_mouse_event() continues to use the old code paths. So new-core event handlers wouldn't see events submitted via kbd_mouse_event. This leads to the constrain that we we must transition all kbd_mouse_event() users first to keep things working. But that is easier to handle than translating legacy mouse events into new-core mouse events ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: add qemu_input_is_absolute()Gerd Hoffmann2014-03-052-0/+9
| | | | | | | | | | | | Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: add graphic_rotate supportGerd Hoffmann2014-03-051-0/+31
| | | | | | | | | | | | | | | | | | | | Transform absolute mouse events according to graphic_rotate. Legacy input code does it for both absolute and relative events, but the logic is broken for relative coordinates, so this is most likely not used anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: mouse: add helpers functions to coreGerd Hoffmann2014-03-052-0/+85
| | | | | | | | | | | | | | Likewise a bunch of helper functions to manage mouse button and movement events, again to make life easier for the ui code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch curses ui to new coreGerd Hoffmann2014-03-051-22/+25
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch spice ui to new coreGerd Hoffmann2014-03-051-2/+20
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch vnc ui to new coreGerd Hoffmann2014-03-051-19/+6
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch sdl ui to new coreGerd Hoffmann2014-03-051-18/+9
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch gtk ui to new coreGerd Hoffmann2014-03-051-15/+4
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch qmp_send_key() to new core.Gerd Hoffmann2014-03-051-8/+3
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: switch legacy handlers to new coreGerd Hoffmann2014-03-051-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legacy kbd event handlers are registered in the new core, so they receive events from the new input core code. keycode -> scancode translation needed here. legacy kbd_put_keycode() sends events to the new core. scancode -> keycode translation needed here. So with this patch the new input core is fully functional for keyboard events. New + legacy interfaces can be mixed in any way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: keyboard: add helper functions to coreGerd Hoffmann2014-03-052-0/+40
| | | | | | | | | | | | | | | | A bunch of helper functions to manage keyboard events, to make life simpler for the ui code when submitting keyboard events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: add core bits of the new input layerGerd Hoffmann2014-03-053-1/+116
| | | | | | | | | | | | | | Register and unregister handlers. Event dispatcher code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * input: qapi: add pause keyGerd Hoffmann2014-03-051-2/+2
| | | | | | | | | | | | | | It's missing. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * input: qapi: add unmapped keyGerd Hoffmann2014-03-051-1/+4
| | | | | | | | | | | | | | | | Simplifies building something -> QkeyCode mapping tables. Uninitialized entries can easily identified then. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * input: qapi: define event typesGerd Hoffmann2014-03-051-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define input event types, using qapi. So we get nicely autogenerated types for our input events. And when it comes to qmp support some day things will be a lot easier. Types are modeled after the linux input layer. There are separate event types for each value. There is a sync to indicate the end of a event group. Mouse events are split into motion events (one for each axis) and button events, which are grouped by sync. Keyboard events are using the existing KeyValue type. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * input: rename file to legacyGerd Hoffmann2014-03-052-1/+1
| | | | | | | | | | | | | | Rename ui/input.c to ui/input-legacy.c. We are going to replace it step by step. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * console: export QemuConsole index,width,heightGerd Hoffmann2014-03-052-0/+27
| | | | | | | | | | | | Add functions to query QemuConsole properties. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' ↵Peter Maydell2014-03-0761-740/+6818
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Patch queue for ppc - 2014-03-05 This pull request includes: - VSX emulation support - book3s pr/hv selection - some bug fixes - qdev stable numbering - eTSEC emulation # gpg: Signature made Wed 05 Mar 2014 02:14:19 GMT using RSA key ID 03FEDC60 # gpg: Can't check signature: public key not found * remotes/agraf/tags/signed-ppc-for-upstream: (130 commits) target-ppc: spapr: e500: fix to use cpu_dt_id target-ppc: add PowerPCCPU::cpu_dt_id target-ppc: Introduce hypervisor call H_GET_TCE target-ppc: Update ppc_hash64_store_hpte to support updating in-kernel htab target-ppc: Change the hpte store API target-ppc: Fix page table lookup with kvm enabled target-ppc: Fix htab_mask calculation target-ppc: Use Additional Temporary in stqcx Case target-ppc: Fix Compiler Warnings Due to 64-Bit Constants Declared as UL PPC: sPAPR: Only use getpagesize() when we run with kvm target-ppc/translate.c: Use ULL suffix for 64 bit constants spapr-vlan: flush queue whenever can_receive can go from false to true target-ppc: Altivec 2.07: Vector Permute and Exclusive OR target-ppc: Altivec 2.07: Vector SHA Sigma Instructions target-ppc: Altivec 2.07: AES Instructions target-ppc: Altivec 2.07: Binary Coded Decimal Instructions target-ppc: Altivec 2.07: Vector Polynomial Multiply Sum target-ppc: Altivec 2.07: Vector Gather Bits by Bytes target-ppc: Altivec 2.07: Doubleword Compares target-ppc: Altivec 2.07: vbpermq Instruction ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-ppc: spapr: e500: fix to use cpu_dt_idAlexey Kardashevskiy2014-03-059-25/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes use of @cpu_dt_id and related API in: 1. emulated XICS hypercall handlers as they receive fixed CPU indexes; 2. XICS-KVM to enable in-kernel XICS on right CPU; 3. device-tree renderer. This removes @cpu_index fixup as @cpu_dt_id is used instead so QEMU monitor can accept command-line CPU indexes again. This changes kvm_arch_vcpu_id() to use ppc_get_vcpu_dt_id() as at the moment KVM CPU id and device tree ID are calculated using the same algorithm. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: add PowerPCCPU::cpu_dt_idAlexey Kardashevskiy2014-03-056-25/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally CPUState::cpu_index is used to pick the right CPU for various operations. However default consecutive numbering does not always work for POWERPC. These indexes are reflected in /proc/device-tree/cpus/PowerPC,POWER7@XX and used to call KVM VCPU's ioctls. In order to achieve this, kvmppc_fixup_cpu() was introduced. Roughly speaking, it multiplies cpu_index by the number of threads per core. This approach has disadvantages such as: 1. NUMA configuration stays broken after the fixup; 2. CPU-targeted commands from the QEMU Monitor do not work properly as CPU indexes have been fixed and there is no clear way for the user to know what the new CPU indexes are. This introduces a @cpu_dt_id field in the CPUPPCState struct which is initialized from @cpu_index by default and can be fixed later to meet the device tree requirements. This adds an API to handle @cpu_dt_id. This removes kvmppc_fixup_cpu() as it is not more needed, @cpu_dt_id is calculated in ppc_cpu_realize(). This will be used later in machine code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Introduce hypervisor call H_GET_TCELaurent Dufour2014-03-052-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the hypervisor call H_GET_TCE which is basically the reverse of H_PUT_TCE, as defined in the Power Architecture Platform Requirements (PAPR). The hcall H_GET_TCE is required by the kdump kernel which is calling it to retrieve the TCE set up by the panicing kernel. Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Update ppc_hash64_store_hpte to support updating in-kernel htabAneesh Kumar K.V2014-03-054-15/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This support updating htab managed by the hypervisor. Currently we don't have any user for this feature. This actually bring the store_hpte interface in-line with the load_hpte one. We may want to use this when we want to emulate henter hcall in qemu for HV kvm. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [ folded fix for the "warn_unused_result" build break in kvmppc_hash64_write_pte(), Greg Kurz <gkurz@linux.vnet.ibm.com> ] Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Change the hpte store APIAneesh Kumar K.V2014-03-053-31/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For updating in kernel htab we need to provide both pte0 and pte1, hence update the interface to take pte0 and pte1 together Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [ ldq_phys() API change, Greg Kurz <gkurz@linux.vnet.ibm.com> ] Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Fix page table lookup with kvm enabledAneesh Kumar K.V2014-03-056-40/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With kvm enabled, we store the hash page table information in the hypervisor. Use ioctl to read the htab contents. Without this we get the below error when trying to read the guest address (gdb) x/10 do_fork 0xc000000000098660 <do_fork>: Cannot access memory at address 0xc000000000098660 (gdb) Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [ fixes for 32 bit build (casts!), ldq_phys() API change, Greg Kurz <gkurz@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Fix htab_mask calculationAneesh Kumar K.V2014-03-058-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly update the htab_mask using the return value of KVM_PPC_ALLOCATE_HTAB ioctl. Also we don't update sdr1 on GET_SREGS for HV. We check for external htab and if found true, we don't need to update sdr1 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [ fixed pte group offset computation in ppc_hash64_htab_lookup() that caused TCG to fail, Greg Kurz <gkurz@linux.vnet.ibm.com> ] Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Use Additional Temporary in stqcx CaseTom Musta2014-03-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per Alex Graf's suggestion, the recently added case to gen_conditional_store for stqcx should use an additional temporary when accessing the second doubleword. This avoids the mutation of the EA argument to the function, which is counter intuitive. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Fix Compiler Warnings Due to 64-Bit Constants Declared as ULTom Musta2014-03-051-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 64 bit constants that were erroneously declared as "ul" instead of "ull". The preferred form "ULL" is used. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | PPC: sPAPR: Only use getpagesize() when we run with kvmAlexander Graf2014-03-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently size the msi window trap page according to the host's page size so that we poke a working hole into a memory slot in case we overlap. However, this is only ever necessary with KVM active. Without KVM, we should rather try to be host platform agnostic and use a constant size: 4k. This fixes a build breakage on win32 hosts. Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud