]> git.proxmox.com Git - qemu.git/log
qemu.git
11 years agobuild: always link device_tree.o into emulators if libfdt available
Paolo Bonzini [Tue, 5 Feb 2013 11:36:30 +0000 (12:36 +0100)]
build: always link device_tree.o into emulators if libfdt available

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: include hw header files with full paths
Paolo Bonzini [Mon, 4 Feb 2013 14:40:22 +0000 (15:40 +0100)]
hw: include hw header files with full paths

Done with this script:

cd hw
for i in `find . -name '*.h' | sed 's/^..//'`; do
  echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
done | sed -i -f - `find . -type f`

This is so that paths remain valid as files are moved.

Instead, files in hw/dataplane are referenced with the relative path.
We know they are not going to move to include/, and they are the only
include files that are in subdirectories _and_ move.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoppc: do not use ../ in include files
Paolo Bonzini [Sun, 3 Feb 2013 19:18:28 +0000 (20:18 +0100)]
ppc: do not use ../ in include files

This simplifies the scripted execution of the next patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovt82c686: vt82c686 is not a PCI host bridge
Paolo Bonzini [Mon, 4 Feb 2013 14:00:38 +0000 (15:00 +0100)]
vt82c686: vt82c686 is not a PCI host bridge

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovirtio-9p: remove PCI dependencies from hw/9pfs/
Paolo Bonzini [Mon, 4 Feb 2013 14:37:49 +0000 (15:37 +0100)]
virtio-9p: remove PCI dependencies from hw/9pfs/

Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency
with the corresponding .c file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovirtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX
Paolo Bonzini [Mon, 4 Feb 2013 14:32:02 +0000 (15:32 +0100)]
virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move device-hotplug.o to toplevel, compile it once
Paolo Bonzini [Mon, 4 Feb 2013 16:20:47 +0000 (17:20 +0100)]
hw: move device-hotplug.o to toplevel, compile it once

The situation with device-hotplug.c is similar to qdev-monitor.c.
Add a stub for pci_drive_hot_add, so that it can be compiled once,
and move it out of hw/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move qdev-monitor.o to toplevel directory
Paolo Bonzini [Mon, 4 Feb 2013 10:37:52 +0000 (11:37 +0100)]
hw: move qdev-monitor.o to toplevel directory

qdev-monitor.c is the only "core qdev" file that is not used in
user-mode emulation, and it does not define anything that is used
by hardware models.  Remove it from the hw/ directory and
remove hw/qdev-monitor.h from hw/qdev.h too; this requires
some files to have some new explicitly includes.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move fifo.[ch] to libqemuutil
Paolo Bonzini [Mon, 4 Feb 2013 09:57:50 +0000 (10:57 +0100)]
hw: move fifo.[ch] to libqemuutil

fifo.c is generic code that can be easily unit tested.  So it
belongs in libqemuutil.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move char backends to backends/
Paolo Bonzini [Sun, 3 Feb 2013 19:21:00 +0000 (20:21 +0100)]
hw: move char backends to backends/

Braille and msmouse support is in hw/, but it is not hardware.
Move it to the backends/ directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agocadence_gem: Add debug msgs for rx desc movement
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:16 +0000 (18:23 +0000)]
cadence_gem: Add debug msgs for rx desc movement

Add some helpful messages that show the rx descriptor pointer moving as packets
are rxed.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1ef2eb34dade64d589a69a2bcfd5aaddb7d50164.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agocadence_gem: Don't reset rx desc pointer on rx_en
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:16 +0000 (18:23 +0000)]
cadence_gem: Don't reset rx desc pointer on rx_en

This doesn't happen in the real hardware. The Zynq TRM explicitly states that
this bit has no effect on the rx descriptor pointer ("The receive queue
pointer register is unaffected").

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 06fdf92b78ee62d8965779bafd29c8df1a5d2718.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agocadence_gem: fix interrupt events
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:15 +0000 (18:23 +0000)]
cadence_gem: fix interrupt events

Bits in the ISR were continually mirroring their corresponding TX/RX SR bits.
This is incorrect. The ISR bits are only ever set at the time their
corresponding event occurs.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: cedfb6d108318846480b416a6041023ea5a353d6.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agocadence_gem: factor out can_rx() logic replication
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:15 +0000 (18:23 +0000)]
cadence_gem: factor out can_rx() logic replication

