]> git.proxmox.com Git - qemu.git/log
qemu.git
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>
11 years agoxhci: fix bad print specifier
Hervé Poussineau [Thu, 21 Feb 2013 21:58:08 +0000 (22:58 +0100)]
xhci: fix bad print specifier

This fixes the following compilation error:
hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type
‘long long unsigned int’, but argument 4 has type ‘unsigned int’

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agogtk: Rename File to Machine menu and add pause, reset and power down items
Jan Kiszka [Fri, 22 Feb 2013 19:53:33 +0000 (20:53 +0100)]
gtk: Rename File to Machine menu and add pause, reset and power down items

This adds basic guest control commands to the "Machine" menu - a nice
added-value for the GTK UI.

We use "pause" as the term for stopping the machine here. So reword also
the related caption tag.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoui/gtk: Use menu item from stock for full screen
Stefan Weil [Fri, 22 Feb 2013 19:33:34 +0000 (20:33 +0100)]
ui/gtk: Use menu item from stock for full screen

This reduces the required translations and gives a nicer menu
with an icon.

The full screen menu item is no longer a check menu item.
A checked item is not visible in full screen mode,
so it is not needed for this special menu item.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1361561614-11180-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoui/gtk: Support versions of VTE before 0.26
Stefan Weil [Fri, 22 Feb 2013 19:09:59 +0000 (20:09 +0100)]
ui/gtk: Support versions of VTE before 0.26

This is needed for current Debian stable (Squeeze).

VTE versions before 0.26 did not support VtePty.

Lower the version requirement and use alternate code which works for Debian.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1361560199-28906-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoReenable -Wstrict-prototypes
Kevin Wolf [Fri, 22 Feb 2013 20:08:51 +0000 (21:08 +0100)]
Reenable -Wstrict-prototypes

One part of this patch reverts commit 22bc9a46, which disabled the
warning. The rest of it deals with the warning by adding a #pragma for
newer gcc and by disabling -Werror for compilers that can't deal with
the #pragma.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1361563731-13307-1-git-send-email-kwolf@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoui/gtk: require at least GTK 2.18 and VTE 0.26
Anthony Liguori [Fri, 22 Feb 2013 14:40:30 +0000 (08:40 -0600)]
ui/gtk: require at least GTK 2.18 and VTE 0.26

This gives us the bare amount of features we need.  We can add work arounds
for older versions and lower the requirement but this should be a good
starting point.

Suggested-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2
 - tremendous simplification suggested by danpb

11 years agounbreak hw/usb/redirect.c build
Gerd Hoffmann [Fri, 22 Feb 2013 11:11:59 +0000 (12:11 +0100)]
unbreak hw/usb/redirect.c build

Commit 8550a02d1239415342959f6a32d178bc05c557cc added a streams
parameter to usb_wakeup and didn't update redirect.c.  Fix it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoui/gtk: Fix build (missing include for setlocale)
Stefan Weil [Fri, 22 Feb 2013 06:28:01 +0000 (07:28 +0100)]
ui/gtk: Fix build (missing include for setlocale)

At least for Ubuntu Linux locale.h is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1361514481-26164-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agogtk: suppress accelerators from the File menu when grab is active
Anthony Liguori [Wed, 20 Feb 2013 13:43:26 +0000 (07:43 -0600)]
gtk: suppress accelerators from the File menu when grab is active

If you're full screen, you probably expect Ctrl-Q to go to the guest,
not the host.  I think restricting certain menus is the right way to
handle this generally speaking.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-10-git-send-email-aliguori@us.ibm.com

11 years agogtk: make default UI (v5)
Anthony Liguori [Wed, 20 Feb 2013 13:43:25 +0000 (07:43 -0600)]
gtk: make default UI (v5)

A user can still enable SDL with '-sdl' or '-display sdl' but start making the
default display GTK by default.

I'd also like to deprecate the SDL display and remove it in a few releases.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-9-git-send-email-aliguori@us.ibm.com

11 years agogtk: add translation support (v5)
Anthony Liguori [Wed, 20 Feb 2013 13:43:24 +0000 (07:43 -0600)]
gtk: add translation support (v5)

