arm/translate.c: Fix adc_CC/sbc_CC implementation
commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CCand sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path)...
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. Doexactly what the manual says.
Using the ~T1 makes the add and subtract code paths nearlyidentical, so have sbc_CC use adc_CC....
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 thetests for MULQ_RS.W and MULQ_S.W.
Signed-off-by: Petar Jovanovic <petarj@mips.com>...
target-mips: fix for incorrect multiplication with MULQ_S.PH
The change corrects sign-related issue with MULQ_S.PH. It also includesextension 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>
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>
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>
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>
target-xtensa: Use add2/sub2 for mac
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>
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>
target-ppc: Split out SO, OV, CA fields from XER
In preparation for more efficient setting of these fields.
target-ppc: Use setcond in gen_op_cmp
Which means that callers need not copy data into local tmps.
target-ppc: Compute addition overflow without branches
target-ppc: Compute addition carry with setcond
target-ppc: Use add2 for carry generation
target-ppc: Implement neg in terms of subf
target-ppc: Compute arithmetic shift carry without branches
target-ppc: Compute mullwo without branches
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>
target-sparc: Use mul*2 for multiply
tcg-i386: Implement multiword arithmetic ops
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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>
target-i386: Use add2 to implement the ADX extension
tcg: Implement muls2 with mulu2
tcg: Apply life analysis to 64-bit multiword arithmetic ops
target-alpha: Use mulu2 for umulh insn
target-s390x: Use mulu2 for mlgr insn
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>
target-arm: Use mul[us]2 and add2 in umlal et al
target-arm: Use add2 in gen_add_CC
target-arm: Implement adc_cc inline
Use add2 if available, otherwise use 64-bit arithmetic.
target-arm: Implement sbc_cc inline
Use sub2 if available, otherwise use 64-bit arithmetic.
target-mips: Use mul[us]2 in [D]MULT[U] insns
tcg: Make 32-bit multiword operations optional for 64-bit hosts
tcg-i386: Always implement 32-bit multiword ops
tcg-sparc: Always implement 32-bit multiword ops
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>
tcg: Add signed multiword multiplication operations
tcg: Implement a 64-bit to 32-bit extraction helper
We're going to have use for this shortly in implementing other helpers.
tcg: Implement multiword multiply helpers
tcg: Implement multiword addition helpers
Merge branch 'eflags3' of git://github.com/rth7680/qemu
Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()
The setjmp() function doesn't specify whether signal masks are saved andrestored; on Linux they are not, but on BSD (including MacOSX) they are.We want to have consistent behaviour across platforms, so we should...
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>
Added LEON MMU ASI mappings and corrected LEON3 MMU masks.
This patch adds SPARC ASI mappings that are used by the LEON processor.It alsocorrects the MMU context register and context table pointer mask of the LEON3.
Signed-off-by: Ronald Hecht <ronald.hecht@gmx.de>...
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>
Typo: replace gptimer by apbuart
disas/i386.c: Add explicit braces round empty for-loop body
Add explicit braces round an empty for-loop body; this fitsQEMU style and is easier to read than an inconspicuous semicolonat the end of the line. It also silences a clang warning:
disas/i386.c:4723:49: warning: for loop has empty body [-Wempty-body]...
qemu-log: Remove qemu_log_try_set_file() and its users
Remove the function qemu_log_try_set_file() and its users (whichare all in TCG code generation functions for various targets).This function was added to abstract out code which was originallywritten as "if (!logfile) logfile = stderr;" in order that BUG:...
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>...
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 niceadded-value for the GTK UI.
We use "pause" as the term for stopping the machine here. So reword alsothe related caption tag....
ui/gtk: Use menu item from stock for full screen
This reduces the required translations and gives a nicer menuwith 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....
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>...
Reenable -Wstrict-prototypes
One part of this patch reverts commit 22bc9a46, which disabled thewarning. The rest of it deals with the warning by adding a #pragma fornewer gcc and by disabling -Werror for compilers that can't deal withthe #pragma.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
unbreak hw/usb/redirect.c build
Commit 8550a02d1239415342959f6a32d178bc05c557cc added a streamsparameter 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>
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 aroundsfor older versions and lower the requirement but this should be a goodstarting point.
Suggested-by: Daniel Berrange <berrange@redhat.com>...
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.deSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
gtk: make default UI (v5)
A user can still enable SDL with '-sdl' or '-display sdl' but start making thedefault 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>...
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 tohandle this generally speaking.
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...
console: allow VCs to be overridden by UI
We want to expose VCs using a VteTerminal widget. We need access to provide ourown 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
ui: add basic GTK gui (v5)
This is minimalistic and just contains the basic widget infrastructure. The GUIconsists of a menu and a GtkNotebook. To start with, the notebook has its tabshidden which provides a UI that looks very similar to SDL with the exception of...
gtk: add virtual console support (v2)
This enables VteTerminal to be used to render the text consoles. VteTerminal isthe same widget used by gnome-terminal which means it's VT100 emulation is asgood as they come.
It's also screen reader accessible, supports copy/paste, proper scrolling and...
gtk: add support for input grabbing (v2)
There is a small deviation from SDL's behavior here. Instead of Ctrl+Alttriggering grab, we now use Ctrl-Alt-g to trigger grab.
GTK will not accept Ctrl+Alt as an accelerator since it just consists ofmodifiers. Having grab as a proper accelerator is important as it allows a user...
gtk: add support for screen scaling and full screen (v5)
Basic menu items to enter full screen mode and zoom in/out. Unlike SDL, wedon't allow arbitrary scaling based on window resizing. The current behaviorwith SDL causes a lot of problems for me.
Sometimes I accidentally resize the window a tiny bit while trying to move it...
gtk: add translation support (v5)
This includes a de_DE translation from Kevin Wolf and an it translation fromPaolo 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>...
qom/object.c: Reset interface list on inheritance
The QOM framework will attempt the recreate a classes interface list fromscratch for each class. This means that a child class should zero out thelist of interfaces when cloned from the parent class.
Currently the list is memcpy()d from the parent to the child. As the interface...
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 definesno interfaces of its own, but its parent has interfaces you cannot cast to those...
vga: fix byteswapping.
In case host and guest endianness differ the vga code first createsa shared surface (using qemu_create_displaysurface_from), then goespatch the surface format to indicate that the bytes must be swapped.
The switch to pixman broke that hack as the format patching isn't...
Remove elderly top level TODO file
The top level TODO file hasn't been touched since 2008, so it's nowan 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 theorybe done but are not in practice important enough (or we'd have done...
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 weneed the full table of select(2) to g_poll(3) events:
rfds -> G_IO_IN | G_IO_HUP | G_IO_ERR...
iohandler: switch to GPollFD
Convert iohandler_select_fill() and iohandler_select_poll() to useGPollFD 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...
main-loop: drop rfds/wfds/xfds for good
Now that all *_fill() and *_poll() functions use GPollFD we no longerneed rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select().
From now on everything uses GPollFD.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>...
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 newaio_dispatch() function....
aio: convert aio_poll() to g_poll(3)
AioHandler already has a GPollFD so we can directly use itsevents/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)....
aio: support G_IO_HUP and G_IO_ERR
aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR becauseselect(2) does not have equivalent events. Now that g_poll(3) is usedwe can support G_IO_HUP and G_IO_ERR.
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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...
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 nowbecome local variables.
slirp: slirp/slirp.c coding style cleanup
The slirp glue code uses tabs in some places. Since the next patch willmodify 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>...
Merge remote-tracking branch 'kraxel/usb.78' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
.gitignore: Ignore optionrom/*.asm
Signed-off-by: Cole Robinson <crobinso@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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 RAMwith qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMUwould just hang. However, when I used -m 256, the machine would boot....
Add some missing qtest binaries to .gitignore
These binaries are generated during make check on at least someconfigurations, so att them to .gitignore.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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>
xilinx_axienet.c: Assert no error when making link
This gives an awful silent failure when it doesn't work. Assert against linkcreation failure.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
target-i386: Use movcond to implement shift flags.
With this being all straight-line code, it can get deletedwhen the cc variables die.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-i386: Use movcond to implement rotate flags.
target-i386: Discard CC_OP computation in set_cc_op also
The shift and rotate insns use movcond to set CC_OP, and thusachieve a conditional EFLAGS setting. By discarding CC_OP ina later flags setting insn, we can discard that movcond.
target-i386: Use movcond to implement shiftd.
target-i386: Implement ADX extension
target-i386: Use clz/ctz for bsf/bsr helpers
And mark the helpers as NO_RWG_SE.
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.
target-i386: Add CC_OP_CLR
Special case xor with self. We need not even store the knownzero into cc_src.
uas-uas: usb3 streams
Add usb3 streams support to the uas (usb attached scsi) emulation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-xhci: usb3 streams
Add streams support to the xhci emulation. No secondary streams yet,only linear stream arays are supported for now.
usb: fix endpoint descriptor ordering
Fix the ordering of the endpoint descriptors for superspeed endpoints:The superspeed companion must come first, possible additionaldescriptors for the endpoint after that.
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.