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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Richard Henderson [Wed, 16 Apr 2014 05:47:22 +0000 (22:47 -0700)]
tcg-mips: Simplify brcond2
Emitting a single branch instead of (up to) 3, using setcond2
to generate the composite compare.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 05:41:46 +0000 (22:41 -0700)]
tcg-mips: Improve setcond eq/ne vs zeros
The original code results in one too many insns per zero
present in the input. And since comparing 64-bit numbers
vs zero is common...
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 05:34:30 +0000 (22:34 -0700)]
tcg-mips: Simplify setcond2
Using tcg_unsigned_cond and tcg_high_cond.
Also, move the function up in the file for future cleanups.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 05:20:57 +0000 (22:20 -0700)]
tcg-mips: Simplify brcond
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>
Richard Henderson [Wed, 16 Apr 2014 05:10:09 +0000 (22:10 -0700)]
tcg-mips: Simplify setcond
Use a table to fold comparisons to less-than.
Also, move the function up in the file for futher simplifications.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 03:30:46 +0000 (20:30 -0700)]
tcg-mips: Commonize opcode implementations
Most opcodes fall in to one of a couple of patterns.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Thu, 24 Apr 2014 02:56:44 +0000 (02:56 +0000)]
tcg-mips: Improve add2/sub2
Reduce insn count from 5 to either 3 or 4.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 02:05:52 +0000 (19:05 -0700)]
tcg-mips: Hoist args loads
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Apr 2014 01:54:07 +0000 (18:54 -0700)]
tcg-mips: Fix subtract immediate range
Since we must use ADDUI, we would generate incorrect code for -32768.
Leaving off subtract of +32768 makes things easier for a follow-on patch.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 15 Apr 2014 16:30:47 +0000 (09:30 -0700)]
tcg-mips: Name the opcode enumeration
And use it in the opcode emission functions.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 15 Apr 2014 16:27:40 +0000 (09:27 -0700)]
tcg-mips: Use EXT for AND on mips32r2
At the same time, tidy deposit by introducing tcg_out_opc_bf.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 15 Apr 2014 16:10:16 +0000 (09:10 -0700)]
tcg-mips: Use T9 for TCG_TMP1
T0 is an argument register for the n32 and n64 abis. T9 is the call
address register for the abis, and is more directly under the control
of the backend.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 15 Apr 2014 16:07:52 +0000 (09:07 -0700)]
tcg-mips: Introduce TCG_TMP0, TCG_TMP1
Use these instead of hard-coding the registers to use for temporaries.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 15 Apr 2014 16:03:59 +0000 (09:03 -0700)]
tcg-mips: Rearrange register allocation
Use FP (also known as S8) as a normal call-saved register.
Include T0 in the allocation order and call-clobbered list
even though it's currently used as a TCG temporary.
Put the argument registers at the end of the allocation order.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 14 Apr 2014 18:10:11 +0000 (18:10 +0000)]
tcg-mips: Convert to new_ldst
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 14 Apr 2014 16:59:41 +0000 (16:59 +0000)]
tcg-mips: Convert to new qemu_l/st helpers
In addition, fill delay slots calling the helpers and tail
call to the store helpers.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 2 May 2014 22:01:31 +0000 (15:01 -0700)]
tcg-mips: Move softmmu slow path out of line
At the same time, tidy up the call helpers, avoiding a memory reference.
Split out several subroutines. Use TCGMemOp constants. Make endianness
selectable at runtime.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sun, 23 Mar 2014 17:45:23 +0000 (17:45 +0000)]
tcg-mips: Split large ldst offsets
Use this to reduce goto_tb by one insn.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sun, 23 Mar 2014 17:15:21 +0000 (17:15 +0000)]
tcg-mips: Fill the exit_tb delay slot
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sun, 23 Mar 2014 16:57:18 +0000 (16:57 +0000)]
tcg-mips: Use J and JAL opcodes
For userland builds calls will normally be in range,
and for the exit_tb opcode the branch to the epilogue.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Thu, 24 Apr 2014 16:16:07 +0000 (09:16 -0700)]
tcg-mips: Constrain the code_gen_buffer to be within one 256mb segment
This assures us use of J for exit_tb and goto_tb, and JAL for calling
into the generated bswap helpers.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Thu, 24 Apr 2014 15:25:03 +0000 (08:25 -0700)]
tcg-mips: Layout executable and code_gen_buffer
Choosing good addresses for them means we can use JAL for helper calls.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Markus Armbruster [Fri, 23 May 2014 11:24:39 +0000 (13:24 +0200)]
libcacard/vcard_emul_nss: Drop a redundant conditional
Bailing out when PK11_FindGenericObjects() returns null ensures the
loop that follows it executes at least once. The "loop did not
execute" test right after it is useless. Drop it.
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Markus Armbruster [Fri, 23 May 2014 11:24:37 +0000 (13:24 +0200)]
libcacard: Convert two leftover realloc() to GLib
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Markus Armbruster [Fri, 23 May 2014 11:24:36 +0000 (13:24 +0200)]
libcacard/vreader: Tighten assertion to clarify intent
Bonus: hushes up Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Markus Armbruster [Fri, 23 May 2014 11:24:35 +0000 (13:24 +0200)]
libcacard/vreader: Drop broken recovery from failed assertion
We suppress some code when we got unexpected status and assertion
checking is off:
assert(card_status == VCARD_DONE);
if (card_status == VCARD_DONE) {
int size = MIN(*receive_buf_len, response->b_total_len);
memcpy(receive_buf, response->b_data, size);
*receive_buf_len = size;
}
Such "recovery" is of dubious value even when it works. This one
doesn't: it fails to assign to receive_buf[] and *receive_buf_len,
which the callers expect.
Make the code unconditional.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Markus Armbruster [Fri, 23 May 2014 11:24:34 +0000 (13:24 +0200)]
libcacard: Plug memory leaks around vreader_get_reader_list()
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Markus Armbruster [Fri, 23 May 2014 11:24:33 +0000 (13:24 +0200)]
libcacard/vscclient: Bury some dead code
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Dr. David Alan Gilbert [Tue, 6 May 2014 11:15:55 +0000 (12:15 +0100)]
vl: fix 'name' option to work with -readconfig
The 'name' option silently failed when used in config files
( http://lists.gnu.org/archive/html/qemu-devel/2014-04/msg00378.html )
-readconfig stores the configuration read in QemuOpts. Command line
option parsing should do the same, and no more. In particular it should
not act upon the option. That needs to be done separately, where both
command line and -readconfig settings are visible in QemuOpts.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reported-by: William Dauchy <william@gandi.net>
Tested-by: William Dauchy <william@gandi.net>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(mjt: added commit message by ambru@ and subject prefix)
Peter Maydell [Fri, 23 May 2014 16:07:24 +0000 (17:07 +0100)]
configure: Put tempfiles in a subdir of the build directory
When libtool support was added to configure, the new temporary files
were left out of the list of files cleaned up on exit; this results
in a lot of stale .lo files being left around in /tmp. Worse, libtool
creates a /tmp/.libs directory which we can't easily clean up.
Put all our temporary files in a single temporary directory created
as a subdirectory of the build directory, so we can easily clean it up,
and don't need fragile or complicated code for creation to avoid it
clashing with temporary directories from other instances of QEMU
configure or being subject to attack from adversaries who can write
to /tmp.
Since the temporaries now live in the build tree, we have no
need to jump through hoops with a trap handler to try to remove
them when configure exits; this fixes some weird bugs where hitting
^C during a configure run wouldn't actually make it stop, because
we would run the trap handler but then not stop. (It is possible
to get the trap handler semantics right but it is convoluted largely
because of bugs in dash, so it is simpler to just avoid it.)
Note that "temporary files go in the build directory, not /tmp" is
the way autoconf behaves.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Jules Wang [Fri, 23 May 2014 03:44:05 +0000 (11:44 +0800)]
dma-helpers: avoid calling dma_bdrv_unmap() twice
Calling dma_bdrv_unmap() twice is not necessary and may cause
potential problems if some code changes.
Signed-off-by: Jules Wang <junqing.wang@cs2c.com.cn>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Le Tan [Wed, 21 May 2014 00:10:38 +0000 (08:10 +0800)]
arch_init: replace fprintf(stderr, ...) with error_report()
Replace fprintf(stderr,...) with error_report() in the file
arch_init.c. 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>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Saravanakumar [Thu, 22 May 2014 11:33:50 +0000 (17:03 +0530)]
pci: move dereferencing of root only after verifying valid root pointer
Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Saravanakumar [Wed, 21 May 2014 10:41:40 +0000 (16:11 +0530)]
jazz_led: Add missing break in switch case
Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com>
Reviewed-by: Paolo Bonizni <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Peter Maydell [Fri, 2 May 2014 17:32:38 +0000 (18:32 +0100)]
bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc
We have an unfortunate naming clash between the functions
ldl_p, stl_p, etc defined in bswap.h (which have semantics
"load/store in host endianness") and the #defines of the same
name in cpu-all.h (which have the semantics "load/store in
target endianness").
Fortunately it turns out that the only users of the bswap.h
functions are all within bswap.h itself, so we can simply
rename them to include a _he_ infix for "host endianness".
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Sat, 17 May 2014 14:29:18 +0000 (16:29 +0200)]
configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable
The configure option --with-gtkabi=3.0 is still supported, but no longer
needed when GTK+-2.0 is missing. When no GTK+ ABI is selected by the
user, configure first tries 2.0, then 3.0.
For some platforms (e.g. Windows) newer binaries of GTK+ are only
available for GTK+ 3.0. Now building on these platforms is a little bit
easier.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Hani Benhabiles [Mon, 12 May 2014 23:35:16 +0000 (00:35 +0100)]
nbd: Miscellaneous typo fixes.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Hani Benhabiles [Mon, 12 May 2014 23:35:15 +0000 (00:35 +0100)]
nbd: Close socket on negotiation failure.
Otherwise, the nbd client may hang waiting for the server response.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Peter Maydell [Fri, 16 May 2014 13:00:03 +0000 (14:00 +0100)]
iohandler.c: Properly initialize sigaction struct
The code in qemu_init_child_watch() wasn't clearing the 'struct
sigaction' before passing it to sigaction(); this meant that we
would block a random set of signals while executing the SIGCHLD
handler. Initialize properly by using memset() on the struct,
as we do in similar cases elsewhere.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Michael Tokarev [Thu, 8 May 2014 15:51:01 +0000 (19:51 +0400)]
libcacard: g_malloc cleanups
This patch replaces g_malloc() in libcacard into g_new()
or g_new0() where appropriate (removing some init-to-zero
surrounding code), g_malloc+memcpy into g_memdup() and the
like.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alon Levy <alevy@redhat.com>
Richard Henderson [Thu, 22 May 2014 20:25:34 +0000 (13:25 -0700)]
tci: Fix tcg_out_call
Broken since
dddbb2e1e3f8137d7e3f1faf9758c66cca0c94ea.
Do all the rest of the things that tcg_out_op did before
and after the big switch statement.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Peter Maydell [Thu, 22 May 2014 18:04:48 +0000 (19:04 +0100)]
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
qapi: zero-initialize all QMP command parameters
scripts/qapi.py: Avoid syntax not supported by Python 2.4
doc: add "setup" to list of migration states
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This page took 0.076949 seconds and 4 git commands to generate.