This includes a de_DE translation from Kevin Wolf and an it translation from
Paolo Bonzini.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-8-git-send-email-aliguori@us.ibm.com

11 years agogtk: add support for screen scaling and full screen (v5)
Anthony Liguori [Wed, 20 Feb 2013 13:43:23 +0000 (07:43 -0600)]
gtk: add support for screen scaling and full screen (v5)

Basic menu items to enter full screen mode and zoom in/out.  Unlike SDL, we
don't allow arbitrary scaling based on window resizing.  The current behavior
with SDL causes a lot of problems for me.

Sometimes I accidentally resize the window a tiny bit while trying to move it
(Ubuntu's 1-pixel window decorations don't help here).  After that, scaling is
now active and if the screen changes size again, badness ensues since the
aspect ratio is skewed.

Allowing zooming by 25% in and out should cover most use cases.  We can add a
more flexible scaling later but for now, I think this is a more friendly
behavior.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-7-git-send-email-aliguori@us.ibm.com

11 years agogtk: add support for input grabbing (v2)
Anthony Liguori [Wed, 20 Feb 2013 13:43:22 +0000 (07:43 -0600)]
gtk: add support for input grabbing (v2)

There is a small deviation from SDL's behavior here.  Instead of Ctrl+Alt
triggering grab, we now use Ctrl-Alt-g to trigger grab.

GTK will not accept Ctrl+Alt as an accelerator since it just consists of
modifiers.  Having grab as a proper accelerator is important as it allows a user
to override the accelerator for accessibility purposes.

We also are not automatically grabbing on left-click.  Besides the inability to
tie mouse clicks to an accelerator, I think this behavior is hard to discover
and since it only happens depending on the guest state, it can lead to confusing
behavior.

This can be changed in the future if there's a strong resistence to dropping
left-click-to-grab, but I think we're better off dropping it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-6-git-send-email-aliguori@us.ibm.com

11 years agogtk: add virtual console support (v2)
Anthony Liguori [Wed, 20 Feb 2013 13:43:21 +0000 (07:43 -0600)]
gtk: add virtual console support (v2)

This enables VteTerminal to be used to render the text consoles.  VteTerminal is
the same widget used by gnome-terminal which means it's VT100 emulation is as
good as they come.

It's also screen reader accessible, supports copy/paste, proper scrolling and
most of the other features you would expect from a terminal widget.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-5-git-send-email-aliguori@us.ibm.com

11 years agoui: add basic GTK gui (v5)
Anthony Liguori [Wed, 20 Feb 2013 13:43:20 +0000 (07:43 -0600)]
ui: add basic GTK gui (v5)

This is minimalistic and just contains the basic widget infrastructure.  The GUI
consists of a menu and a GtkNotebook.  To start with, the notebook has its tabs
hidden which provides a UI that looks very similar to SDL with the exception of
the menu bar.

The menu bar allows a user to toggle the visibility of the tabs.  Cairo is used
for rendering.

I used gtk-vnc as a reference.  gtk-vnc solves the same basic problems as QEMU
since it was originally written as a remote display for QEMU.  So for the most
part, the approach to rendering and keyboard handling should be pretty solid for
GTK.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-4-git-send-email-aliguori@us.ibm.com

11 years agoconsole: allow VCs to be overridden by UI
Anthony Liguori [Wed, 20 Feb 2013 13:43:19 +0000 (07:43 -0600)]
console: allow VCs to be overridden by UI

We want to expose VCs using a VteTerminal widget.  We need access to provide our
own CharDriverState in order to do this.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-3-git-send-email-aliguori@us.ibm.com

11 years agobuild: disable Wstrict-prototypes
Anthony Liguori [Wed, 20 Feb 2013 13:43:18 +0000 (07:43 -0600)]
build: disable Wstrict-prototypes

