sdk/emulator/qemu.git
10 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140527' into...
Peter Maydell [Wed, 28 May 2014 14:00:33 +0000 (15:00 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140527' into staging

target-arm:
 * Preliminary restructuring for EL2/EL3 support
 * improve CPACR handling
 * fix pxa2xx_lcd palette formats
 * update highbank/midway maintainer

# gpg: Signature made Tue 27 May 2014 17:26:27 BST using RSA key ID 14360CDE
# gpg: Can't check signature: public key not found

* remotes/pmaydell/tags/pull-target-arm-20140527: (26 commits)
  target-arm: A64: Register VBAR_EL3
  target-arm: A64: Register VBAR_EL2
  target-arm: Make vbar_write writeback to any CPREG
  target-arm: A64: Generalize update_spsel for the various ELs
  target-arm: A64: Generalize ERET to various ELs
  target-arm: A64: Trap ERET from EL0 at translation time
  target-arm: A64: Forbid ERET to higher or unimplemented ELs
  target-arm: Register EL3 versions of ELR and SPSR
  target-arm: Register EL2 versions of ELR and SPSR
  target-arm: Add a feature flag for EL3
  target-arm: Add a feature flag for EL2
  target-arm: A64: Introduce aarch64_banked_spsr_index()
  target-arm: Add SPSR entries for EL2/HYP and EL3/MON
  target-arm: A64: Add ELR entries for EL2 and 3
  target-arm: A64: Add SP entries for EL2 and 3
  target-arm: c12_vbar -> vbar_el[]
  target-arm: Make esr_el1 an array
  target-arm: Make elr_el1 an array
  target-arm: Use a 1:1 mapping between EL and MMU index
  target-arm: A32: Use get_mem_index for load/stores
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/xtensa/tags/20140526-xtensa' into staging
Peter Maydell [Wed, 28 May 2014 13:47:35 +0000 (14:47 +0100)]
Merge remote-tracking branch 'remotes/xtensa/tags/20140526-xtensa' into staging

Xtensa fixes queue 2014-05-26:
- fix cross-page jumps/calls at the end of TB;
- add tests for TBs and instructions crossing page boundary.

# gpg: Signature made Mon 26 May 2014 09:37:39 BST using RSA key ID F83FA044
# gpg: Can't check signature: public key not found

* remotes/xtensa/tags/20140526-xtensa:
  target-xtensa: add tests for cross-page TB
  target-xtensa: completely clean TLB between MMU tests
  target-xtensa: fix cross-page jumps/calls at the end of TB

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/kraxel/tags/pull-usb-7' into staging
Peter Maydell [Wed, 28 May 2014 12:52:03 +0000 (13:52 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-7' into staging

usb: usb3 streams support for usb-host and usb-redir
usb: xhci and mtp bugfixes.

# gpg: Signature made Mon 26 May 2014 09:44:09 BST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

* remotes/kraxel/tags/pull-usb-7:
  usb-host-libusb: Set stream id when submitting bulk-stream transfers
  usb-host-libusb: Add alloc / free streams ops
  usb-host-libusb: Fill in endpoint max_streams when available
  usb-redir: Add support for bulk streams
  usb-mtp: handle usb_mtp_get_object failure
  usb-mtp: handle lseek failure
  usb-mtp: use bool to track MTPObject init status
  xhci: add xhci_get_flag
  xhci: add endpoint cap on express bus only
  xhci: child detach fix

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/kraxel/tags/pull-console-1' into staging
Peter Maydell [Wed, 28 May 2014 11:36:25 +0000 (12:36 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-1' into staging

console: multiwindow support for text terminal QemuConsoles
console: small fixes

# gpg: Signature made Mon 26 May 2014 09:17:27 BST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

* remotes/kraxel/tags/pull-console-1:
  console: add kbd_put_keysym_console
  console: rework text terminal cursor logic
  console: update text terminal surface unconditionally
  console: nicer initial screen
  console: Abort on property access errors

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-7' into staging
Peter Maydell [Wed, 28 May 2014 10:18:58 +0000 (11:18 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-7' into staging

gtk: ui overhaul, multiwindow support.

# gpg: Signature made Mon 26 May 2014 08:54:55 BST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

* remotes/kraxel/tags/pull-gtk-7: (24 commits)
  gtk: workaround gtk2 vte resize issue
  gtk: window sizing overhaul
  gtk: zap unused global_state
  gtk: Add handling for the xfree86 keycodes
  gtk: enable untabify for gfx
  gtk: detached window pointer grabs
  gtk: update all windows on mouse mode changes
  gtk: fix grab checks
  gtk: update gd_update_caption
  gtk: skip keyboard grab when hover autograb is active
  gtk: keep track of grab owner
  gtk: add gd_grab trace event
  gtk: add tab to trace events
  gtk: allow moving tabs to windows and back.
  gtk: simplify resize
  gtk: use device type as label
  gtk: support multiple gfx displays
  gtk: move vga state into VirtualGfxConsole
  gtk: VirtualConsole restruction
  gtk: remove page numbering assumtions from the code
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into staging
Peter Maydell [Wed, 28 May 2014 09:33:05 +0000 (10:33 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into staging

input: add event routing and multiseat support.
input: misc bugfixes and minor improvements.

# gpg: Signature made Mon 26 May 2014 07:44:29 BST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found

* remotes/kraxel/tags/pull-input-9:
  docs: add multiseat.txt
  usb: add input routing support for tablet and keyboard
  sdl: pass key event source to input layer
  input: bind devices and input routing
  input: switch hid mouse and tablet to the new input layer api.
  input: switch hid keyboard to new input layer api.
  input: keymap: add meta keys
  input: add name to input_event_key_number
  input: add qemu_input_key_number_to_qcode
  input (curses): mask keycodes to remove modifier bits

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-05-26' into staging
Peter Maydell [Tue, 27 May 2014 21:45:03 +0000 (22:45 +0100)]
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-05-26' into staging

trivial patches for 2014-05-26

# gpg: Signature made Mon 26 May 2014 08:17:08 BST using RSA key ID A4C3D7DB
# gpg: Can't check signature: public key not found

* remotes/mjt/tags/trivial-patches-2014-05-26: (23 commits)
  libcacard: remove useless initializers
  net: cadence_gem: Fix top comment
  bsd-user: replace fprintf(stderr, ...) with error_report()
  audio: replace fprintf(stderr, ...) with error_report() in audio
  libcacard: fix wrong array expansion logic
  libcacard/vcard_emul_nss: Drop a redundant conditional
  libcacard: Convert two leftover realloc() to GLib
  libcacard/vreader: Tighten assertion to clarify intent
  libcacard/vreader: Drop broken recovery from failed assertion
  libcacard: Plug memory leaks around vreader_get_reader_list()
  libcacard/vscclient: Bury some dead code
  vl: fix 'name' option to work with -readconfig
  configure: Put tempfiles in a subdir of the build directory
  dma-helpers: avoid calling dma_bdrv_unmap() twice
  arch_init: replace fprintf(stderr, ...) with error_report()
  pci: move dereferencing of root only after verifying valid root pointer
  jazz_led: Add missing break in switch case
  bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc
  configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable
  nbd: Miscellaneous typo fixes.
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/mwalle/tags/lm32-semihosting/20140524' into...
Peter Maydell [Tue, 27 May 2014 21:11:25 +0000 (22:11 +0100)]
Merge remote-tracking branch 'remotes/mwalle/tags/lm32-semihosting/20140524' into staging

* remotes/mwalle/tags/lm32-semihosting/20140524:
  lm32: remove lm32_sys
  test: lm32: use semihosting for testing
  target-lm32: add semihosting support
  test: lm32: make test cases independent

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/rth/tcg-mips' into staging
Peter Maydell [Tue, 27 May 2014 17:31:02 +0000 (18:31 +0100)]
Merge remote-tracking branch 'remotes/rth/tcg-mips' into staging

* remotes/rth/tcg-mips: (24 commits)
  tcg-mips: Enable direct chaining of TBs
  tcg-mips: Simplify movcond
  tcg-mips: Simplify brcond2
  tcg-mips: Improve setcond eq/ne vs zeros
  tcg-mips: Simplify setcond2
  tcg-mips: Simplify brcond
  tcg-mips: Simplify setcond
  tcg-mips: Commonize opcode implementations
  tcg-mips: Improve add2/sub2
  tcg-mips: Hoist args loads
  tcg-mips: Fix subtract immediate range
  tcg-mips: Name the opcode enumeration
  tcg-mips: Use EXT for AND on mips32r2
  tcg-mips: Use T9 for TCG_TMP1
  tcg-mips: Introduce TCG_TMP0, TCG_TMP1
  tcg-mips: Rearrange register allocation
  tcg-mips: Convert to new_ldst
  tcg-mips: Convert to new qemu_l/st helpers
  tcg-mips: Move softmmu slow path out of line
  tcg-mips: Split large ldst offsets
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Register VBAR_EL3
Edgar E. Iglesias [Tue, 27 May 2014 16:09:55 +0000 (17:09 +0100)]
target-arm: A64: Register VBAR_EL3

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-24-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Register VBAR_EL2
Edgar E. Iglesias [Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)]
target-arm: A64: Register VBAR_EL2

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-23-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Make vbar_write writeback to any CPREG
Edgar E. Iglesias [Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)]
target-arm: Make vbar_write writeback to any CPREG

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-22-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Generalize update_spsel for the various ELs
Edgar E. Iglesias [Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)]
target-arm: A64: Generalize update_spsel for the various ELs

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-21-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Generalize ERET to various ELs
Edgar E. Iglesias [Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)]
target-arm: A64: Generalize ERET to various ELs

Adds support for ERET to and from AArch64 EL2 and 3.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-20-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Trap ERET from EL0 at translation time
Edgar E. Iglesias [Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)]
target-arm: A64: Trap ERET from EL0 at translation time

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-19-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Forbid ERET to higher or unimplemented ELs
Edgar E. Iglesias [Tue, 27 May 2014 16:09:53 +0000 (17:09 +0100)]
target-arm: A64: Forbid ERET to higher or unimplemented ELs

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-18-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Register EL3 versions of ELR and SPSR
Edgar E. Iglesias [Tue, 27 May 2014 16:09:53 +0000 (17:09 +0100)]
target-arm: Register EL3 versions of ELR and SPSR

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-17-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Register EL2 versions of ELR and SPSR
Edgar E. Iglesias [Tue, 27 May 2014 16:09:53 +0000 (17:09 +0100)]
target-arm: Register EL2 versions of ELR and SPSR

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-16-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Add a feature flag for EL3
Edgar E. Iglesias [Tue, 27 May 2014 16:09:53 +0000 (17:09 +0100)]
target-arm: Add a feature flag for EL3

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-15-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Add a feature flag for EL2
Edgar E. Iglesias [Tue, 27 May 2014 16:09:52 +0000 (17:09 +0100)]
target-arm: Add a feature flag for EL2

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-14-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Introduce aarch64_banked_spsr_index()
Edgar E. Iglesias [Tue, 27 May 2014 16:09:52 +0000 (17:09 +0100)]
target-arm: A64: Introduce aarch64_banked_spsr_index()

Add aarch64_banked_spsr_index(), used to map an Exception Level
to an index in the banked_spsr array.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-13-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Add SPSR entries for EL2/HYP and EL3/MON
Edgar E. Iglesias [Tue, 27 May 2014 16:09:52 +0000 (17:09 +0100)]
target-arm: Add SPSR entries for EL2/HYP and EL3/MON

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-12-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Add ELR entries for EL2 and 3
Edgar E. Iglesias [Tue, 27 May 2014 16:09:52 +0000 (17:09 +0100)]
target-arm: A64: Add ELR entries for EL2 and 3

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-11-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A64: Add SP entries for EL2 and 3
Edgar E. Iglesias [Tue, 27 May 2014 16:09:52 +0000 (17:09 +0100)]
target-arm: A64: Add SP entries for EL2 and 3

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-10-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: c12_vbar -> vbar_el[]
Edgar E. Iglesias [Tue, 27 May 2014 16:09:51 +0000 (17:09 +0100)]
target-arm: c12_vbar -> vbar_el[]

No functional change.
Preparation for adding EL2 and 3 versions of this reg.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-9-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Make esr_el1 an array
Edgar E. Iglesias [Tue, 27 May 2014 16:09:51 +0000 (17:09 +0100)]
target-arm: Make esr_el1 an array

No functional change.
Prepares for future addtion of EL2 and 3 versions of this reg.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-8-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Make elr_el1 an array
Edgar E. Iglesias [Tue, 27 May 2014 16:09:51 +0000 (17:09 +0100)]
target-arm: Make elr_el1 an array

No functional change.
Prepares for future additions of the EL2 and 3 versions of this reg.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-7-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Use a 1:1 mapping between EL and MMU index
Edgar E. Iglesias [Tue, 27 May 2014 16:09:51 +0000 (17:09 +0100)]
target-arm: Use a 1:1 mapping between EL and MMU index

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 1400980132-25949-6-git-send-email-edgar.iglesias@gmail.com
Message-id: 1400805738-11889-7-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: A32: Use get_mem_index for load/stores
Edgar E. Iglesias [Tue, 27 May 2014 16:09:50 +0000 (17:09 +0100)]
target-arm: A32: Use get_mem_index for load/stores

Avoid using IS_USER directly as the MMU-idx to simplify future
changes to the MMU layout.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1400980132-25949-5-git-send-email-edgar.iglesias@gmail.com
Message-id: 1400805738-11889-6-git-send-email-edgar.iglesias@gmail.com
[PMM: parts relating to LDRT/STRT moved into earlier patches]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm/translate.c: Use get_mem_index() for SRS memory accesses
Peter Maydell [Tue, 27 May 2014 16:09:50 +0000 (17:09 +0100)]
target-arm/translate.c: Use get_mem_index() for SRS memory accesses

The SRS instruction was using a hardcoded 0 for the memory
accesses. This happens to be OK since the SRS instruction is
UNPREDICTABLE in User and System modes, but is awkward if we
want to rearrange the MMU index uses. Switch to using
get_mem_index() like all the other accesses.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1400980132-25949-4-git-send-email-edgar.iglesias@gmail.com

10 years agotarget-arm/translate.c: Clean up mmu index handling for ldrt/strt
Peter Maydell [Tue, 27 May 2014 16:09:50 +0000 (17:09 +0100)]
target-arm/translate.c: Clean up mmu index handling for ldrt/strt

Clean up the mmu index handling for ldrt/strt insns: instead
of a flag 'user' indicating whether to treat the store as user
mode or not, use 'memidx' to indicate the correct memory index to use.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1400980132-25949-3-git-send-email-edgar.iglesias@gmail.com

10 years agotarget-arm: Move get_mem_index to translate.h
Edgar E. Iglesias [Tue, 27 May 2014 16:09:50 +0000 (17:09 +0100)]
target-arm: Move get_mem_index to translate.h

So that it can be shared with the AArch32 code.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-2-git-send-email-edgar.iglesias@gmail.com
Message-id: 1400805738-11889-5-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: implement CPACR register logic for ARMv7
Fabian Aggeler [Tue, 27 May 2014 16:09:49 +0000 (17:09 +0100)]
target-arm: implement CPACR register logic for ARMv7

In ARMv7 the CPACR register allows to control access rights to
coprocessor 0-13 interfaces. Bits corresponding to unimplemented
coprocessors should be RAZ/WI. Bits ASEDIS, D32DIS, TRCDIS are
UNK/SBZP if VFP is not implemented and RAO/WI in some cases.
Treating TRCDIS as RAZ/WI since we neither implement a trace
macrocell nor a CP14 interface to the trace macrocell registers.

Since CPACR bits for VFP/Neon access are honoured with the CPACR_FPEN
bit in the TB flags, flushing the TLB is not necessary anymore.

Signed-off-by: Fabian Aggeler <aggelerf@ethz.ch>
Message-id: 1400532968-30668-1-git-send-email-aggelerf@ethz.ch
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agohw/display/pxa2xx_lcd: Fix 16bpp+alpha and 18bpp+alpha palette formats
Peter Maydell [Tue, 27 May 2014 16:09:49 +0000 (17:09 +0100)]
hw/display/pxa2xx_lcd: Fix 16bpp+alpha and 18bpp+alpha palette formats

The pxa2xx palette entry "16bpp plus transparency" format is
xxxxxxxTRRRRR000GGGGGG00BBBBB000, and "18bpp plus transparency" is
xxxxxxxTRRRRRR00GGGGGG00BBBBBB00.

Correct errors in the code for reading these and converting
them to the internal format. In particular, the buggy code
was attempting to mask out bit 24 of a uint16_t, which
Coverity spotted as an error.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1400233901-31785-1-git-send-email-peter.maydell@linaro.org

10 years agoMAINTAINERS: update Calxeda Highbank maintainer and status
Rob Herring [Tue, 27 May 2014 16:09:49 +0000 (17:09 +0100)]
MAINTAINERS: update Calxeda Highbank maintainer and status

Signed-off-by: Rob Herring <rob.herring@linaro.org>
Message-id: 1400116198-3155-1-git-send-email-robherring2@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/rth/fix-tci' into staging
Peter Maydell [Tue, 27 May 2014 13:44:03 +0000 (14:44 +0100)]
Merge remote-tracking branch 'remotes/rth/fix-tci' into staging

* remotes/rth/fix-tci:
  tci: Fix tcg_out_call

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-arm: Fix segfault on startup when KVM enabled
Christoffer Dall [Tue, 27 May 2014 12:37:43 +0000 (14:37 +0200)]
target-arm: Fix segfault on startup when KVM enabled

Commit 50a2c6e55fa introduced a bug where QEMU would segfault on startup
when using KVM on ARM hosts, because kvm_arm_reset_cpu() accesses
cpu->cpreg_reset_values, which is not allocated before
kvm_arch_init_vcpu(). Fix this by not calling cpu_reset() until after
qemu_init_vcpu().

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1401194263-13010-1-git-send-email-christoffer.dall@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-xtensa: add tests for cross-page TB
Max Filippov [Tue, 20 May 2014 18:24:56 +0000 (22:24 +0400)]
target-xtensa: add tests for cross-page TB

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
10 years agotarget-xtensa: completely clean TLB between MMU tests
Max Filippov [Tue, 20 May 2014 20:50:12 +0000 (00:50 +0400)]
target-xtensa: completely clean TLB between MMU tests

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
10 years agotarget-xtensa: fix cross-page jumps/calls at the end of TB
Max Filippov [Tue, 20 May 2014 10:48:45 +0000 (14:48 +0400)]
target-xtensa: fix cross-page jumps/calls at the end of TB

Use tb->pc instead of dc->pc to check for cross-page jumps.
When TB translation stops at the page boundary dc->pc points to the next
page allowing chaining to TBs in it, which is wrong.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
10 years agodocs: add multiseat.txt
Gerd Hoffmann [Tue, 20 May 2014 07:17:01 +0000 (09:17 +0200)]
docs: add multiseat.txt

Howto on setting up multiseat for guests.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb: add input routing support for tablet and keyboard
Gerd Hoffmann [Mon, 19 May 2014 13:26:51 +0000 (15:26 +0200)]
usb: add input routing support for tablet and keyboard

Add display property to the keyboard.
Add display and head properties to the tablet.

If properties are set bind device to the display specified to
setup input routing.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agosdl: pass key event source to input layer
Gerd Hoffmann [Tue, 20 May 2014 06:11:25 +0000 (08:11 +0200)]
sdl: pass key event source to input layer

So the input layer knows where the input is coming from
and input routing works correctly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: bind devices and input routing
Gerd Hoffmann [Mon, 19 May 2014 13:18:37 +0000 (15:18 +0200)]
input: bind devices and input routing

Add function to bind input devices to display devices.  Implementing
input routing on top of this:  Events coming from the display device in
question are routed to the input device bound to it (if there is one).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: switch hid mouse and tablet to the new input layer api.
Gerd Hoffmann [Mon, 19 May 2014 13:02:21 +0000 (15:02 +0200)]
input: switch hid mouse and tablet to the new input layer api.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: switch hid keyboard to new input layer api.
Gerd Hoffmann [Tue, 11 Mar 2014 12:52:27 +0000 (13:52 +0100)]
input: switch hid keyboard to new input layer api.

Minimal patch to get the switchover done.  We continue processing ps/2
scancodes for now as they are part of the live migration stream.  Fixing
that, then mapping directly from QKeyValue to HID keycodes is left as
excercise for another day.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: keymap: add meta keys
Gerd Hoffmann [Wed, 21 May 2014 11:54:32 +0000 (13:54 +0200)]
input: keymap: add meta keys

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: add name to input_event_key_number
Gerd Hoffmann [Wed, 21 May 2014 11:49:59 +0000 (13:49 +0200)]
input: add name to input_event_key_number

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput: add qemu_input_key_number_to_qcode
Gerd Hoffmann [Wed, 21 May 2014 11:28:32 +0000 (13:28 +0200)]
input: add qemu_input_key_number_to_qcode

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoinput (curses): mask keycodes to remove modifier bits
Andrew Oates [Sat, 24 May 2014 00:16:09 +0000 (20:16 -0400)]
input (curses): mask keycodes to remove modifier bits

Without the mask, control bits are passed on in the keycode, generating
incorrect PS/2 sequences when SHIFT, ALT, etc are held down.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andrew Oates <andrew@aoates.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agolibcacard: remove useless initializers
Michael Tokarev [Thu, 8 May 2014 17:17:38 +0000 (21:17 +0400)]
libcacard: remove useless initializers

libcacard has many functions which initializes local variables
at declaration time, which are always assigned some values later
(often right after declaration).  Clean up these initializers.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agonet: cadence_gem: Fix top comment
Peter Crosthwaite [Wed, 7 May 2014 09:17:31 +0000 (02:17 -0700)]
net: cadence_gem: Fix top comment

To indicate Cadence GEM not Xilinx.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agobsd-user: replace fprintf(stderr, ...) with error_report()
Le Tan [Fri, 9 May 2014 23:55:22 +0000 (07:55 +0800)]
bsd-user: replace fprintf(stderr, ...) with error_report()

Replace fprintf(stderr,...) with error_report() in files bsd-user/*.
The trailing "\n"s of the @fmt argument have been removed
because @fmt of error_report() should not contain newline.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoaudio: replace fprintf(stderr, ...) with error_report() in audio
Le Tan [Fri, 9 May 2014 23:55:20 +0000 (07:55 +0800)]
audio: replace fprintf(stderr, ...) with error_report() in audio

Replace fprintf(stderr,...) with error_report() in files audio/*.
The trailing "\n"s of the @fmt argument have been removed
because @fmt of error_report() should not contain newline.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agousb-host-libusb: Set stream id when submitting bulk-stream transfers
Hans de Goede [Thu, 21 Nov 2013 16:21:02 +0000 (17:21 +0100)]
usb-host-libusb: Set stream id when submitting bulk-stream transfers

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-host-libusb: Add alloc / free streams ops
Hans de Goede [Thu, 21 Nov 2013 16:21:01 +0000 (17:21 +0100)]
usb-host-libusb: Add alloc / free streams ops

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-host-libusb: Fill in endpoint max_streams when available
Hans de Goede [Thu, 21 Nov 2013 16:21:00 +0000 (17:21 +0100)]
usb-host-libusb: Fill in endpoint max_streams when available

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-redir: Add support for bulk streams
Hans de Goede [Tue, 19 Nov 2013 13:37:03 +0000 (14:37 +0100)]
usb-redir: Add support for bulk streams

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-mtp: handle usb_mtp_get_object failure
Gerd Hoffmann [Tue, 20 May 2014 11:06:55 +0000 (13:06 +0200)]
usb-mtp: handle usb_mtp_get_object failure

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-mtp: handle lseek failure
Gerd Hoffmann [Tue, 20 May 2014 11:02:26 +0000 (13:02 +0200)]
usb-mtp: handle lseek failure

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agousb-mtp: use bool to track MTPObject init status
Gerd Hoffmann [Tue, 20 May 2014 10:54:08 +0000 (12:54 +0200)]
usb-mtp: use bool to track MTPObject init status

Stop setting nchildren to -1.  Use separate bool variable to track
whenever we've already fetched the child objects instead.

Also make nchildren unsigned.

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoxhci: add xhci_get_flag
Gerd Hoffmann [Thu, 15 May 2014 10:31:46 +0000 (12:31 +0200)]
xhci: add xhci_get_flag

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoxhci: add endpoint cap on express bus only
Gerd Hoffmann [Tue, 13 May 2014 07:51:11 +0000 (09:51 +0200)]
xhci: add endpoint cap on express bus only

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoxhci: child detach fix
Gerd Hoffmann [Mon, 12 May 2014 12:43:51 +0000 (14:43 +0200)]
xhci: child detach fix

xhci_child_detach() zaps the wrong slot when unplugging a device
connected via usb-hub:  Instead of the device's slot the slot of the
usb-hub is used.  Fix it.

https://bugzilla.redhat.com/show_bug.cgi?id=1075846

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
10 years agogtk: workaround gtk2 vte resize issue
Gerd Hoffmann [Fri, 16 May 2014 13:34:31 +0000 (15:34 +0200)]
gtk: workaround gtk2 vte resize issue

Hack isn't pretty, but gets the job done.
See source code comment for details.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: window sizing overhaul
Gerd Hoffmann [Fri, 16 May 2014 10:26:12 +0000 (12:26 +0200)]
gtk: window sizing overhaul

Major overhaul for window size handling.  This basically switches qemu
over to use geometry hints for the window manager instead of trying to
get the job done with widget resize requests.  This allows to specify
better what we need and also avoids window resizes.

FIXME: on gtk2 someone overwrites the geometry hints :(

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: zap unused global_state
Gerd Hoffmann [Tue, 6 May 2014 11:39:11 +0000 (13:39 +0200)]
gtk: zap unused global_state

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: Add handling for the xfree86 keycodes
Bruce Rogers [Thu, 1 May 2014 02:29:42 +0000 (20:29 -0600)]
gtk: Add handling for the xfree86 keycodes

Currently only evdev keycodes are handled by the gtk-ui. SDL has
code to handle both. This patch adds similar processing so that
both keycode types will be handled via the gtk-ui.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: enable untabify for gfx
Gerd Hoffmann [Tue, 6 May 2014 08:20:53 +0000 (10:20 +0200)]
gtk: enable untabify for gfx

Now we have all grab fixes in place, so we can allow detaching
graphic display tabs too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: detached window pointer grabs
Gerd Hoffmann [Tue, 6 May 2014 10:51:00 +0000 (12:51 +0200)]
gtk: detached window pointer grabs

Make ungrab hotkey work with detached windows.
Enable pointer grabs for detached windows.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: update all windows on mouse mode changes
Gerd Hoffmann [Tue, 6 May 2014 09:48:28 +0000 (11:48 +0200)]
gtk: update all windows on mouse mode changes

We might have multiple graphic displays now which all need a cursor update.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: fix grab checks
Gerd Hoffmann [Tue, 6 May 2014 09:45:30 +0000 (11:45 +0200)]
gtk: fix grab checks

Make it handle multiple windows case correctly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: update gd_update_caption
Gerd Hoffmann [Tue, 6 May 2014 09:20:17 +0000 (11:20 +0200)]
gtk: update gd_update_caption

Adapt to recent changes, handle multiple windows.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: skip keyboard grab when hover autograb is active
Gerd Hoffmann [Tue, 6 May 2014 09:04:57 +0000 (11:04 +0200)]
gtk: skip keyboard grab when hover autograb is active

It's pointless.  With grab on hover enabled the keyboard grab
is already active when you press Ctrl-Alt-G ;)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: keep track of grab owner
Gerd Hoffmann [Tue, 6 May 2014 09:01:31 +0000 (11:01 +0200)]
gtk: keep track of grab owner

Simplifies grab state tracking and makes ungrab more reliable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: add gd_grab trace event
Gerd Hoffmann [Tue, 6 May 2014 08:43:52 +0000 (10:43 +0200)]
gtk: add gd_grab trace event

Input grab code is tricky, add some debug & trouble shooting aid.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: add tab to trace events
Gerd Hoffmann [Tue, 6 May 2014 08:27:54 +0000 (10:27 +0200)]
gtk: add tab to trace events

So you can see which of multiple displays (if present) was resized ;)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: allow moving tabs to windows and back.
Gerd Hoffmann [Mon, 5 May 2014 14:23:33 +0000 (16:23 +0200)]
gtk: allow moving tabs to windows and back.

"View->Detach tab" will move to tab to a new window.
Simply closing the window will move it back into a notebook tab.
The label will be permamently stored in VirtualConsole->label,
so it can easily be reused to (re-)label tabs and windows.

Works for vte tabs only for now. pointer/kbd grab code needs
adaptions before we can enable it for gfx tabs too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: simplify resize
Gerd Hoffmann [Mon, 5 May 2014 12:55:18 +0000 (14:55 +0200)]
gtk: simplify resize

Simply ask for a small window size.  When the widgets don't fit in gtk
will automatically make the window large enougth to make things fit, no
need to try (and fail) duplicate that logic in qemu.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: use device type as label
Gerd Hoffmann [Mon, 5 May 2014 12:36:56 +0000 (14:36 +0200)]
gtk: use device type as label

IMO useful than showing VGA for any graphic device
even in case it is something completely different.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: support multiple gfx displays
Gerd Hoffmann [Wed, 30 Apr 2014 14:39:18 +0000 (16:39 +0200)]
gtk: support multiple gfx displays

Each display gets its own tab.  Tab switching continues to work like it
did, just the hotkeys of the vte consoles changes in case a secondary
display is present as it will get ctrl-alt-2 assigned and the vtes are
shifted by one.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: move vga state into VirtualGfxConsole
Gerd Hoffmann [Wed, 30 Apr 2014 14:30:07 +0000 (16:30 +0200)]
gtk: move vga state into VirtualGfxConsole

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: VirtualConsole restruction
Gerd Hoffmann [Wed, 30 Apr 2014 11:53:16 +0000 (13:53 +0200)]
gtk: VirtualConsole restruction

Move all vte-related items into VirtualVteConsole substruct.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: remove page numbering assumtions from the code
Gerd Hoffmann [Wed, 30 Apr 2014 10:56:53 +0000 (12:56 +0200)]
gtk: remove page numbering assumtions from the code

Lookup page numbers using gtk_notebook_page_num() instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: Add a scrollbar for text consoles
Cole Robinson [Tue, 29 Apr 2014 19:24:32 +0000 (15:24 -0400)]
gtk: Add a scrollbar for text consoles

Only show the scrollbar if the content doesn't fit on the visible space.

[ kraxel: fix box packing ]

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: cleanup CONFIG_VTE ifdef a bit.
Gerd Hoffmann [Tue, 29 Apr 2014 13:39:37 +0000 (15:39 +0200)]
gtk: cleanup CONFIG_VTE ifdef a bit.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: zap vte size requests
Gerd Hoffmann [Tue, 29 Apr 2014 13:21:46 +0000 (15:21 +0200)]
gtk: zap vte size requests

The vte tabs simply get the size of the vga tab then, with whatever
cols and lines are fitting in.  I find this bahavior more useful than
resizing the qemu window all day long.

YMMV.  Comments are welcome.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoconsole: add kbd_put_keysym_console
Gerd Hoffmann [Thu, 22 May 2014 10:05:52 +0000 (12:05 +0200)]
console: add kbd_put_keysym_console

So you can send keysyms to a specific (text terminal) console.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agogtk: zap scrolled_window
Gerd Hoffmann [Tue, 29 Apr 2014 13:08:56 +0000 (15:08 +0200)]
gtk: zap scrolled_window

The vte widget implements the scrollable interface, placing it into
a scrolled window is pointless and creates a bunch of strange effects.
Zap it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoconsole: rework text terminal cursor logic
Gerd Hoffmann [Thu, 22 May 2014 09:27:13 +0000 (11:27 +0200)]
console: rework text terminal cursor logic

Have a global timer.  Update all visible terminal windows syncronously.
Right now this can be the active_console only, but that will change
soon.  The global timer will disable itself if not needed, so we only
have to care start it if needed.  Which might be at console switch time
or when a new displaychangelistener is registered.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoconsole: update text terminal surface unconditionally
Gerd Hoffmann [Thu, 22 May 2014 09:01:42 +0000 (11:01 +0200)]
console: update text terminal surface unconditionally

These days each QemuConsole has its own private DisplaySurface,
so we can simply render updates all the time.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoconsole: nicer initial screen
Gerd Hoffmann [Thu, 25 Apr 2013 10:10:45 +0000 (12:10 +0200)]
console: nicer initial screen

Now that we have a function to create a fancy DisplaySurface with a
message for the user, to handle non-existing graphics hardware, we
can make it more generic and use it for other things too.

This patch adds a text line to the in initial DisplaySurface, notifying
the user that the display isn't initialized yet by the guest.

You can see this in action when starting qemu with '-S'.  Also when
booting ovmf in qemu (which needs a few moments to initialize itself
before it initializes the vga).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoconsole: Abort on property access errors
Kirill Batuzov [Thu, 24 Apr 2014 14:15:58 +0000 (18:15 +0400)]
console: Abort on property access errors

All defined properties of QemuConsole are mandatory and no access to them
should fail. Nevertheless not checking returned errors is bad because in case
of unexpected failure it will hide the bug and cause a memory leak.

Abort in case of unexpected property access errors. This change exposed a bug
where an attempt was made to write to a read-only property "head".

Set "head" property's value at creation time and do not attempt to change it
later. This fixes the bug mentioned above.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agolibcacard: fix wrong array expansion logic
Michael Tokarev [Fri, 23 May 2014 20:47:39 +0000 (00:47 +0400)]
libcacard: fix wrong array expansion logic

The currrent code in libcacard/vcard_emul_nss.c:vcard_emul_options()
has a weird bug in variable usage around expanding opts->vreader
array.

There's a helper variable, vreaderOpt, which is first needlessly
initialized to NULL, next, conditionally, only we have to expand
opts->vreader, receives array expansion from g_renew(), and next,
even if we don't actually perform expansion, the value of this
variable is assigned to the actual array, opts->vreader, which
was supposed to be expanded.

So, since we expand the array by READER_STEP increments, only
once in READER_STEP (=4) the code will work, in other 3/4 times
it will fail badly.

Fix this by not using this temp variable when expanding the
array, and by dropping the useless =NULL initializer too -
if it wasn't in place initially, compiler would have warned
us about this problem at the beginning.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
10 years agolm32: remove lm32_sys
Michael Walle [Tue, 22 Apr 2014 18:18:44 +0000 (20:18 +0200)]
lm32: remove lm32_sys

Since we have now semihosting on the lm32 target, this device is no longer
needed. Remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
10 years agotest: lm32: use semihosting for testing
Michael Walle [Tue, 22 Apr 2014 18:18:43 +0000 (20:18 +0200)]
test: lm32: use semihosting for testing

Instead of the lm32-sys device, use semihosting to print to the host
console and exit the test.

Signed-off-by: Michael Walle <michael@walle.cc>
10 years agotarget-lm32: add semihosting support
Michael Walle [Tue, 22 Apr 2014 18:18:42 +0000 (20:18 +0200)]
target-lm32: add semihosting support

Intercept certain system calls if semihosting is enabled. This should
behave like the GDB simulator.

Signed-off-by: Michael Walle <michael@walle.cc>
10 years agotest: lm32: make test cases independent
Michael Walle [Tue, 22 Apr 2014 18:18:41 +0000 (20:18 +0200)]
test: lm32: make test cases independent

Make test cases independent from from each other. Eg. if a test case needs
a specific value in register A, don't rely on the fact that it is already
set by the preceding test case.

Signed-off-by: Michael Walle <michael@walle.cc>
10 years agotcg-mips: Enable direct chaining of TBs
Richard Henderson [Thu, 24 Apr 2014 19:39:20 +0000 (19:39 +0000)]
tcg-mips: Enable direct chaining of TBs

Now that the code_gen_buffer is constrained to not cross 256mb
regions, we are assured that we can use J to reach another TB.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
10 years agotcg-mips: Simplify movcond
Richard Henderson [Wed, 16 Apr 2014 05:53:12 +0000 (22:53 -0700)]
tcg-mips: Simplify movcond

Use the same table to fold comparisons as with setcond.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>