summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-24Fix error handling in qemu_read_config_fileKevin Wolf2-6/+10
We need to close the file even in error case. While at it, make the callers catch all kind of errors. ENOENT is allowed for default config files, they are optional. Reported-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24Virtio-net: Replace the hardcode 6 with defined ETN_ALENAmos Kong1-2/+2
hw/virtio-net.h: #define ETH_ALEN 6 ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24sdl: Do not disable screensaver by defaultJan Kiszka1-0/+4
Unless we are running in full-screen mode, QEMU's SDL window should not disable the host's screensaver. The user can still change this behaviour by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as desired. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori4-8/+48
2010-05-24Merge remote branch 'qmp/for-anthony' into stagingAnthony Liguori25-117/+143
2010-05-24microblaze: Handle new elf mach nr for sysemu.Edgar E. Iglesias1-0/+5
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-05-22lsi: Fix value overflow in request tag processingJan Kiszka1-2/+2
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrong patch version): We need to mask the tag value properly to obtain its device ID. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-22sparc64: flush translations on mmu context changeIgor V. Kovalenko1-0/+6
- two pairs of softmmu indexes bind softmmu tlb to cpu tlb in fault handlers using value of DMMU primary and secondary context registers, so we need to flush softmmu translations when context registers are changed Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22sparc64: fix mmu context at trap levels above zeroIgor V. Kovalenko3-8/+35
- cpu_mmu_index return MMU_NUCLEUS_IDX if trap level is not zero - cpu_get_tb_cpu_state: store trap level and primary context in flags this allows to restart code translation when address translation is changed - stop translation block after writing to pstate and tl registers - stop translation block after writing to alternate space this can be optimized to stop only if address translation can be changed by write operation (e.g. by comparing with MMU ASI values) Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22sparc64: fix dump_mmu to look for global bit in tte value instead of tagIgor V. Kovalenko1-2/+2
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22sparc64: fix pstate privilege bitsIgor V. Kovalenko4-36/+57
- refactor code to handle hpstate only if available for current cpu - conditionally set hypervisor bit in hpstate register - reorder softmmu indices so user accessable ones go first, translation context macros supervisor() and hypervisor() adjusted as well - disable sparcv8 registers for TARGET_SPARC64 - fix cpu_mmu_index to use sparcv9 bits only Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22sparc64: generate data access exception on RW violationIgor V. Kovalenko1-37/+62
- separate PRIV and PROT handling - DPRINTF_MMU macro to clean up debug code - dump mmu_idx, trap level and mmu context registers along with address translation values Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22sparc32 protect read-only bits in DMA CSR registersArtyom Tarasenko1-4/+8
On a real hardware changing read-only bits has no effect Use a mask common for SCSI and Ethernet registers. The crucial bit is DMA_INTR, because setting or clearing it may produce spurious interrupts. This patch allows booting Solaris 2.3 Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedcTeLeMan1-1/+0
cirrus_post_load() will be executed twice when loading vm states and then the wrong physical memory will be registered. This issue may lead to crash qemu. Signed-off-by: TeLeMan <geleman@gmail.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix -device help and documentationMarkus Armbruster1-9/+6
Commit 6616b2ad reverted commit 40ea285c. Looks like a mismerge to me. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix tarbin Makefile ruleStuart Brady1-34/+13
The 'tarbin' Makefile rule doesn't include qemu-system-sparc64, but should do, now that sparc64-softmmu is in the default target list. The rule attempts to tar up binaries that were not built if a target list was passed to the configure script -- in which case, it will either fail, or otherwise include binaries from previous builds. Fix both problems once and for all by building a list of binaries to include in the tarball, using the list of targets to be built. Signed-off-by: Stuart Brady <sdb@zubnet.me.uk> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22hxtool: Add syntax error detectionJan Kiszka1-1/+15
Add basic imbalance detection for STEXT/ETEXI. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix TEXI section mark imbalance in qemu-img-cmd.hxJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Put dependency files in proper subdirJan Kiszka1-1/+1
This seems to resolve subtle breakages of our build system: Dependency files generated for targets like 'dir/foo.o' were saved as 'foo.d'. Now, if there was also a target 'foo.o', one of the dependency file was overwritten. Concrete example: libhw*/macio.o vs. libhw*/ide/macio.o. And this often left a segfaulting build result behind when changing the "wrong" data structures". Fix it by generating proper 'dir/foo.d'. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Clean libhw subdirs as wellJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl14-60/+67
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile dma only onceBlue Swirl19-17/+83
Use a qemu_irq to request CPU exit. 7 compilations less for the full build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22pckbd: improve debuggingBlue Swirl1-13/+15
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile pckbd only onceBlue Swirl16-57/+88
Use a qemu_irq to indicate A20 line changes. Move I/O port 92 to pckbd.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-21linux-user: do not warn for missing pselect6Riku Voipio1-0/+4
Libc will fallback gracefully if pselect6 is not available. Thus put pselect6 to nowarn until the atomicity issues of the original pselect6 patch are dealt with. Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Cc: Michael Casadevall <mcasadevall@ubuntu.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-ia64: Load GUEST_BASE into a register.Richard Henderson1-44/+88
Saves one bundle per memory operation. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-ia64: Fix some register usage issues.Richard Henderson1-25/+42
(1) The output registers were not marked call-clobbered, even though they can be modified by called functions. (2) The thread pointer was not marked reserved. (3) R4-R6 are call-saved, but not saved by the prologue. Rather than save them, mark them reserved so that we don't use them. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-hppa: Load GUEST_BASE as an immediate.Richard Henderson1-8/+4
Now that the prologue is generated after GUEST_BASE is fixed, we can load it as an immediate, and also avoid reserving the register if it isn't necessary. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg: Initialize the prologue after GUEST_BASE is fixed.Richard Henderson5-2/+25
This will allow backends to make intelligent choices about how to implement GUEST_BASE. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix sigprocmask.Richard Henderson2-5/+43
Alpha passes oldset by value in a register, and returns the newset as the return value; as compared to the standard implementation in which both are passed by reference. This requires being able to distinguish negative return values that are not errors. Do this in the same way as the Alpha Linux kernel, by storing a zero in V0 in the implementation of the syscall. At the same time, fix a think-o in the regular sigprocmask path in which we passed the target, rather than the host, HOW value. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix sigsuspend parameters.Richard Henderson1-0/+5
Alpha passes the signal set in a register, not by reference. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix getxpid.Richard Henderson1-3/+8
Put ppid in the second return register. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix pipe return mechanism.Richard Henderson1-12/+18
At the same time, tidy the code wrt MIPS and SH4 which have the same two register return mechanism. Fix confusion between pipe and pipe2 with an explicit flags=0, when the guest will not be using the two register return mechanism. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Add correct sigaction constants.Richard Henderson1-0/+8
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix siginfo.si_addr for SIGSEGV and SIGBUS.Richard Henderson1-2/+2
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21alpha-linux-user: Fix brk error return.Richard Henderson1-2/+10
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Nuke trailing whitespace.Richard Henderson1-22/+22
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Use lea for three-operand add.Richard Henderson1-3/+20
The result is shorter than the mov+add that TCG would otherwise generate for us. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy lea.Richard Henderson1-31/+60
Implement full modrm+sib addressing mode processing. Use that in qemu_ld/st to output the LEA. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy xchg.Richard Henderson1-1/+3
Define and use OPC_XCHG_ax_r32. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy multiply.Richard Henderson1-3/+6
Define and use OPC_IMUL_GvEv{,Ib,Iz}. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy unary arithmetic.Richard Henderson1-13/+25
Define OPC_GRP3 and EXT3_FOO to match. Use them instead of bare constants. Define OPC_GRP5 and rename the existing EXT_BAR to EXT5_BAR to make it clear which extension should be used with which opcode. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy setcc.Richard Henderson1-2/+2
Define and use OPC_SETCC. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy ret.Richard Henderson1-1/+2
Define and use OPC_RET. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy calls.Richard Henderson1-22/+27
Define OPC_CALL_Jz, generated by tcg_out_calli; use the later throughout. Unify the calls within qemu_st; adjust the stack with a single pop if applicable. Define and use EXT_CALLN_Ev for indirect calls. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy push/pop.Richard Henderson1-18/+30
Move tcg_out_push/pop up in the file so that they can be used by qemu_ld/st. Define a tcg_out_pushi to be used as well. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy movi.Richard Henderson1-1/+2
Define and use OPC_MOVL_Iv. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy non-immediate arithmetic operations.Richard Henderson1-30/+48
Add more OPC values, and tgen_arithr. Use the later throughout. Note that normal reg/reg arithmetic now uses the Gv,Ev opcode form instead of the Ev,Gv opcode form used previously. Both forms disassemble properly, and so there's no visible change when diffing log files before and after the change. This change makes the operand ordering within the output routines more natural, and avoids the need to define an OPC_ARITH_EvGv since a read-modify-write with memory is not needed within TCG. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy immediate arithmetic operations.Richard Henderson1-16/+10
Define OPC_ARITH_EvI[bz]; use throughout. Use tcg_out_ext8u directly in setcond. Use tgen_arithi in qemu_ld/st. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21tcg-i386: Tidy ext8s and ext16s operations.Richard Henderson1-11/+24
Define OPC_MOVSBL and OPC_MOVSWL. Factor opcode emission to separate functions. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>