The gem_receive() function replicates the logic for whether or not the device
can rx. Just call the actual gem_can_receive() function in place.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: bf7f93969f3e01fbc76d68d2955307fdbad11bb1.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agocadence_gem: Flush queued packets
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:15 +0000 (18:23 +0000)]
cadence_gem: Flush queued packets

The device needs to check for queued RX packets when the RX path is re-enabled.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1fa8c88a3b7c654886d0a7484c2463cd4c2a2781.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agom25p80.c: Use QOM classes for part differentiation
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:15 +0000 (18:23 +0000)]
m25p80.c: Use QOM classes for part differentiation

Currently, M25P80 uses an object property to differentiate between flash parts.
Changed this over to use QOM sub-classes - the actual names of the different parts
are used to create a set of dynamic classes which passes the part info as class
data. The object no longer needs to search the known_devices table for itself,
instead it just gets its info from its own class.

Kept the intermediate class definition private to m25p80.c for the moment, as
the expectation is parts will only be added as new entries in the table. We can
factor out the TYPE_M25P80 abstraction into a header on a demand basis.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: e24e156d-ff96-4901-997a-e31178b08bee@VA3EHSMHS021.ehs.local
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoxilinx_zynq: Added SD controllers
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:14 +0000 (18:23 +0000)]
xilinx_zynq: Added SD controllers

The Xilinx Zynq device has two SDHCI controllers. Added to the machine model.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agovl.c: allow for repeated -sd arguments
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:14 +0000 (18:23 +0000)]
vl.c: allow for repeated -sd arguments

Allows for repeating of -sd arguments in the same way as -pflash and -mtdblock.

Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/sdhci: introduce standard SD host controller
Igor Mitsyanko [Thu, 28 Feb 2013 18:23:14 +0000 (18:23 +0000)]
hw/sdhci: introduce standard SD host controller

Device model for standard SD Host Controller Interface (SDHCI) compliant with
version 2.00 of SD association specification.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarm: a9mpcore: Coreify the SCU
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:14 +0000 (18:23 +0000)]
arm: a9mpcore: Coreify the SCU

Split the SCU in a9mpcore out into its own object definition. mpcore is now
just a container for the mpcore components.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarm: a9mpcore: remove old_timer_status field
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:13 +0000 (18:23 +0000)]
arm: a9mpcore: remove old_timer_status field

This field was write only and thus unused. Removed.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarm: mptimer: Remove WDT distinction
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:13 +0000 (18:23 +0000)]
arm: mptimer: Remove WDT distinction

In QEMU emulation, there is no functional difference between the ARM mpcore
private timers and watchdogs. Removed all the distinction between the two from
arm_mptimer.c and converted it to be just the mptimer. a9mpcore and arm11mpcore
just instantiate the same mptimer object twice to get both timer and WDT.

If in the future we want to make the WDT functionally different then we can use
either QOM hierarchy to derive WDT from from mptimer, or we can add a property
"is-wdt" or some such.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarm: arm11mpcore, a9mpcore: CamelCased type names
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:13 +0000 (18:23 +0000)]
arm: arm11mpcore, a9mpcore: CamelCased type names

To conform with QEMU coding style.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoarm: mptimer: CamelCased type names
Peter Crosthwaite [Thu, 28 Feb 2013 18:23:13 +0000 (18:23 +0000)]
arm: mptimer: CamelCased type names

Trivial find replace on type names "timerblock" and "arm_mptimer_state" to
conform with QEMU coding style.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/pflash_cfi01: Treat read in unknown command state as read
Peter Maydell [Thu, 28 Feb 2013 18:23:12 +0000 (18:23 +0000)]
hw/pflash_cfi01: Treat read in unknown command state as read

The code for handling the default "unknown command state" case in
pflash_read in pflash_cfi01.c comments "reset state & treat it as
a read". However the code doesn't actually do this. Moving the
default case to the top of the switch so it can fall through into
the read case brings this file into line with pflash_cfi02 and
makes the code behave as the comments suggest.

The pflash_cfi01 code has always had this bug -- it was presumably
introduced when the original author copied the cfi02 code and
rearranged the order of the switch statement without noticing
that the default case relied on the fall-through.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1358777318-7579-3-git-send-email-peter.maydell@linaro.org

11 years agohw/pflash_cfi01: Make read after byte-write or erase return status
Peter Maydell [Thu, 28 Feb 2013 18:23:12 +0000 (18:23 +0000)]
hw/pflash_cfi01: Make read after byte-write or erase return status