GTK won't build with strict-prototypes due to gtkitemfactory.h:

    /* We use () here to mean unspecified arguments. This is deprecated
     * as of C99, but we can't change it without breaking compatibility.
     * (Note that if we are included from a C++ program () will mean
     * (void) so an explicit cast will be needed.)
     */
    typedef void (*GtkItemFactoryCallback)  ();

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-2-git-send-email-aliguori@us.ibm.com

11 years agoqom/object.c: Allow itf cast with num_itfs = 0
Peter Crosthwaite [Tue, 19 Feb 2013 04:02:10 +0000 (14:02 +1000)]
qom/object.c: Allow itf cast with num_itfs = 0

num_interfaces only tells you how many interfaces the concrete child class has
(as defined in the TypeInfo). This means if you have a child class which defines
no interfaces of its own, but its parent has interfaces you cannot cast to those
parent interfaces.

Fixed changing the guard to check the class->interfaces list instead (which is
a complete flattened list of implemented interfaces).

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: a8c2db3b9b1f3c4bb81aca352b69e33260f36545.1361246206.git.peter.crosthwaite@xilinx.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqom/object.c: Reset interface list on inheritance
Peter Crosthwaite [Tue, 19 Feb 2013 04:02:09 +0000 (14:02 +1000)]
qom/object.c: Reset interface list on inheritance

The QOM framework will attempt the recreate a classes interface list from
scratch for each class. This means that a child class should zero out the
list of interfaces when cloned from the parent class.

Currently the list is memcpy()d from the parent to the child. As the interface
list is just a pointer to a list, this means the parent and child will share
the same list of interfaces. When the child inits, it will append its own
interfaces to the parents list. This is incorrect as the parent should not pick
up its childs interfaces.

This actually causes an infinite loop at class init time, as the child will
iterate through the parent interface list adding each itf to its own list(in
type_initialize()). As the list is (erroneously) shared, the new interface
instances for the child are appended to the parent, and the iterator never hits
the tail and loops forever.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1f58d2b629d82865dbb2fd5ba8445854049c4382.1361246206.git.peter.crosthwaite@xilinx.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovga: fix byteswapping.
Gerd Hoffmann [Wed, 20 Feb 2013 08:37:12 +0000 (09:37 +0100)]
vga: fix byteswapping.

In case host and guest endianness differ the vga code first creates
a shared surface (using qemu_create_displaysurface_from), then goes
patch the surface format to indicate that the bytes must be swapped.

The switch to pixman broke that hack as the format patching isn't
propagated into the pixman image, so ui code using the pixman image
directly (such as vnc) uses the wrong format.

Fix that by adding a byteswap parameter to
qemu_create_displaysurface_from, so we'll use the correct format
when creating the surface (and the pixman image) and don't have
to patch the format afterwards.

[ v2: unbreak xen build ]

Cc: qemu-stable@nongnu.org
Cc: mark.cave-ayland@ilande.co.uk
Cc: agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1361349432-23884-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoRemove elderly top level TODO file
Peter Maydell [Wed, 20 Feb 2013 16:24:22 +0000 (16:24 +0000)]
Remove elderly top level TODO file

The top level TODO file hasn't been touched since 2008, so it's now
an unhelpful and out of date mix of things that have already been done,
things that don't make sense any more and things which could in theory
be done but are not in practice important enough (or we'd have done
them some time in the last five years). Remove it. The bug tracking
system is probably a better place to track TODO items if we want to
do so.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1361377462-19816-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agohelp: add docs for multiqueue tap options
Jason Wang [Wed, 20 Feb 2013 10:04:01 +0000 (18:04 +0800)]
help: add docs for multiqueue tap options

Cc: Markus Armbruster <armbru@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-id: 1361354641-51969-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoaio: support G_IO_HUP and G_IO_ERR
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:33 +0000 (11:28 +0100)]
aio: support G_IO_HUP and G_IO_ERR

aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR because
select(2) does not have equivalent events.  Now that g_poll(3) is used
we can support G_IO_HUP and G_IO_ERR.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-11-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoaio: convert aio_poll() to g_poll(3)
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:32 +0000 (11:28 +0100)]
aio: convert aio_poll() to g_poll(3)

AioHandler already has a GPollFD so we can directly use its
events/revents.

