eepro100: Fix multicast support
This patch is a step to synchronize my maintainer versionof eepro100.c (git://repo.or.cz/qemu/ar7.git) with the...
rtl8139: fix clang reporting unused assignment of VLAN tagging data
Currently we do not implement VLAN tagging for rtl8139(C+),still data is read from ring buffer headers.
- augment unused assignment with TODO item- cast txdw1 to void for now
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
remove dead code from target-i386/exec.h
These are unused since edea5f0 (no need to define global registers incpu-exec.c, 2008-05-10).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kill regs_to_env and env_to_regs
eepro100: Restructure code (new function tx_command)
Handling of transmit commands is rather complex,so about 80 lines of code were moved from functionaction_command to the new function tx_command.
The two new values "tx" and "cb_address" in theeepro100 status structure made this possible without...
Sparc32: Update OpenBIOS image to r666
Fixes the boot problem introduced by r665 image in694b9309462f07307d16f492961f01271f10c245.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc: improve CPU register dump
Common: * Remove unnecessary 0x prefix * Print %y * Fix NZVC flag print order to match CPU bit order
Sparc64 specific: * Print registers without line wrapping * Print %f40-%f63 * Pretty print CCR flags * Print %fsr and %fprs in full precision...
fix linux-user microblaze ELF_ARCH definition
Signed-off-by: Mike Frysinger <vapier@gentoo.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
audio: include more information into audio_bug's output
Signed-off-by: malc <av1474@comtv.ru>
Revert "sdlaudio: make it suck less"
This reverts commit 4839abe78fd466a3cf06faa7c362154afd5404f1.
The commit was badly broken, Gentoo has sdl as the default driver,consequently 5 gentoo users have hit the breakage and were kind enoughto report, so thank you:...
Sparc32: improve DMA controller IRQ debugging
ESP: improve IRQ debugging
sparc32 do not clear interrupts when masking
Update Sparc OpenBIOS images to r665
sparc32 do_unassigned_access overhaul v2
According to pages 9-31 - 9-34 of "SuperSPARC & MultiCache ControllerUser'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...
tcg/x86_64: Avoid unnecessary REX.B prefixes.
The existing P_REXB internal opcode flag unconditionally emitsthe REX prefix. Technically it's not needed if the register inquestion is %al, %bl, %cl, %dl.
Eliding the prefix requires splitting the P_REXB flag into two,...
nand: Correct random data reads.
Random reading depends on having the last row/page latched and not beeingclobbered between read and any following random reads.
Also, s->iolen must be updated when loading the io/data register withrandomly accessed flash data....
Makefile: Fix message for missing configure
When make is called without a valid configuration,it should tell the user what to do.
Revision 0e8c9214ba1d4128cf92442cd343bc3733478261was a regression which resulted in a messagewhich was no longer user friendly...
target-m68k: fix a typo in 'P' packet processing
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...
tcg/x86_64: Special-case all 32-bit AND operands.
This avoids an unnecessary REX.W prefix when dealing with ANDoperands that fit into a 32-bit quantity. The most common changeactually seen is movz[wb]q -> movz[wb]l.
Similarly, avoid REXW in ext{8,16}u_i64 tcg opcodes....
sh: sm501: Add hardware cursor feature
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>
alpha: fix stat64 issue
The stat64/fstat64 syscalls are broken for alpha linux-user.
This is because Alpha, even though it is native 64-bits, has a stat64syscall that is different than regular stat. This means that the"TARGET_LONG_BITS==64" check in syscall.c isn't enough. Below is...
ppc-40x: Correct ESR for zone protection faults.
Raise the zone protection fault in ESR for TLB faults caused byzone protection bits.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
ppc-40x: Correct decoding of zone protection bits.
The 40x MMU has 15 zones in the ZPR register.
ppc-40x: Correct check for Endian swapping TLB entries.
Bailout on 40x TLB entries with endianess swapping only if the entryis valid.
ppc-40x: Get TLB attributes from TLBLO.
The ZSEL was incorrectly beeing decoded from TLBHI. Decode it fromTLBLO instead.
Add KVM paravirt cpuid leaf
Initialize KVM paravirt cpuid leaf and allow user to control guestvisible PV features through -cpu flag.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Qemu's internal TFTP server breaks lock-step-iness of TFTP
According to RFC 1350 and RFC 2347, TFTP server should answer RRQ byeither OACK or DATA packet. Qemu's internal TFTP server answers RRQ withadditional options by sending both OACK and DATA packet, thus breaking...
docs: New qdev-device-use.txt
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: Introduce BDRV_O_NO_BACKING
If an image references a backing file that doesn't exist, qemu-img info failsto 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...
block: Add bdrv_change_backing_file
Introduce the functions needed to change the backing file of an image. Thefunction is implemented for qcow2.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-img rebase
This adds a rebase subcommand to qemu-img which allows to change the backingfile of an image.
In default mode, both the current and the new backing file need to exist, andafter the rebase, the COW image is guaranteed to have the same guest visible...
osdep.c: Fix accept4 fallback
Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is olderthan the kernel of the build system. Unfortunately, v1 was committed instead ofv2, so the code has a bug that was revealed in the review (checking for the...
vl.c: Remove dead assignment
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>
virtio: net: remove dead assignment
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>
x86: translate.c: remove dead assignment
clang-analyzer points out a redundant assignment.
hw/vga.c: remove dead assignment
qcow2-refcount: remove dead assignment
json-parser: remove dead increment
clang-analyzer points out a redundant increment.
block: flush backing_hd in the right place
The backing device is only modified from bdrv_commit. So instead offlushing it every time bdrv_flush is called for the front-end deviceonly flush it after we're written data to it in bdrv_commit.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
qcow/qcow2: implement bdrv_aio_flush
Now that we do not have to flush the backing device anymore implementingthe 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>...
virtio-blk: remove dead variable in virtio_blk_handle_scsi
As pointed out by clang size is only ever written to, but never actuallyused.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
use cross-prefix for pkgconfig
Since pkgconfig can give different output for different targets,it should be tried with the cross-compilation prefix first.
fixes to the static compilation case for sdl
After the next commit, pkg-config could be used for the shared libraryconfiguration case and sdl-config for static libraries. So I preparethe test here by doing two changes:
at the same time I remove useless backslashes from the invocation of...
use pkg-config for sdl whenever available
Together with the first patch this enables using the prefixedpkg-config, thus picking up the correct flags for SDL.
use pkg-config for libcurl whenever available
move kbd/mouse handling to input.c
Move 200 lines out of vl.c already into common code that only needs tobe compiled once.
pcnet: remove dead nested assignment, spotted by clang
Although the value stored to 'addr' is used in the enclosing expression,the value is never actually read from 'addr'.
Probably a typo.
Sparc32: remove dead increment, spotted by clang
Sparc32: remove a variable used only for debugging to avoid a clang warning
Sparc: comment out unused variable, spotted by clang
The variable is_annulled is referenced in a FIXME comment, so insteadof removing the variable, comment out the lines so that the FIXMEcan be understood.
Sparc32: remove unused env/envs variables, spotted by clang
Sparc32: remove unused variable, spotted by clang
pci: Add missing 'const' in argument to pci_get_xxx
pci_get_byte, pci_get_word, pci_get_long and pci_get_quadall take a const uint8_t pointer, because they only readthe configuration data.
Their prototypes should reflect this fact.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
eepro100: Update ROM file support
Use new way to associate ROM files to devices.
Currently, there is only a ROM file for i82559erincluded in QEMU, so the patch does not add.romfile for the other devices.
When flexible mode is fixed in eepro100, adding...
eepro100: Fix initial value for PCI_STATUS
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>
Workaround for broken OSS_GETVERSION on FreeBSD, part two
Turns out on those versions of FreeBSD (>= 7.x) that know OSS_GETVERSIONthe ioctl doesn't actually work yet (except in the Linuxolator), so ifbuilding on FreeBSD assume the sound drivers are new enough if the ioctl...
kvm: Use kvm-kmod headers if available
Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVMkernel 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>
kvm: Detect availability of kvm_para.h
Will be required for upcoming KVM cpuid leaf. Host kernels >= 2.6.32 aswell 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>...
virtio-net: mac property is mandatory
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 inget_features.
Reported-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
monitor: fix dead assignment spotted by clang
Value stored to 'nb_per_line' is never read.
Sparc64: Fix PCI config accessor order
Fix by Igor Kovalenko.
tcg-sparc: Implement ext32[su]_i64
The 32-bit right-shift instructions is defined to extend the shiftedoutput to 64-bits. A shift count of zero therefore is a simpleextension without actually shifting.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
tcg-sparc: Implement division properly.
The {div,divu}2 opcodes are intended for systems for which thedivision instruction produces both quotient and remainder. Sparcis not such a system. Indeed, the remainder must be computed as
quot = a / b rem = a - (quot * b)...
tcg-sparc: Do not remove %o012 from 'r' constraint.
Only 'L' constraint needs that.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg-sparc: Implement add2, sub2, mulu2.
Add missing 32-bit double-word support opcodes.
tcg-sparc: Add tcg_out_arithc.
Add a function to handle the register-vs-immediate test for arithmetic.
Also, adjust the OP_32_64 macro so that it auto-indents properly.Rename the gen_arith32 label to gen_arith, since it handles 64-bitarithmetic as well....
QMP: Don't free async event's 'data'
The monitor_protocol_event() function will free theevent's data, this is wrong as 'data' management is upto the caller.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: fix thinko leading to guest crashes
Without this fix, guest crashes with drive=virtio.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc_refresh: return if vd->timer is NULL
Hi all,calling vnc_update_client in vnc_refresh might have the unlikely sideeffect of setting vd->timer = NULL, if the last vnc client disconnected.In this case we have to return from vnc_refresh without updating the...
dma/sb16: make clang analyzer not complain
Sparc64: enable real access to PCI configuration space
Leave the bogus access method used by OpenBIOS in place for now.
virtio-pci: thinko fix
Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio willsometimes clear all status registers on bus master disable, which losesinformation such as VIRTIO_CONFIG_S_FAILED bit. This is a result ofa patch being misapplied: code uses ! instead of ~ for bit...
dmg: fix ->open failure
Currently the dmg image format driver simply opens the images as rawif any kind of failure happens. This is contrarty to the behaviourof all other image formats which just return an error and let theblock core deal with it.
Handle TFTP ERROR from client
If a PXE client only wants to find out the size of a file, it willopen the file and then abort the transfer by sending a TFTP ERROR packet.
The ERROR packet should cause qemu to terminate the session. If not,the sessions will soon run out and cause timeouts in the client....
pc: add machine type for 0.12
Add a new machine type for qemu 0.12.
Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabledafter the 0.11 release, so turn it off in the 0.11 machine type.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
roms: minor fixes and cleanups.
Changes: - Drop extra file argument from rom_add_file(). - Drop fw_dir check in do_info_roms, we allways have a dir name. - code style fixes.
fw_cfg: rom loader tweaks.
Changes: - make dir argument mandatory, we allways have one anyway (vgaroms or genroms). - check for duplicates, skip loading if found.
roms: rework rom loading via fw
This patch changes the way rom loading via fw_cfg is handled.Instead of having pc_init1() call a function which passed allroms to the firmware config we simply pass a pointer to fw_cfgto the rom loader.
Advantage: loading roms via firmware works also for devices which...
pci: allow loading roms via fw_cfg.
This patch adds a pci bus property 'rombar' which specifies wheneverthe pci rom should be loaded via pci rom bar (default) or via fw_cfg.The later can be used for compatibility with older qemu versions whereno pci rom bar is present....
pc: add rombar to compat properties for pc-0.10 and pc-0.11
So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load methodby default.
make help output be a little more self-consistent
Signed-off-by: Bruce Rogers <brogers@novell.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update to SeaBIOS 0.5.1
5da6833 Update version to 0.5.1 669c991 Fix sign error preventing incorrect memory over 4gig calculation. 7e6bd3e Minor - better indent assembler in int1587. 48cf232 Add comment explaining why mptable is in low memory. 643062f Add int1589 support....
pc-bios: Update README (SeaBIOS)
The PC BIOS no longer comes from Bochs.This patch updates the related entry.
V2 - Modify SeaBIOS description and URL (Thanks to Gleb Natapov for the hint).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add bit property type
This adds "bit" property type, which is a boolean stored in a 32 bitinteger field, with legal values on and off. Will be used by virtio forfeature bits.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
virtio: rename features -> guest_features
Rename features->guest_features. This iswhat they are, avoid confusion withhost features which we also need to keep around.
virtio: add features as qdev properties
Add feature bits as properties to virtio. This makes it possible to e.g. definemachine without indirect buffer support, which is required for 0.10compatibility, or without hardware checksum support, which is required for 0.11...
MCE: Fix bug of IA32_MCG_STATUS after system reset
Now, if we inject a fatal MCE into guest OS, for example Linux, Linuxwill go panic and then reboot. But if we inject another MCE now,system will reset directly instead of go panic firstly, becauseMCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does...
Fix CPU topology initialization
Late initialization of CPU topology in CPUState prevents KVM guests toactually see the topology.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
remove pending exception on vcpu reset.
Without this qemu can even start on kvm modules with events supportsince default value of exception_injected in zero and this is #DEexception.
vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow
Check that the cursor dimensions passed from the guest for theDEFINE_CURSOR command don't overflow the available space in thecursor.image[] or cursor.mask[] arrays before copying data from the...
lsi: use QTAILQ for lsi_queue
Replace the funky array logic for queued commands with standardqemu list functions. Also rename lsi_queue to lsi_request.
lsi: have lsi_request for the whole life time of the request.
Right now lsi_request is allocated when a request is queued and releasedwhen a request is unqueued. With this patch applied the lsi_request iskept for the whole lifetime of the scsi request....
lsi: move current_dev into lsi_request
lsi: move dma_len+dma_buf into lsi_request
lsi: pass lsi_request to lsi_reselect
All callers of lsi_reselect have a lsi_request struct at hand anyway.So just pass it directly instead of having lsi_reselect search for itusing the tag.
PCI: Fix a typo
Fixes build with PCI_DEBUG defined.
Sparc64: increase APB register range
Sparc64: use firmware configuration device for command line storage
Avoid a ROM conflict.
oss: fix fragment setting
Previous patch introduced subtle regression, in cases whenOSS_GETVERSION fails the code wasn't falling back toSNDCTL_DSP_SETFRAGMENT.