The Intel flash command set requires that a read operation after
doing a 'single byte write' command returns the status register;
add this case to pflash_read() so we return the correct information.
Similarly, the case for the 0x28 flavour of block erase was missing.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1358777318-7579-2-git-send-email-peter.maydell@linaro.org

11 years agohw/ds1338: Fix conversion between 12 hours and 24 hours modes.
Antoine Mathys [Thu, 28 Feb 2013 18:23:12 +0000 (18:23 +0000)]
hw/ds1338: Fix conversion between 12 hours and 24 hours modes.

The proper mapping between 24 hours and 12 hours modes is:
0       12 AM
1-11    1-11 AM
12      12 PM
13-23   1-11 PM
Fix code accordingly.

Signed-off-by: Antoine Mathys <barsamin@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agotarget-i386: Use mulu2 and muls2
Richard Henderson [Tue, 26 Feb 2013 20:06:23 +0000 (12:06 -0800)]
target-i386: Use mulu2 and muls2

These correspond very closely to the insns that we're emulating.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge remote-tracking branch 'kiszka/queues/slirp' into staging
Anthony Liguori [Tue, 26 Feb 2013 19:36:09 +0000 (13:36 -0600)]
Merge remote-tracking branch 'kiszka/queues/slirp' into staging

# By Jan Kiszka
# Via Jan Kiszka
* kiszka/queues/slirp:
  slirp: Properly initialize pollfds_idx of new sockets

11 years agoglib: Add compat wrapper for g_poll on old glib
Alexander Graf [Mon, 25 Feb 2013 23:46:10 +0000 (00:46 +0100)]
glib: Add compat wrapper for g_poll on old glib

Older glib doesn't implement g_poll(). Most notably the glib version in use
on SLE11 is on 2.18 which is hit by this.

We do want to use g_poll() in the source however. So on older systems, just
wrap it with functions that do exist on older versions.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Message-id: 1361835970-2889-1-git-send-email-agraf@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqemu-log: default to stderr for logging output
Peter Maydell [Tue, 26 Feb 2013 17:52:40 +0000 (17:52 +0000)]
qemu-log: default to stderr for logging output

Switch the default for qemu_log logging output from "/tmp/qemu.log"
to stderr. This is an incompatible change in some sense, but logging
is mostly used for debugging purposes so it shouldn't affect production
use. The previous behaviour can be obtained by adding "-D /tmp/qemu.log"
to the command line.

This change requires us to:
 * update all the documentation/help text (we take the opportunity
   to smooth out minor inconsistencies between the phrasing in
   linux-user/bsd-user/system help messages)
 * make linux-user and bsd-user defer to qemu-log for the default
   logging destination rather than overriding it themselves
 * ensure that all logfile closing is done via qemu_log_close()
   and that that function doesn't close stderr
as well as the obvious change to the behaviour of do_qemu_set_log()
when no logfile name has been specified.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1361901160-28729-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoshow --disable-gtk and --enable-gtk in the help message
Hu Tao [Mon, 25 Feb 2013 02:27:48 +0000 (10:27 +0800)]
show --disable-gtk and --enable-gtk in the help message

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Message-id: 1361759268-16314-1-git-send-email-hutao@cn.fujitsu.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd compat for GDK_KEY_XXX symbols
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:46 +0000 (15:20 +0000)]
Add compat for GDK_KEY_XXX symbols

The GDK_KEY_XXX symbols are new in GTK3 and only the most
recent GTK2 releases. Most versions of GTK2 have simply
used GDK_XXX

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-14-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd compat macro for gtk_widget_get_realized
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:45 +0000 (15:20 +0000)]
Add compat macro for gtk_widget_get_realized

The gtk_widget_get_realized method only arrived in GTK 2.20,
so defined a compat macro for earlier GTK

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-13-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd support for enabling build with GTK3
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:44 +0000 (15:20 +0000)]
Add support for enabling build with GTK3

Add a arg to configure to switch from GTK2 (default) to
GTK3 (optional) build for QEMU.

  ./configure --with-gtkabi=3.0

will choose GTK3, while

  ./configure --with-gtkabi=2.0

will choose GTK2 (and remains the current default)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-12-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoEnsure x_keymap.o is built when GTK is enabled
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:43 +0000 (15:20 +0000)]
Ensure x_keymap.o is built when GTK is enabled

