aboutsummaryrefslogtreecommitdiffstats
path: root/target-i386
Commit message (Collapse)AuthorAgeFilesLines
* Force emulator to quit if it's built w/o global register variable supportAndrew Hsieh2012-06-121-5/+1
| | | | | | | | | | | | | | | | | | | Clang and llvm-gcc don't support global register variable (GRV) crucial to emulator (where a register is reserved to point to target architecture state for better code-gen). Clang and llvm-gcc are provided in recent Xcode to replace the original gcc with GRV support. MacOSX developers may accidentally install newer Xcode and break emulator. This CL allows emulator (and the rest of Android tree) to build but forces emulator to quit if it's built w/o GRV support. Developers build Android tree with clang or llvm-gcc can still get good system image, but they have to use emulators built the other way or from SDKs to run it. Related CL & bug entry: https://android-review.googlesource.com/#/c/33011 http://code.google.com/p/android/issues/detail?id=32577 Change-Id: Ia585dd7bf9783e2ff4c114b4f0ec20b89684ab57
* Merge "Xcode 4.3 compatibility checkin"Jean-Baptiste Queru2012-05-041-1/+5
|\
| * Xcode 4.3 compatibility checkinAl Sutton2012-02-221-1/+5
| | | | | | | | | | | | | | The Xcode 4.3 compiler doesn't have support for global register variables so this patch ensures that the register keyword is not incuded for that compiler. Signed-off-by: Al Sutton <al@funkyandroid.com>
* | Add fast mmio supportJiang, Yunhong2012-04-072-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In HAXM 1.0, HAXM driver utilizes QEMU to decode and emulate MMIO accesses. This simplified the HAXM driver implementation. However, decoding in QEMU is slow because QEMU needs to sync with the HAXM driver regarding the vCPU state, guest page tables, etc. Newer HAXM driver will decode some MMIO instructions, and QEMU will get the decoded instruction information like the physical address, access direction etc, and then invoke the MMIO handler directly. This boosts MMIO handling performance significantly, thus performance of 2D/3D games because they performance very frequent MMIO access for GLES commands to the host translator. Change-Id: Ida308b2e6da3697ee37a1b28a9645916e104d9ff Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
* | Add a HAXM interface for QEMU API versionJiang, Yunhong2012-04-077-0/+64
| | | | | | | | | | | | | | | | | | | | Add a HAXM interface so that QEMU can communicate its API version to HAXM. With this, HAXM can keep better backward compatibility, for example, masking of the new features if qemu does not support new features. Change-Id: I24c7c8d353653978f507739f6e53a9d389d06e43 Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* | 64-bit emulatorAndrew Hsieh2012-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch to allow emulator searches for emulator64-${ARCH} first on 64-bit OS. If none is found, the original behavior which searchs for 32-bit emulator-${ARCH} is performed as usual. 64-bit emulator (which still emulates Android built in 32-bit) offers up to 20% speedup compared to its 32-bit counterpart. Details: android/main-emulator.c 1) search emulator64 based on the OS 2) dlopen lib64OpenglRender in 64-bit Makefile.* 1) Rules to build 64-bit executable emulator64-{x86,arm} and libraries emulator64-{libui,libqemu,target-i386,target-arm,libelff,common} 2) remove -Wa,-32 3) Changes prebuit toolchain path android-configure.h android/build/common.h 1) no longer force 32-bit build (because now prebuilts/tools/gcc-sdk/gcc can now handle 64-bit 2) set ANDROID_PREBUILTS to correctly locate ccache android/config/*/config-host.h 1) Detect HOST_X86_64 and HOST_X86_64/HOST_I386 Misc 64-bit porting clean-up 1) use %zx to print variable of type size_t in hex 2) use %zu to print variable of type size_t in dec 3) Initialize query_parm to NULL 4) use PRIu64 to replace PDUd64 5) use PRId64/PRIu64/PRIX64 to print 64-bit 6) drop PRUx64 because PRIx64 does the same 7) cast pointer arith to intptr_t before casting to int 8) fixed 1ULL<<63 Change-Id: Ife62a20063a6ec38d4a9b23977e840af1fce149a
* | Merge "Check HAXM capability in QEMU"Jean-Baptiste Queru2012-02-237-1/+133
|\ \
| * | Check HAXM capability in QEMUJiang, Yunhong2012-02-237-1/+133
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking HAXM capability to check if emulator can use HAXM virtalization. Currently two possibility that HAXM not work. Firstly is VT/NX is not enabled in the system, seconly is HAXM have used up the memory quota. See code comemnts for the memry quota explaination. Checking the capability in advance can give user more information that why HAXM is not working and be more user friendly. Change-Id: I13f73734cf783398f485fabd19cce43364b571c3 Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Gao, Fengqian <fengqian.gao@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* | Fix the vmid issue in HAXJiang, Yunhong2012-02-234-7/+8
|/ | | | | | | | This patch is lost when submit the HAX patchset. Without this patch, only one emulator instance can use HAXM. Change-Id: Ia8e47ea471ae154036bb5721c51d6d099d9aff5f Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* New files to add HAX supportJun Nakajima2012-01-177-0/+2339
| | | | | | | | | | | | | | | QEMU emulator interacts with the HAX kernel module. A HAX (Hardware-based Accelerated eXecution) kernel module is required to use HAX support. Most guest instructions run in VMX non-root (i.e. in hardware) mode and achieve near-native (relative to the host) performance. QEMU still emulates PIO/MMIO instructions and non-PG (paging) mode operations. HAX is supported only on Mac OS X and Windows hosts when Intel VT is present. Change-Id: I8dd52a35e315437dc568f555742bb8ab7e9d8ab2 Signed-off-by: Zhang, Xiantao <xiantao.zhang@intel.com> Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
* Changes to existing files to add HAX supportJun Nakajima2012-01-172-0/+15
| | | | | | | | | | | | | | | HAX (Hardware-based Accelerated eXecution) employes hardware virtualization technology to boost performance of the Android emulator on Mac OS X or Windows hosts. This changeset includes the changes required to the existing files. To pass the compilation, hax.h is added, but CONFIG_HAX is disabled so that no real changes added. Change-Id: Ifa5777e8788e6698747c1ec4cd91315161c2ca0b Signed-off-by: Zhang, Xiantao <xiantao.zhang@intel.com> Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
* Fix signal handling for GS_RESTORE hackJiang Yunhong2012-01-121-34/+77
| | | | | | | | | | | | | | | | | | | | | | Currently we hack QEMU's signal handler because of the GS_BASE MSR KVM bug. The reason of the hack is, when signal happens during KVM_RUN ioctl, the GS_BASE is broken, we have to restore the correct gs before run the signal handler. However, currently we take signal even when signal is set as SIG_DFL/SIG_IGN, or the signal is set with SIG_SIGINFO. Currently "kill -13" to emulator causes emulator crash. This patch fixed it as: 1) If the signal handler is set as SIG_DFL or SIG_IGN, we don't take the signal 2) If the signal handler is set with SIG_SIGINFO, we will use sa_sigaction 3) Cover all potential signals One thing left is, if the signal handler is setup dynamically, this method may still have issue because currently the signal handlers are taken statically when first KVM_RUN ioctl. Luckily this does not happen now. Change-Id: Icfbe43db665a11f2b6eaf9593075b3e643783ee7 Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
* Restricting processor features in KVM modeMaciek Molerus2011-09-131-1/+8
| | | | | | | | | Some processors don't have full features set as in 'qemu32', eg. AMD doesn't have SSSE3 extensions yet. Added code which restricts CPU features set in KVM mode to those it actually has. Change-Id: I37c2d44a03e4445a607b723b0f63c91989c251dc
* tcg: integrate upstream versionDavid 'Digit' Turner2011-06-011-0/+3
| | | | Change-Id: Ifcdebc2e7179fbc64b46a9150e6dae62f86eba3c
* cpu_restore_state: remove un-necessary argument.David 'Digit' Turner2011-06-011-43/+43
| | | | Change-Id: I01cef0743cc9db9d21c2b7feb9f2a877ac4d2b35
* translate-all.c: minor integrateDavid 'Digit' Turner2011-06-011-4/+3
|
* integrate: qemu-common.h changesDavid 'Digit' Turner2011-06-011-73/+73
| | | | Change-Id: I4620b4560465ed105202332b59f91b708d91a525
* x86: Workaorund for the KVM GS_BASE MSR save/restore issue.Jun Nakajima2011-05-273-0/+177
| | | | | | | | | | In some versions of the kvm module in Ubuntu, the host's GS_BASE MSR is not save/restored correctly when running guests on 64-bit hosts if the qemu/emulator is 32-bit. This patch implements a workaround in the emulator code. Change-Id: If3ebe3cb49f377c5d0547c75f6ac3a3ceacdc375 Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* x86: kvm: fix KVM build + enable auto-detection.David 'Digit' Turner2011-05-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build of KVM support in the x86 emulator by copying official Ubuntu Lucid KVM headers into android/config/linux-*/ This removes the need to rely on the build machine's versions of these headers, which caused various issues. Also, by default, the emulator will now probe the system to see if it can start in KVM mode automatically. See android-kvm.c for details. You can see the result of the probing with the -verbose option. IMPORTANT NOTE: It looks like there is a bug in the KVM code when the emulator is built as a 32-bit binary, running on a 64-bit kernel, so we explicitely disable KVM when we detect this case. It's hard to tell whether this is a bug in QEMU or some versions of the KVM driver. As such, KVM only works when building the emulator as a 64-bit program. For now, this is only possible with "android-configure.sh --try-64", not the Android build system. + Add a new QEMU option (-disable-kvm) to explicitely disable KVM if needed. This is an addition to -enable-kvm which already exists (and forces usage of KVM). Change-Id: I6a397cae29ab62b1c56fce95c1ee75a4664d6688
* Minor cleanups for core/ui Makefile separation.David 'Digit' Turner2011-02-231-2/+2
| | | | | | | | | | | | | | | | This patch contains minor cleanups that will be needed by a few future patches that will improve the way core and ui sources are separated and built. - remove a few compiler warnings - formatting - remove the memcheck CONFIG_MEMCHECK checks (they later get in the way) - refine hw/hw.h inclusion's of cpu.h (this comes from upstream) - add missing definitions for PRUd64 and PRUx64 (used later) - remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead. - add missing strdup() calls. Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e
* x86: Add the SSSE3 feature to CPU emulation. Gcc can emit SSSE3Jun Nakajima2011-02-101-1/+1
| | | | | | | | instructions for optimization purposes. Change-Id: I33ece4f4655d50cbee7fc536ec1ac09218c0ad13 Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-091-2/+2
| | | | | | This fails to build on MacOS X This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
* Build arm and x86 binaries at the same time.David 'Digit' Turner2011-02-101-2/+2
| | | | Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
* New files are from the upstream QEMU (0.10.5), and the code is based onJun Nakajima2011-01-2913-0/+21095
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the following commit (dated 2009-06-19, see CHANGES.TXT): d2e9fd8f703203c2eeeed120b1ef6c3a6574e0ab new file: hw/apic.c new file: hw/fdc.h new file: hw/fw_cfg.c new file: hw/fw_cfg.h new file: hw/i8254.c new file: hw/i8259.c new file: hw/ioapic.c new file: hw/mc146818rtc.c new file: hw/ne2000.c new file: hw/pc.c new file: hw/pckbd.c new file: hw/piix_pci.c new file: hw/ps2.c new file: hw/ps2.h new file: hw/smbios.c new file: target-i386/TODO new file: target-i386/cpu.h new file: target-i386/exec.h new file: target-i386/helper.c new file: target-i386/helper.h new file: target-i386/helper_template.h new file: target-i386/kvm.c new file: target-i386/machine.c new file: target-i386/op_helper.c new file: target-i386/ops_sse.h new file: target-i386/ops_sse_header.h new file: target-i386/svm.h new file: target-i386/translate.c Change-Id: I55c62ed7516f002c882705545e7c21997ece9927
* Initial ContributionThe Android Open Source Project2008-10-2112-18889/+0
|
* external/qemu 0.8.2Upstream1970-01-1212-0/+18889