Add the int pollfds_idx field to AioContext so we can map g_poll(3)
results back to AioHandlers.

Reuse aio_dispatch() to invoke handlers after g_poll(3).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-10-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoaio: extract aio_dispatch() from aio_poll()
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:31 +0000 (11:28 +0100)]
aio: extract aio_dispatch() from aio_poll()

We will need to loop over AioHandlers calling ->io_read()/->io_write()
when aio_poll() is converted from select(2) to g_poll(2).

Luckily the code for this already exists, extract it into the new
aio_dispatch() function.

Two small changes:

 * aio_poll() checks !node->deleted to avoid calling handlers that have
   been deleted.

 * Fix typo 'then' -> 'them' in aio_poll() comment.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-9-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomain-loop: drop rfds/wfds/xfds for good
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:30 +0000 (11:28 +0100)]
main-loop: drop rfds/wfds/xfds for good

Now that all *_fill() and *_poll() functions use GPollFD we no longer
need rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select().

>From now on everything uses GPollFD.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-8-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoiohandler: switch to GPollFD
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:29 +0000 (11:28 +0100)]
iohandler: switch to GPollFD

Convert iohandler_select_fill() and iohandler_select_poll() to use
GPollFD instead of rfds/wfds/xfds.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-7-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoslirp: switch to GPollFD
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:28 +0000 (11:28 +0100)]
slirp: switch to GPollFD

Slirp uses rfds/wfds/xfds more extensively than other QEMU components.

The rarely-used out-of-band TCP data feature is used.  That means we
need the full table of select(2) to g_poll(3) events:

  rfds -> G_IO_IN | G_IO_HUP | G_IO_ERR
  wfds -> G_IO_OUT | G_IO_ERR
  xfds -> G_IO_PRI

I came up with this table by looking at Linux fs/select.c which maps
select(2) to poll(2) internally.

Another detail to watch out for are the global variables that reference
rfds/wfds/xfds during slirp_select_poll().  sofcantrcvmore() and
sofcantsendmore() use these globals to clear fd_set bits.  When
sofcantrcvmore() is called, the wfds bit is cleared so that the write
handler will no longer be run for this iteration of the event loop.

This actually seems buggy to me since TCP connections can be half-closed
and we'd still want to handle data in half-duplex fashion.  I think the
real intention is to avoid running the read/write handler when the
socket has been fully closed.  This is indicated with the SS_NOFDREF
state bit so we now check for it before invoking the TCP write handler.
Note that UDP/ICMP code paths don't care because they are
connectionless.

Note that slirp/ has a lot of tabs and sometimes mixed tabs with spaces.
I followed the style of the surrounding code.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-6-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoslirp: slirp/slirp.c coding style cleanup
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:27 +0000 (11:28 +0100)]
slirp: slirp/slirp.c coding style cleanup

The slirp glue code uses tabs in some places.  Since the next patch will
modify the file, convert tabs to spaces and fix checkpatch.pl issues.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-5-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomain-loop: switch POSIX glib integration to GPollFD
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:26 +0000 (11:28 +0100)]
main-loop: switch POSIX glib integration to GPollFD

Convert glib file descriptor polling from rfds/wfds/xfds to GPollFD.

The Windows code still needs poll_fds[] and n_poll_fds but they can now
become local variables.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-4-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomain-loop: switch to g_poll() on POSIX hosts
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:25 +0000 (11:28 +0100)]
main-loop: switch to g_poll() on POSIX hosts

Use g_poll(3) instead of select(2).  Well, this is kind of a cheat.
It's true that we're now using g_poll(3) on POSIX hosts but the *_fill()
and *_poll() functions are still using rfds/wfds/xfds.

We've set the scene to start converting *_fill() and *_poll() functions
step-by-step until no more rfds/wfds/xfds users remain.  Then we'll drop
the temporary gpollfds_from_select() and gpollfds_to_select() functions
and be left with native g_poll(2).