The x_keymap.o file is required by both GTK and SDL builds,
so it must be explicitly listed as a GTK dep to ensure the
linker works when SDL is disabled

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-11-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoReplace expose-event handler with draw handler in GTK3
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:42 +0000 (15:20 +0000)]
Replace expose-event handler with draw handler in GTK3

In GTK3 the 'expose-event' signal has been replaced by a new
'draw' signal. The only difference is that the latter will
pre-create the cairo drawing context & set the clip mask.
Since the drawing code is already structured in a nice way,
we can just wire up the 'gd_draw_event' method to the 'draw'
signal in GTK3

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-10-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoConditionalize use of gtk_widget_size_request
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:41 +0000 (15:20 +0000)]
Conditionalize use of gtk_widget_size_request

The gtk_widget_size_request method has been replaced by
the gtk_widget_get_preferred_size method in GTK3. Conditionally
call the new method in GTK3

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-9-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoConditionalize use of gdk_display_warp_pointer
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:40 +0000 (15:20 +0000)]
Conditionalize use of gdk_display_warp_pointer

In GTK3 the gdk_display_warp_pointer method is deprecated.
Instead we should use gdk_device_warp on the GdkDevice
instead associated with the event being processed.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-8-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoReplace gtk_menu_append with gtk_menu_shell_append
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:39 +0000 (15:20 +0000)]
Replace gtk_menu_append with gtk_menu_shell_append

The gtk_menu_append method has long been deprecated in favour
of the gtk_menu_shell_append method. The former is now entirely
gone in GTK3, so switch all code to the latter which works on
both GTK2 and GTK3

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-7-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoRemove use of GtkVBox in GTK3
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:38 +0000 (15:20 +0000)]
Remove use of GtkVBox in GTK3

The GtkVBox class is deprecated, in favour of just using the
GtkBox class directly. Eventually even GtkBox will be
deprecated in favour of GtkGrid, but that is a bigger fix
which can wait.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-6-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoConditionalize use of gdk_pointer_grab / gdk_pointer_ungrab
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:37 +0000 (15:20 +0000)]
Conditionalize use of gdk_pointer_grab / gdk_pointer_ungrab

On GTK3 there is support for multiple pointer devices, so
rather than using  gdk_pointer_grab / gdk_pointer_ungrab
we should iterate over all devices, grabbing each one in
turn

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-5-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoConditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrab
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:36 +0000 (15:20 +0000)]
Conditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrab

On GTK3 there is support for multiple keyboard devices, so
rather than using  gdk_keyboard_grab / gdk_keyboard_ungrab
we should iterate over all devices, grabbing each one in
turn

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-4-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoRemove use of gdk_drawable_get_{screen, display}
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:35 +0000 (15:20 +0000)]
Remove use of gdk_drawable_get_{screen, display}

The gdk_drawable_get_screen and gdk_drawable_get_display
methods don't exist in GDK3. Fortunately, even on GTK2
they are not required - we can call the equivalent
gtk_widget_get_screen/gtk_widget_get_display methods
which have existed since GTK 2.2

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-3-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd compat for gdk_drawable_get_size on GTK3
Daniel P. Berrange [Mon, 25 Feb 2013 15:20:34 +0000 (15:20 +0000)]
Add compat for gdk_drawable_get_size on GTK3

GTK3 lacks the gdk_drawable_get_size method, so we create a
stub impl which gets the get_width/get_height mehtods instead

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-2-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agogtk ui: unbreak spice
Gerd Hoffmann [Mon, 25 Feb 2013 15:02:30 +0000 (16:02 +0100)]
gtk ui: unbreak spice

Merge of the gtk ui brought a initialitation order issue for spice:
The using_spice variable isn't set yet when checked, leading to the
default UI being activated (additionally to spice remote access).

Let's set display_remote when we find a -spice switch on the command
line, like we do for vnc.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1361804550-15858-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Tue, 26 Feb 2013 13:44:39 +0000 (07:44 -0600)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

