summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-01-15sparc32 do_unassigned_access overhaul v2Artyom Tarasenko1-12/+30
According to pages 9-31 - 9-34 of "SuperSPARC & MultiCache Controller User's Manual": 1. "A lower priority fault may not overwrite the MFSR status of a higher priority fault." 2. The MFAR is overwritten according to the policy defined for the MFSR 3. The overwrite bit is asserted if the fault status register (MFSR) has been written more than once by faults of the same class 4. SuperSPARC will never place instruction fault addresses in the MFAR. Implementation of points 1-3 allows booting Solaris 2.6 and 2.5.1. v2: CODING_STYLE fixes Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-15tcg/x86_64: Avoid unnecessary REX.B prefixes.Richard Henderson1-16/+30
The existing P_REXB internal opcode flag unconditionally emits the REX prefix. Technically it's not needed if the register in question is %al, %bl, %cl, %dl. Eliding the prefix requires splitting the P_REXB flag into two, in order to indicate whether the byte register in question is in the REG or the R/M field. Within TCG, the byte register is in the REG field only for stores. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-15nand: Correct random data reads.Edgar E. Iglesias1-7/+13
Random reading depends on having the last row/page latched and not beeing clobbered between read and any following random reads. Also, s->iolen must be updated when loading the io/data register with randomly accessed flash data. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-14Makefile: Fix message for missing configureStefan Weil1-0/+2
When make is called without a valid configuration, it should tell the user what to do. Revision 0e8c9214ba1d4128cf92442cd343bc3733478261 was a regression which resulted in a message which was no longer user friendly (reported by Aurelien Jarno). This patch restores the old behaviour. Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Andreas Färber <afaerber@opensolaris.org> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-14target-m68k: fix a typo in 'P' packet processingKazu Hirata1-1/+1
Attached is a patch to fix a typo in 'P' packet processing for M68K. Without this patch, QEMU fails to honor GDB's P packets from GDB (writing to registers) for the address registers (A0 - A7). The problem is because of an obvious typo. Notice that the second "if" condition is meant to be n < 16 in: if (n < 8) { : } else if (n < 8) { Signed-off-by: Kazu Hirata <kazu@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-14tcg/x86_64: Special-case all 32-bit AND operands.Richard Henderson1-18/+8
This avoids an unnecessary REX.W prefix when dealing with AND operands that fit into a 32-bit quantity. The most common change actually seen is movz[wb]q -> movz[wb]l. Similarly, avoid REXW in ext{8,16}u_i64 tcg opcodes. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-14sh: sm501: Add hardware cursor featureShin-ichiro KAWASAKI2-11/+185
This patch adds hardware cursor feature to SM501 graphics chip emulation, to make the graphic console more useful for QEMU SH4 users. Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-14alpha: fix stat64 issueVince Weaver1-1/+1
The stat64/fstat64 syscalls are broken for alpha linux-user. This is because Alpha, even though it is native 64-bits, has a stat64 syscall that is different than regular stat. This means that the "TARGET_LONG_BITS==64" check in syscall.c isn't enough. Below is a patch that fixes things for me, although it might not be the cleanest fix. This issue keeps sixtrack and fma3d spec2k benchmarks from running. Signed-off-by: Vince Weaver <vince@csl.cornell.edu> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-01-14ppc-40x: Correct ESR for zone protection faults.Edgar E. Iglesias1-5/+18
Raise the zone protection fault in ESR for TLB faults caused by zone protection bits. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-14ppc-40x: Correct decoding of zone protection bits.Edgar E. Iglesias1-1/+1
The 40x MMU has 15 zones in the ZPR register. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-14ppc-40x: Correct check for Endian swapping TLB entries.Edgar E. Iglesias1-5/+7
Bailout on 40x TLB entries with endianess swapping only if the entry is valid. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-14ppc-40x: Get TLB attributes from TLBLO.Edgar E. Iglesias1-1/+1
The ZSEL was incorrectly beeing decoded from TLBHI. Decode it from TLBLO instead. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-13docs: New qdev-device-use.txtMarkus Armbruster1-0/+353
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13Qemu's internal TFTP server breaks lock-step-iness of TFTPMilan Plzik1-0/+1
According to RFC 1350 and RFC 2347, TFTP server should answer RRQ by either OACK or DATA packet. Qemu's internal TFTP server answers RRQ with additional options by sending both OACK and DATA packet, thus breaking the "lock-step" feature of the protocol, and also confuses client. Proposed solution would be to, in case of OACK packet, wait for ACK from client and just then start sending data. Attached patch implements this. Signed-off-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13Add KVM paravirt cpuid leafGleb Natapov3-11/+89
Initialize KVM paravirt cpuid leaf and allow user to control guest visible PV features through -cpu flag. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13virtio-blk: remove dead variable in virtio_blk_handle_scsiChristoph Hellwig1-4/+1
As pointed out by clang size is only ever written to, but never actually used. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13qcow/qcow2: implement bdrv_aio_flushKevin Wolf2-0/+18
Now that we do not have to flush the backing device anymore implementing the bdrv_aio_flush method for image formats is trivial. [hch: forward ported to qemu mainline from a product tree] Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13block: flush backing_hd in the right placeChristoph Hellwig1-10/+7
The backing device is only modified from bdrv_commit. So instead of flushing it every time bdrv_flush is called for the front-end device only flush it after we're written data to it in bdrv_commit. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13json-parser: remove dead incrementAmit Shah1-2/+0
clang-analyzer points out a redundant increment. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13qcow2-refcount: remove dead assignmentAmit Shah1-1/+0
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13hw/vga.c: remove dead assignmentAmit Shah1-1/+0
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13x86: translate.c: remove dead assignmentAmit Shah1-2/+0
clang-analyzer points out a redundant assignment. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13virtio: net: remove dead assignmentAmit Shah1-1/+1
clang-analyzer points out value assigned to 'len' is not used. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13vl.c: Remove dead assignmentAmit Shah1-5/+1
clang-analyzer pointed out the value of 'sockets' is never reused. Signed-off-by: Amit Shah <amit.shah@redhat.com> CC: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13osdep.c: Fix accept4 fallbackKevin Wolf1-1/+1
Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older than the kernel of the build system. Unfortunately, v1 was committed instead of v2, so the code has a bug that was revealed in the review (checking for the wrong error code). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13qemu-img rebaseKevin Wolf2-0/+231
This adds a rebase subcommand to qemu-img which allows to change the backing file of an image. In default mode, both the current and the new backing file need to exist, and after the rebase, the COW image is guaranteed to have the same guest visible content as before. To achieve this, old and new backing file are compared and, if necessary, data is copied from the old backing file into the COW image. With -u an unsafe mode is enabled that doesn't require the backing files to exist. It merely changes the backing file reference in the COW image. This is useful for renaming or moving the backing file. The user is responsible to make sure that the new backing file has no changes compared to the old one, or corruption may occur. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13block: Add bdrv_change_backing_fileKevin Wolf4-0/+126
Introduce the functions needed to change the backing file of an image. The function is implemented for qcow2. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13block: Introduce BDRV_O_NO_BACKINGKevin Wolf3-3/+4
If an image references a backing file that doesn't exist, qemu-img info fails to open this image. Exactly in this case the info would be valuable, though: the user might want to find out which file is missing. This patch introduces a BDRV_O_NO_BACKING flag to ignore the backing file when opening the image. qemu-img info is the first user and provides info now even if the backing file is invalid. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13move kbd/mouse handling to input.cPaolo Bonzini3-213/+241
Move 200 lines out of vl.c already into common code that only needs to be compiled once. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13use pkg-config for libcurl whenever availablePaolo Bonzini1-2/+8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13use pkg-config for sdl whenever availablePaolo Bonzini1-4/+10
Together with the first patch this enables using the prefixed pkg-config, thus picking up the correct flags for SDL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13fixes to the static compilation case for sdlPaolo Bonzini1-3/+3
After the next commit, pkg-config could be used for the shared library configuration case and sdl-config for static libraries. So I prepare the test here by doing two changes: at the same time I remove useless backslashes from the invocation of grep; 1) fixing a typo ($sd_cflags). The typo has been there since commit 1ac88f2 (remove sdl_static. Just do the right thing if static is yes, 2009-07-27). 2) fixing an erroneous "test `... | grep > /dev/null`" idiom that would never succeed since grep's output would be empty; 3) checking the status code after executing sdl-config --static --libs; this is needed for the next patch only. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13use cross-prefix for pkgconfigPaolo Bonzini1-5/+14
Since pkgconfig can give different output for different targets, it should be tried with the cross-compilation prefix first. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13pcnet: remove dead nested assignment, spotted by clangBlue Swirl1-1/+1
Although the value stored to 'addr' is used in the enclosing expression, the value is never actually read from 'addr'. Probably a typo. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13Sparc32: remove dead increment, spotted by clangBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13Sparc32: remove a variable used only for debugging to avoid a clang warningBlue Swirl1-3/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13Sparc: comment out unused variable, spotted by clangBlue Swirl1-2/+2
The variable is_annulled is referenced in a FIXME comment, so instead of removing the variable, comment out the lines so that the FIXME can be understood. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13Sparc32: remove unused env/envs variables, spotted by clangBlue Swirl1-10/+5
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13Sparc32: remove unused variable, spotted by clangBlue Swirl1-5/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13pci: Add missing 'const' in argument to pci_get_xxxStefan Weil1-7/+7
pci_get_byte, pci_get_word, pci_get_long and pci_get_quad all take a const uint8_t pointer, because they only read the configuration data. Their prototypes should reflect this fact. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-01-13eepro100: Update ROM file supportStefan Weil1-10/+1
Use new way to associate ROM files to devices. Currently, there is only a ROM file for i82559er included in QEMU, so the patch does not add .romfile for the other devices. When flexible mode is fixed in eepro100, adding more ROM files will be possible. It should be possible to create them from pxe-i82559er.bin, because etherboot uses the same driver for all eepro100 devices (only PCI ids differ). Maybe it is even possible to create a single pxe-i8255x.bin which supports all eepro100 devices (not supported with current etherboot). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-01-13eepro100: Fix initial value for PCI_STATUSStefan Weil1-3/+1
The numerical value was wrong (0x2800 instead of 0x0280) which indeed did not make sense. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-01-13Workaround for broken OSS_GETVERSION on FreeBSD, part twoJuergen Lock1-4/+26
Turns out on those versions of FreeBSD (>= 7.x) that know OSS_GETVERSION the ioctl doesn't actually work yet (except in the Linuxolator), so if building on FreeBSD assume the sound drivers are new enough if the ioctl returns the errno it does currently on FreeBSD. (Rev 2 after private discussion with malc.) Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: malc <av1474@comtv.ru>
2010-01-12virtio-net: mac property is mandatoryMichael S. Tsirkin2-1/+2
Mac feature bit isn't going to work as all network cards already have a 'mac' property to set the mac address. Remove it from mask and add in get_features. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-12kvm: Detect availability of kvm_para.hJan Kiszka1-0/+11
Will be required for upcoming KVM cpuid leaf. Host kernels >= 2.6.32 as well as future kvm-kmod releases (more recent than kvm-kmod-2.6.32.3) do/will provide them. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-12kvm: Use kvm-kmod headers if availableJan Kiszka1-1/+1
Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM kernel headers. Use it when available and not overruled by --kerneldir. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-12monitor: fix dead assignment spotted by clangBlue Swirl1-2/+1
Value stored to 'nb_per_line' is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-12Sparc64: Fix PCI config accessor orderBlue Swirl1-4/+4
Fix by Igor Kovalenko. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-12tcg-sparc: Implement ext32[su]_i64Richard Henderson2-0/+21
The 32-bit right-shift instructions is defined to extend the shifted output to 64-bits. A shift count of zero therefore is a simple extension without actually shifting. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-12tcg-sparc: Implement division properly.Richard Henderson2-30/+55
The {div,divu}2 opcodes are intended for systems for which the division instruction produces both quotient and remainder. Sparc is not such a system. Indeed, the remainder must be computed as quot = a / b rem = a - (quot * b) Split out a tcg_out_div32 function that properly initializes Y with the extension of the input to 64-bits. Discard the code that used the 64-bit DIVX on sparc9/sparcv8plus without extending the inputs to 64-bits. Implement remainders in terms of division followed by multiplication. Signed-off-by: Richard Henderson <rth@twiddle.net> [blauwirbel@gmail.com: applied rth's typo fix in tcg_out_div32] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>