On Windows things are a little crazy: convert from rfds/wfds/xfds to
GPollFDs, back to rfds/wfds/xfds, call select(2), rfds/wfds/xfds back to
GPollFDs, and finally back to rfds/wfds/xfds again.  This is only
temporary and keeps the Windows build working through the following
patches.  We'll drop this excessive conversion later and be left with a
single GPollFDs -> select(2) -> GPollFDs sequence that allows Windows to
use select(2) while the rest of QEMU only knows about GPollFD.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-3-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomain-loop: fix select_ret uninitialized variable warning
Stefan Hajnoczi [Wed, 20 Feb 2013 10:28:24 +0000 (11:28 +0100)]
main-loop: fix select_ret uninitialized variable warning

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-2-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/usb.78' into staging
Anthony Liguori [Thu, 21 Feb 2013 15:39:17 +0000 (09:39 -0600)]
Merge remote-tracking branch 'kraxel/usb.78' into staging

# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/usb.78:
  uas-uas: usb3 streams
  usb-xhci: usb3 streams
  usb-core: usb3 streams
  usb: fix endpoint descriptor ordering
  usb-redir: simplify packet copy
  usb: make usb_packet_copy operate on combined packets
  usb: add usb_ep_set_halted
  usb-host: remove usb_host_device_close
  usb-host: move legacy cmd line bits
  usb-storage: use scsi_req_enqueue return value
  allow disabling usb smartcard support
  make usb devices configurable
  fix scripts/make_device_config.sh
  usb: Makefile cleanup