# By Paolo Bonzini (7) and others
# Via Kevin Wolf
* kwolf/for-anthony: (22 commits)
  pc: add compatibility machine types for 1.4
  blockdev: enable discard by default
  qemu-nbd: add --discard option
  blockdev: add discard suboption to -drive
  block: implement BDRV_O_UNMAP
  block: complete all IOs before .bdrv_truncate
  coroutine: trim down nesting level in perf_nesting test
  coroutine: move pooling to common code
  qemu-iotests: Test qcow2 image creation options
  qemu-iotests: Add qemu-img compare test
  qemu-img: Add compare subcommand
  qemu-img: Add "Quiet mode" option
  block: Add synchronous wrapper for bdrv_co_is_allocated_above
  block: refuse negative iops and bps values
  block: use Error in do_check_io_limits()
  qcow2: support compressed clusters in BlockFragInfo
  qemu-img: add compressed clusters to BlockFragInfo
  qemu-img: fix missing space in qemu-img check output
  qcow2: record fragmentation statistics during check
  qcow2: introduce check_refcounts_l1/l2() flags
  ...

11 years agoMerge remote-tracking branch 'quintela/stats.next' into staging
Anthony Liguori [Tue, 26 Feb 2013 13:44:32 +0000 (07:44 -0600)]
Merge remote-tracking branch 'quintela/stats.next' into staging

# By Juan Quintela
# Via Juan Quintela
* quintela/stats.next:
  migration: calculate expected_downtime
  migration: don't account sleep time for calculating bandwidth
  migration: calculate end time after we have sent the data
  migration: change initial value of expected_downtime

11 years agoMerge remote-tracking branch 'luiz/queue/qmp' into staging
Anthony Liguori [Tue, 26 Feb 2013 13:44:24 +0000 (07:44 -0600)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Markus Armbruster
# Via Luiz Capitulino
* luiz/queue/qmp:
  check-qjson: More thorough testing of UTF-8 in strings

11 years agoslirp: Properly initialize pollfds_idx of new sockets
Jan Kiszka [Fri, 22 Feb 2013 19:47:10 +0000 (20:47 +0100)]
slirp: Properly initialize pollfds_idx of new sockets

Otherwise we may start processing sockets in slirp_pollfds_poll that
were created past slirp_pollfds_fill.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-ppc: Fix SUBFE carry
Richard Henderson [Mon, 25 Feb 2013 19:41:40 +0000 (11:41 -0800)]
target-ppc: Fix SUBFE carry

While ~T0+T1+CF = T1-T0+CF-1 is true for the low 32-bits,
it does not produce the correct carry-out to bit 33.  Do
exactly what the manual says.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agotarget-arm: Fix sbc_CC carry
Richard Henderson [Mon, 25 Feb 2013 19:41:39 +0000 (11:41 -0800)]
target-arm: Fix sbc_CC carry

While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits,
it does not produce the correct carry-out to bit 33.  Do
exactly what the manual says.

Using the ~T1 makes the add and subtract code paths nearly
identical, so have sbc_CC use adc_CC.

Cc: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoarm/translate.c: Fix adc_CC/sbc_CC implementation
Peter Crosthwaite [Mon, 25 Feb 2013 19:41:38 +0000 (11:41 -0800)]
arm/translate.c: Fix adc_CC/sbc_CC implementation

commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and
2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC
and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path)
are incorrect. The new logic is:

CF:NF = 0:A +/- 0:CF
CF:NF = CF:A +/- 0:B

The lower 32 bits of the intermediate result stored in NF needs to be passes
into the second addition in place of A (s/CF:A/CF:NF):

CF:NF = 0:A +/- 0:CF
CF:NF = CF:NF +/- 0:B

This patch fixes the issue.

Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agotarget-mips: fix for sign-issue in MULQ_W helper
Petar Jovanovic [Thu, 7 Feb 2013 18:36:09 +0000 (19:36 +0100)]
target-mips: fix for sign-issue in MULQ_W helper

Correct sign-propagation before multiplication in MULQ_W helper.
The change also fixes previously incorrect expected values in the
tests for MULQ_RS.W and MULQ_S.W.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotarget-mips: fix for incorrect multiplication with MULQ_S.PH
Petar Jovanovic [Wed, 6 Feb 2013 17:05:25 +0000 (18:05 +0100)]
target-mips: fix for incorrect multiplication with MULQ_S.PH

