summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-02-09add qemu_get_clock_nsPaolo Bonzini2-2/+20
Some places use get_clock directly because they want to access the rt_clock with nanosecond precision. Add a function to do exactly that instead of using internal interfaces. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-09Remove unused codeLiran Schour1-43/+18
blk_mig_save_bulked_block is never called with sync flag. Remove the sync flag. Calculate bulk completion during blk_mig_save_bulked_block. Remove unused constants. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-09kvm: move kvm to use memory notifiersMichael S. Tsirkin3-30/+35
remove direct kvm calls from exec.c, make kvm use memory notifiers framework instead. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-09kvm: move kvm_set_phys_mem aroundMichael S. Tsirkin1-138/+138
move kvm_set_phys_mem so that it will be later available earlier in the file. needed for next patch using memory notifiers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-09qemu: memory notifiersMichael S. Tsirkin2-3/+129
This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down the road, kvm code can be switched to use these as well, instead of calling kvm code directly from exec.c as is done now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-09tcg/mips: fix crash in tcg_out_qemu_ld()Aurelien Jarno1-2/+2
The address register is overriden when it corresponds to v0 and the fast path is taken, which leads to a crash. Fix that by using the a0 register instead. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: separate execute and read/write permissionsAurelien Jarno1-21/+6
On SH4, the ITLB and UTLB configurations are memory mapped, so loading ITLB entries from UTLB has to be simulated correctly. For that the QEMU TLB has to be handle the execute (ITLB) and read/write permissions (UTLB) seperately. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: fix store queue addressesAurelien Jarno1-1/+1
The store queues are located from 0xe0000000 to 0xe3ffffff. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: remove dead codeAurelien Jarno1-18/+0
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: reduce the size of a TLB entryAurelien Jarno1-12/+11
Reduce the size of the TLB entry from 32 to 16 bytes, reorganising members and using a bit field. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: optimize UTLB accessesAurelien Jarno1-24/+14
With the current code, the QEMU TLB is setup to match the read/write mode of the MMU fault. This means when read access is done, the page is setup in read-only mode. When the page is later accessed in write mode, an MMU fault happened, and the page is switch in write-only mode. This flip-flop causes a lot of calls to the MMU code and slow down the emulation. This patch changes the MMU emulation, so that the QEMU TLB is setup to match the UTLB protection key. This impressively increase the speed of the emulation. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: fix ITLB priviledge checkAurelien Jarno1-1/+1
There is an ITLB access violation if SR_MD=0 (user mode) while the high bit of the protection key is 0 (priviledge mode). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: simplify call to tlb_set_page()Aurelien Jarno1-6/+3
tlb_set_page() doesn't need addresses with offset, but simply the page aligned addresses. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09target-sh4: MMU: fix mem_idx computationAurelien Jarno1-1/+1
The mem_idx is wrongly computed. As written in target-sh4/cpu.h, mode 0 corresponds to kernel mode (SR_MD = 1), while mode 1 corresponds to user mode (SR_MD = 0). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09sh7750: handle MMUCR TI bitAurelien Jarno3-2/+25
When the MMUCR TI bit is set, all the UTLB and ITLB entries should be flushed. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-09tcg/mips: implement setcond2Aurelien Jarno1-12/+80
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08Merge remote branch 'linux-user/linux-user-for-upstream' into staging-tmpAnthony Liguori0-0/+0
2010-02-08Merge remote branch 'qemu-kvm/uq/master' into staging-tmpAnthony Liguori8-17/+49
2010-02-08tcg/mips: implement setcondAurelien Jarno1-0/+65
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08configure: fix the static compilation for sdlTeLeMan1-2/+5
The static compilation for sdl is broken after 79427693174a553d62f3da44aacd3f19ba8df3a7. Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08configure: Add --enable-docs and --disable-docs to --helpDirk Ullrich1-0/+2
This patch adds the documentation-related options "--enable-docs" and "--disable-docs" to the help message of "configure". Signed-off-by: Dirk Ullrich <dirk.ullrich@googlemail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08target-sh4: minor optimisationsAurelien Jarno1-26/+26
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08SH4/R2D: fix poweroffAurelien Jarno1-4/+5
The write the the PA_POWOFF register is currently ignored. Fix that by calling qemu_system_shutdown_request() when a poweroff is requested. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08tcg: move setcond* ops to non-optional sectionAurelien Jarno1-35/+37
setcond is not an optional op, move it to the non-optional section. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08tcg: add setcondi pseudo-opAurelien Jarno1-0/+18
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-08block/curl: %Z is not a valid conversion specifiermalc1-1/+1
Signed-off-by: malc <av1474@comtv.ru>
2010-02-08vl.c: avoid preprocessor directives in a printf callPaolo Bonzini2-10/+12
Similar to the qemu-img.c patch, but I also have to unescape remaining % signs in qemu-options.hx. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-02-08do not interpolate % from vl.c to qemu-options.hPaolo Bonzini2-13/+7
Since qemu-options.h is only used in vl.c, we can avoid using brittle interpolation from a generated file. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-02-08cope with printf macro definition in readline.cPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-02-08qemu-img: avoid preprocessor directives in a printf callPaolo Bonzini1-4/+5
Other choices include using "(printf)", but this one is not bad in terms of readability. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2010-02-08Revert "On some systems printf is a macro"malc3-52/+48
This reverts commit bc5b6004588ad17370e0416e40b4aa9cf977023b.
2010-02-07dec: actually implement PCI bridgingBlue Swirl2-0/+28
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07esp: use CamelCaseFunc for function typesBlue Swirl2-7/+7
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fw_cfg: don't use reserved _ prefixBlue Swirl2-3/+3
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fdc: don't use reserved _ prefixBlue Swirl1-6/+6
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07fdc: don't use reserved _t suffixBlue Swirl4-192/+190
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07escc: don't use reserved _t suffixBlue Swirl1-4/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07m48t59: don't use reserved _t suffixBlue Swirl5-55/+52
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-07tcg/ppc64: implement setcondmalc1-0/+133
Signed-off-by: malc <av1474@comtv.ru>
2010-02-07tcg/ppc32: proper setcond implementationmalc1-25/+25
Signed-off-by: malc <av1474@comtv.ru>
2010-02-07tcg/ppc32: implement setcond[2]malc1-14/+157
Signed-off-by: malc <av1474@comtv.ru>
2010-02-07On some systems printf is a macromalc3-48/+52
Signed-off-by: malc <av1474@comtv.ru>
2010-02-07Do not use dprintfmalc14-204/+204
dprintf is already claimed by POSIX[1], and on at least one system is implemented as a macro [1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html Signed-off-by: malc <av1474@comtv.ru>
2010-02-06arm host: fix compiler warningStefan Weil2-27/+0
Compilation for arm (native or cross) results in this warning: fpu/softfloat-native.c: In function ‘float64_round_to_int’: fpu/softfloat-native.c:387: error: control reaches end of non-void function float64_round_to_int uses special assembler code for arm and has no explicit return value. As there is no obvious reason why arm should need special code, all fpu related conditionals were removed. The remaining code is standard (C99) and compiles for arm, too. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg-i386: Implement setcond.Richard Henderson1-3/+70
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg-i386: Implement small forward branches.Richard Henderson2-38/+81
There are places, like brcond2, where we know that the destination of a forward branch will be within 127 bytes. Add the R_386_PC8 relocation type to support this. Add a flag to tcg_out_jxx and tcg_out_brcond* to enable it. Set the flag in the brcond2 label_next branches; pass along the input flag otherwise. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06Add -static earlier to LDFLAGS for compile_prog()Loïc Minier1-2/+3
Add -static to LDFLAGS earlier as to run the compile_prog() tests with this flags, this will avoid turning on features for which a shared library is available but not a static one. Signed-off-by: Loïc Minier <lool@dooz.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06Fix missing symbols in .rel/.rela.plt sectionsLoïc Minier2-4/+28
Fix .rel.plt sections in the output to not only include .rel.plt sections from the input but also the .rel.iplt sections and to define the hidden symbols __rel_iplt_start and __rel_iplt_end around .rel.iplt as otherwise we get undefined references to these when linking statically to a multilib libc.a. This fixes the static build under i386. Apply similar logic to rela.plt/.iplt and __rela_iplt/_plt_start/_end to fix the static build under amd64. Signed-off-by: Loïc Minier <lool@dooz.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06configure: remove debugging code introduced in ↵Aurelien Jarno1-3/+0
aa527b65d8187b97d73f889b6cae7b6ac6f82d32 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06configure: fix compilation on hosts without -fstack-protector-allAurelien Jarno1-2/+5
Commit a0f291fc101a7ab3e40850a329da2cc2f2cd1f2d has enabled -fstack-protector-all on all targets, as the configure test is bogus. GCC only emits a warning and not an error if this option is not supported, so the configure scripts doesn't detect the problem. This patch changes the configure script to try the various flags with -Werror in addition to catch the possible warnings. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>