11 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Thu, 21 Feb 2013 15:38:27 +0000 (09:38 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

# By Alin Tomescu (1) and others
# Via Stefan Hajnoczi
* stefanha/trivial-patches:
  .gitignore: Ignore optionrom/*.asm
  ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c
  Add some missing qtest binaries to .gitignore
  xilinx_axienet.c: Assert no error when making link
  Remove forward declaration of non-existant variable

11 years ago.gitignore: Ignore optionrom/*.asm
Cole Robinson [Tue, 19 Feb 2013 22:41:28 +0000 (17:41 -0500)]
.gitignore: Ignore optionrom/*.asm

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c
Alin Tomescu [Thu, 21 Feb 2013 02:36:09 +0000 (21:36 -0500)]
ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c

I was trying to launch a PowerPC "bamboo" machine with more than 256MB of RAM
with qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMU
would just hang. However, when I used -m 256, the machine would boot.

I looked through the code in hw/ and it seems there is an error when the
RAM memory is setup (if my understanding is correct).

After patching it, the machine launched and booted successfully with 512MB of
RAM.

Signed-off-by: Alin Tomescu <tomescu.alin@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoAdd some missing qtest binaries to .gitignore
David Gibson [Thu, 21 Feb 2013 02:34:40 +0000 (13:34 +1100)]
Add some missing qtest binaries to .gitignore

These binaries are generated during make check on at least some
configurations, so att them to .gitignore.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoxilinx_axienet.c: Assert no error when making link
Peter Crosthwaite [Mon, 11 Feb 2013 07:16:05 +0000 (17:16 +1000)]
xilinx_axienet.c: Assert no error when making link

This gives an awful silent failure when it doesn't work. Assert against link
creation failure.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoRemove forward declaration of non-existant variable
Hervé Poussineau [Sun, 10 Feb 2013 22:11:05 +0000 (23:11 +0100)]
Remove forward declaration of non-existant variable

This variable has been removed 5 years ago in 970ac5a3082428dca91171f270dcd95d6f4b2636.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-i386: Use movcond to implement shiftd.
Richard Henderson [Wed, 20 Feb 2013 05:06:31 +0000 (21:06 -0800)]
target-i386: Use movcond to implement shiftd.

With this being all straight-line code, it can get deleted
when the cc variables die.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Discard CC_OP computation in set_cc_op also
Richard Henderson [Tue, 19 Feb 2013 22:48:43 +0000 (14:48 -0800)]
target-i386: Discard CC_OP computation in set_cc_op also

The shift and rotate insns use movcond to set CC_OP, and thus
achieve a conditional EFLAGS setting.  By discarding CC_OP in
a later flags setting insn, we can discard that movcond.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Use movcond to implement rotate flags.
Richard Henderson [Thu, 31 Jan 2013 03:16:45 +0000 (19:16 -0800)]
target-i386: Use movcond to implement rotate flags.

With this being all straight-line code, it can get deleted
when the cc variables die.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Use movcond to implement shift flags.
Richard Henderson [Thu, 31 Jan 2013 01:52:59 +0000 (17:52 -0800)]
target-i386: Use movcond to implement shift flags.

With this being all straight-line code, it can get deleted
when the cc variables die.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Add CC_OP_CLR
Richard Henderson [Tue, 29 Jan 2013 21:38:43 +0000 (13:38 -0800)]
target-i386: Add CC_OP_CLR

Special case xor with self.  We need not even store the known
zero into cc_src.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Implement tzcnt and fix lzcnt
Richard Henderson [Mon, 21 Jan 2013 21:32:02 +0000 (13:32 -0800)]
target-i386: Implement tzcnt and fix lzcnt

We weren't computing flags for lzcnt at all.  At the same time,
adjust the implementation of bsf/bsr to avoid the local branch,
using movcond instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Use clz/ctz for bsf/bsr helpers
Richard Henderson [Mon, 21 Jan 2013 19:52:26 +0000 (11:52 -0800)]
target-i386: Use clz/ctz for bsf/bsr helpers

And mark the helpers as NO_RWG_SE.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotarget-i386: Implement ADX extension
Richard Henderson [Thu, 24 Jan 2013 02:17:33 +0000 (18:17 -0800)]
target-i386: Implement ADX extension

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agouas-uas: usb3 streams
Gerd Hoffmann [Fri, 25 Jan 2013 16:38:59 +0000 (17:38 +0100)]
uas-uas: usb3 streams

Add usb3 streams support to the uas (usb attached scsi) emulation.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-xhci: usb3 streams
Gerd Hoffmann [Fri, 25 Jan 2013 16:23:44 +0000 (17:23 +0100)]
usb-xhci: usb3 streams

Add streams support to the xhci emulation.  No secondary streams yet,
only linear stream arays are supported for now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-core: usb3 streams
Gerd Hoffmann [Tue, 29 Jan 2013 11:44:35 +0000 (12:44 +0100)]
usb-core: usb3 streams

This patch adds support for usb3 streams to the usb subsystem core.
This is just adding a streams field / parameter in a number of places.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: fix endpoint descriptor ordering
Gerd Hoffmann [Mon, 28 Jan 2013 14:52:57 +0000 (15:52 +0100)]
usb: fix endpoint descriptor ordering

Fix the ordering of the endpoint descriptors for superspeed endpoints:
The superspeed companion must come first, possible additional
descriptors for the endpoint after that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-redir: simplify packet copy
Gerd Hoffmann [Thu, 24 Jan 2013 14:40:37 +0000 (15:40 +0100)]
usb-redir: simplify packet copy

usb_packet_copy can handle combined packets now,
so it isn't needed to special-case them any more.

Also use the new usb_packet_size() function.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: make usb_packet_copy operate on combined packets
Gerd Hoffmann [Thu, 24 Jan 2013 14:38:23 +0000 (15:38 +0100)]
usb: make usb_packet_copy operate on combined packets

Likewise usb_packet_skip.
Also usb_packet_size.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: add usb_ep_set_halted
Gerd Hoffmann [Wed, 12 Dec 2012 12:40:59 +0000 (13:40 +0100)]
usb: add usb_ep_set_halted

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-host: remove usb_host_device_close
Gerd Hoffmann [Fri, 30 Nov 2012 12:02:47 +0000 (13:02 +0100)]
usb-host: remove usb_host_device_close

Nobody implements that anyway.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-host: move legacy cmd line bits
Gerd Hoffmann [Wed, 23 Jan 2013 13:15:38 +0000 (14:15 +0100)]
usb-host: move legacy cmd line bits

The code handling the "-usbdevice host:..." legacy command line
syntax is moved to the new hw/usb/host-legacy.c file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>