The change corrects sign-related issue with MULQ_S.PH. It also includes
extension to the already existing test which will trigger the issue.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotarget-xtensa: Use add2/sub2 for mac
Richard Henderson [Wed, 20 Feb 2013 07:52:26 +0000 (23:52 -0800)]
target-xtensa: Use add2/sub2 for mac

Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: Use mul*2 for mul*hi
Richard Henderson [Wed, 20 Feb 2013 07:52:25 +0000 (23:52 -0800)]
target-xtensa: Use mul*2 for mul*hi

Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-unicore32: Use mul*2 for do_mult
Richard Henderson [Wed, 20 Feb 2013 07:52:24 +0000 (23:52 -0800)]
target-unicore32: Use mul*2 for do_mult

Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sh4: Use mul*2 for dmul*
Richard Henderson [Wed, 20 Feb 2013 07:52:23 +0000 (23:52 -0800)]
target-sh4: Use mul*2 for dmul*

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Use mul*2 for multiply
Richard Henderson [Wed, 20 Feb 2013 07:52:22 +0000 (23:52 -0800)]
target-sparc: Use mul*2 for multiply

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Use official add2/sub2 interfaces for addx/subx
Richard Henderson [Wed, 20 Feb 2013 07:52:21 +0000 (23:52 -0800)]
target-sparc: Use official add2/sub2 interfaces for addx/subx

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Compute mullwo without branches
Richard Henderson [Wed, 20 Feb 2013 07:52:20 +0000 (23:52 -0800)]
target-ppc: Compute mullwo without branches

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Compute arithmetic shift carry without branches
Richard Henderson [Wed, 20 Feb 2013 07:52:19 +0000 (23:52 -0800)]
target-ppc: Compute arithmetic shift carry without branches

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Implement neg in terms of subf
Richard Henderson [Wed, 20 Feb 2013 07:52:18 +0000 (23:52 -0800)]
target-ppc: Implement neg in terms of subf

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Use add2 for carry generation
Richard Henderson [Wed, 20 Feb 2013 07:52:17 +0000 (23:52 -0800)]
target-ppc: Use add2 for carry generation

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Compute addition carry with setcond
Richard Henderson [Wed, 20 Feb 2013 07:52:16 +0000 (23:52 -0800)]
target-ppc: Compute addition carry with setcond

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Compute addition overflow without branches
Richard Henderson [Wed, 20 Feb 2013 07:52:15 +0000 (23:52 -0800)]
target-ppc: Compute addition overflow without branches

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Use setcond in gen_op_cmp
Richard Henderson [Wed, 20 Feb 2013 07:52:14 +0000 (23:52 -0800)]
target-ppc: Use setcond in gen_op_cmp

Which means that callers need not copy data into local tmps.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Split out SO, OV, CA fields from XER
Richard Henderson [Wed, 20 Feb 2013 07:52:13 +0000 (23:52 -0800)]
target-ppc: Split out SO, OV, CA fields from XER

In preparation for more efficient setting of these fields.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-ppc: Use mul*2 in mulh* insns
Richard Henderson [Wed, 20 Feb 2013 07:52:12 +0000 (23:52 -0800)]
target-ppc: Use mul*2 in mulh* insns

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-cris: Use mul*2 in mul* insns
Richard Henderson [Wed, 20 Feb 2013 07:52:11 +0000 (23:52 -0800)]
target-cris: Use mul*2 in mul* insns

Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-mips: Use mul[us]2 in [D]MULT[U] insns
Richard Henderson [Wed, 20 Feb 2013 07:52:10 +0000 (23:52 -0800)]
target-mips: Use mul[us]2 in [D]MULT[U] insns

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Implement sbc_cc inline
Richard Henderson [Wed, 20 Feb 2013 07:52:09 +0000 (23:52 -0800)]
target-arm: Implement sbc_cc inline

Use sub2 if available, otherwise use 64-bit arithmetic.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Implement adc_cc inline
Richard Henderson [Wed, 20 Feb 2013 07:52:08 +0000 (23:52 -0800)]
target-arm: Implement adc_cc inline

Use add2 if available, otherwise use 64-bit arithmetic.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Use add2 in gen_add_CC
Richard Henderson [Wed, 20 Feb 2013 07:52:07 +0000 (23:52 -0800)]
target-arm: Use add2 in gen_add_CC

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Use mul[us]2 and add2 in umlal et al
Richard Henderson [Wed, 20 Feb 2013 07:52:06 +0000 (23:52 -0800)]
target-arm: Use mul[us]2 and add2 in umlal et al

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Use mul[us]2 in gen_mul[us]_i64_i32
Richard Henderson [Wed, 20 Feb 2013 07:52:05 +0000 (23:52 -0800)]
target-arm: Use mul[us]2 in gen_mul[us]_i64_i32

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-s390x: Use mulu2 for mlgr insn
Richard Henderson [Wed, 20 Feb 2013 07:52:04 +0000 (23:52 -0800)]
target-s390x: Use mulu2 for mlgr insn

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-alpha: Use mulu2 for umulh insn
Richard Henderson [Wed, 20 Feb 2013 07:52:03 +0000 (23:52 -0800)]
target-alpha: Use mulu2 for umulh insn

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Apply life analysis to 64-bit multiword arithmetic ops
Richard Henderson [Wed, 20 Feb 2013 07:52:02 +0000 (23:52 -0800)]
tcg: Apply life analysis to 64-bit multiword arithmetic ops

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Implement muls2 with mulu2
Richard Henderson [Wed, 20 Feb 2013 07:52:01 +0000 (23:52 -0800)]
tcg: Implement muls2 with mulu2

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-i386: Use add2 to implement the ADX extension
Richard Henderson [Wed, 20 Feb 2013 07:52:00 +0000 (23:52 -0800)]
target-i386: Use add2 to implement the ADX extension

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-arm: Implement muls2_i32
Richard Henderson [Wed, 20 Feb 2013 07:51:58 +0000 (23:51 -0800)]
tcg-arm: Implement muls2_i32

We even had the encoding of smull already handy...

Cc: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-i386: Implement multiword arithmetic ops
Richard Henderson [Wed, 20 Feb 2013 07:51:57 +0000 (23:51 -0800)]
tcg-i386: Implement multiword arithmetic ops

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Implement multiword addition helpers
Richard Henderson [Wed, 20 Feb 2013 07:51:56 +0000 (23:51 -0800)]
tcg: Implement multiword addition helpers

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Implement multiword multiply helpers
Richard Henderson [Wed, 20 Feb 2013 07:51:55 +0000 (23:51 -0800)]
tcg: Implement multiword multiply helpers

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Implement a 64-bit to 32-bit extraction helper
Richard Henderson [Wed, 20 Feb 2013 07:51:54 +0000 (23:51 -0800)]
tcg: Implement a 64-bit to 32-bit extraction helper

We're going to have use for this shortly in implementing other helpers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Add signed multiword multiplication operations
Richard Henderson [Wed, 20 Feb 2013 07:51:53 +0000 (23:51 -0800)]
tcg: Add signed multiword multiplication operations

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Add 64-bit multiword arithmetic operations
Richard Henderson [Wed, 20 Feb 2013 07:51:52 +0000 (23:51 -0800)]
tcg: Add 64-bit multiword arithmetic operations

Matching the 32-bit multiword arithmetic that we already have.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Always implement 32-bit multiword ops
Richard Henderson [Wed, 20 Feb 2013 07:51:51 +0000 (23:51 -0800)]
tcg-sparc: Always implement 32-bit multiword ops

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-i386: Always implement 32-bit multiword ops
Richard Henderson [Wed, 20 Feb 2013 07:51:50 +0000 (23:51 -0800)]
tcg-i386: Always implement 32-bit multiword ops

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg: Make 32-bit multiword operations optional for 64-bit hosts
Richard Henderson [Wed, 20 Feb 2013 07:51:49 +0000 (23:51 -0800)]
tcg: Make 32-bit multiword operations optional for 64-bit hosts

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge branch 'eflags3' of git://github.com/rth7680/qemu
Blue Swirl [Sat, 23 Feb 2013 17:21:41 +0000 (17:21 +0000)]
Merge branch 'eflags3' of git://github.com/rth7680/qemu

* 'eflags3' of git://github.com/rth7680/qemu: (61 commits)
  target-i386: Use movcond to implement shiftd.
  target-i386: Discard CC_OP computation in set_cc_op also
  target-i386: Use movcond to implement rotate flags.
  target-i386: Use movcond to implement shift flags.
  target-i386: Add CC_OP_CLR
  target-i386: Implement tzcnt and fix lzcnt
  target-i386: Use clz/ctz for bsf/bsr helpers
  target-i386: Implement ADX extension
  target-i386: Implement RORX
  target-i386: Implement SHLX, SARX, SHRX
  target-i386: Implement PDEP, PEXT
  target-i386: Implement MULX
  target-i386: Implement BZHI
  target-i386: Implement BLSR, BLSMSK, BLSI
  target-i386: Implement BEXTR
  target-i386: Implement ANDN
  target-i386: Implement MOVBE
  target-i386: Decode the VEX prefixes
  target-i386: Tidy prefix parsing
  target-i386: Use CC_SRC2 for ADC and SBB
  ...

11 years agoReplace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()
Peter Maydell [Wed, 20 Feb 2013 15:21:09 +0000 (15:21 +0000)]
Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()

The setjmp() function doesn't specify whether signal masks are saved and
restored; on Linux they are not, but on BSD (including MacOSX) they are.
We want to have consistent behaviour across platforms, so we should
always use "don't save/restore signal mask" (this is also generally
going to be faster). This also works around a bug in MacOSX where the
signal-restoration on longjmp() affects the signal mask for a completely
different thread, not just the mask for the thread which did the longjmp.
The most visible effect of this was that ctrl-C was ignored on MacOSX
because the CPU thread did a longjmp which resulted in its signal mask
being applied to every thread, so that all threads had SIGINT and SIGTERM
blocked.

The POSIX-sanctioned portable way to do a jump without affecting signal
masks is to siglongjmp() to a sigjmp_buf which was created by calling
sigsetjmp() with a zero savemask parameter, so change all uses of
setjmp()/longjmp() accordingly. [Technically POSIX allows sigsetjmp(buf, 0)
to save the signal mask; however the following siglongjmp() must not
restore the signal mask, so the pair can be effectively considered as
"sigjmp/longjmp which don't touch the mask".]

For Windows we provide a trivial sigsetjmp/siglongjmp in terms of
setjmp/longjmp -- this is OK because no user will ever pass a non-zero
savemask.

The setjmp() uses in tests/tcg/test-i386.c and tests/tcg/linux-test.c
are left untouched because these are self-contained singlethreaded
test programs intended to be run under QEMU's Linux emulation, so they
have neither the portability nor the multithreading issues to deal with.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Tested-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoSPARC LEON power-down support added
Ronald Hecht [Tue, 19 Feb 2013 11:45:07 +0000 (12:45 +0100)]
SPARC LEON power-down support added

Signed-off-by: Ronald Hecht <address@hidden>
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoAdded LEON MMU ASI mappings and corrected LEON3 MMU masks.
Ronald Hecht [Tue, 19 Feb 2013 11:45:06 +0000 (12:45 +0100)]
Added LEON MMU ASI mappings and corrected LEON3 MMU masks.

This patch adds SPARC ASI mappings that are used by the LEON processor.It also
corrects the MMU context register and context table pointer mask of the LEON3.

Signed-off-by: Ronald Hecht <ronald.hecht@gmx.de>
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agogrlib-apbuart: Add support of various flags
Ronald Hecht [Tue, 19 Feb 2013 16:22:11 +0000 (17:22 +0100)]
grlib-apbuart: Add support of various flags

 - enable/disable Rx and Tx
 - Rx and Tx interrupt
 - Tx FIFO empty and Tx SHIFT empty

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTypo: replace gptimer by apbuart
Fabien Chouteau [Tue, 19 Feb 2013 16:22:10 +0000 (17:22 +0100)]
Typo: replace gptimer by apbuart

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agodisas/i386.c: Add explicit braces round empty for-loop body
Peter Maydell [Sat, 2 Feb 2013 17:17:54 +0000 (17:17 +0000)]
disas/i386.c: Add explicit braces round empty for-loop body

Add explicit braces round an empty for-loop body; this fits
QEMU style and is easier to read than an inconspicuous semicolon
at the end of the line. It also silences a clang warning:

disas/i386.c:4723:49: warning: for loop has empty body [-Wempty-body]
          for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
                                                       ^
disas/i386.c:4723:49: note: put the semicolon on a separate line to silence this warning [-Wempty-body]

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Remove qemu_log_try_set_file() and its users
Peter Maydell [Tue, 12 Feb 2013 16:13:27 +0000 (16:13 +0000)]
qemu-log: Remove qemu_log_try_set_file() and its users

Remove the function qemu_log_try_set_file() and its users (which
are all in TCG code generation functions for various targets).
This function was added to abstract out code which was originally
written as "if (!logfile) logfile = stderr;" in order that BUG:
case code which did an unguarded "fprintf(logfile, ...)" would
not crash if debug logging was not enabled. Since those direct
uses of logfile have also been abstracted away into qemu_log()
calls which check for a NULL logfile, there is no need for the
target-* files to mess with the user's chosen logging settings.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>