Sparc32: fix free-run timer
According to Sun4M System Architecture Manual chapter 5.3.2, a limitof 0 will not generate interrupts.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Musicpal: Fix descriptor walk in eth_send
Commit 930c86820e introduced a regression to eth_send: eth_tx_desc_putmanipulates the host's tx descriptor copy before writing it back, buttwo lines down the descriptor is evaluated again, leaving us with aninvalid next address if host and guest endianness differ. So this was...
Musicpal: Fix wm8750 I2C address
Commit b3a219883e uncovered that we attached the Wolfson with an I2Caddress shifted left by one. Fixing this makes sound work again forthe Musicpal.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: malc <av1474@comtv.ru>
sparc32 fix np dereference in do_unassigned_access
fix a potential null pointer dereference introduced incommit 576c2cdc767ab9e2dc038fa4c99f22e53287a3de
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc64: fix PCI probe problems
Byte swap PCI config values.
Remove old bogus PCI config mechanism so that device 0:0.0 can be probed.This requires OpenBIOS r667.
Revert "block: prevent multiwrite_merge from creating too large iovecs"
This reverts commit 0076bc0c1d93adcbc7f1af184e04902cf37e9ab8.
Kevin Wolf pointed out that this breaks the mingw32 build.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
make: qemu-img depends on config-host.h
Fixes mingw32 build out of tree.
reduce number of reinjects on ACK
Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error.
It happens here:hal!HalpRtcUnmaskClock:8281b93a 8bff mov edi,edi8281b93c 56 push esi8281b93d 33f6 xor esi,esi...
block: prevent multiwrite_merge from creating too large iovecs
If we go over the maximum number of iovecs support by syscall we getback EINVAL from the kernel which translate to I/O errors for the guest.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: fix cache flushing in bdrv_commit
virtio: Remove duplicate macro definition for max. virtqueues, bump up the max
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it inhw/virtio.h.
Also, bump up the value of the maximum allowed virtqueues to 64. This isin preparation to allow multiple ports per virtio-console device....
virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a newvirtio-serial bus that can host console and generic serial ports. Thefile hosting this code is now called virtio-serial-bus.c.
The virtio console is now a very simple qdev device that sits on the...
virtio-serial-bus: Maintain guest and host port open/close state
Via control channel messages, the guest can tell us whether a port gotopened or closed. Similarly, we can also indicate to the guest of hostport open/close events.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
virtio-serial-bus: Add a port 'name' property for port discovery in guests
The port 'id' or number is internal state between the guest kernel andour bus implementation. This is invocation-dependent and isn't part ofthe guest-host ABI.
To correcly enumerate and map ports between the host and the guest, the...
virtio-serial-bus: Add ability to hot-unplug ports
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Add a 'virtserialport' device for generic serial port support
This commit adds a simple chardev-based serial port. Any data the guestsends is forwarded to the chardev and vice-versa.
Sample uses for such a device can be obtaining info from the guest like...
Move virtio-serial to Makefile.objs
There's nothing target-dependent in the virtio-serial code so allow itto be compiled just once for all the targets.
virtio-serial: Use MSI vectors for port virtqueues
This commit enables the use of MSI interrupts for virtqueuenotifications for ports. We use nr_ports + 1 (for control channel) msientries for the ports, as only the in_vq operations need an interrupt on...
net: Make inet_strfamily() public
So that it can be used by other subsystems.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: inet_strfamily(): Better unknown family report
Returning "????" is a bit meaningless, let's call it "unknown".
vnc: Use inet_strfamily()
QMP: Fix asynchronous events delivery
Commit f039a563f200beee80cc10fd70b21ea396979dab introducesa regression as monitor_protocol_event() will return inthe first user Monitor it finds in the QLIST_FOREACH()loop.
The right thing to do is to only delivery an asynchronous...
Documentation: Add missing documentation for qdev related command line options
The command line options -device, -nodefaults, -readconfig,-writeconfig had entries for command line help, butdocumentation for texi and derived formats (man, html, info)was missing....
Make CDROM a read-only drive
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.
Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...
Added drives' readonly option
Disable fall-back to read-only when cannot open drive's file for read-write
QMP: Introduce VNC_INITIALIZED event
It's emitted when a VNC client session is activated by QEMU,client's information such as port, IP and auth ID (if thesession is authenticated) are provided.
Event example:
{ "event": "VNC_INITIALIZED", "timestamp": {"seconds": 1263475302, "microseconds": 150772},...
Fix QEMU_WARN_UNUSED_RESULT
Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it isconditional on a define from config-host.h which is included only later.Include that file earlier to get the warnings back.
Reactivating it unfortunately leads to some warnings about unused qdev_init...
QMP: Emit asynchronous events on all QMP monitors
When using a control/QMP monitor in tandem with a regular monitor, asynchronousmessages can get lost depending on the order of the QEMU program arguments.QEMU events issued by monitor_protocol_event() always go to cur_mon. If the...
ide: device version property
This patch adds a new property named 'ver' to ide-drive which allows tospecify the version which the virtual disk/cdrom should report to theguest. By default this is the qemu version (i.e. 0.12). usage:
-drive if=none,id=disk,file=......
scsi: device version property
This patch adds a new property named 'ver' to scsi-disk which allows tospecify the version which the virtual disk/cdrom should report to theguest. By default this is the qemu version (i.e. 0.12). usage:
pc: add driver version compat properties
This patch adds compat property entries for ide-disk.ver andscsi-disk.ver to pc-0.10 and pc-0.11. With this patch appliedthe scsi and ide disks report "0.10" and "0.11" as version whenyou start qemu with "-M pc-0.10" or "-M pc-0.11"....
fix wrong indentation
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
clean up env->current_tb
There are three paths from the innermost while loop of cpu_execto the top of the outermost for loop. Two do not resetenv->current_tb. Fix this.
add assertions about env->current_tb
By virtue of the previous patch env->current_tb will always be NULL atthe top of cpu_exec's outermost for loop, and at the end of the innermostwhile loop.
change while to if
The while loop will be executed exactly 0 or 1 times, depending onenv->exit_request.
remove assertions
avoid unreachable statement after break
raw-posix: Detect CDROM via ioctl on linux
Current CDROM detection is hardcoded based on source file name.Make this smarter on linux by attempting a CDROM specific ioctl.
This makes '-cdrom /dev/sr0' succeed with no media present.
v2: Give ioctl check higher priority than filename check....
raw-posix: Detect legacy floppy via ioctl on linux
Current legacy floppy detection is hardcoded based on source filename. Make this smarter on linux by attempting a floppy specificioctl.
v2: Give ioctl check higher priority than filename check s/IDE/legacy/...
char: Remove redundant qemu_chr_generic_open() call.
qemu_chr_open_fd() calls qemu_chr_generic_open(),so qemu_chr_open_tty() doesn't need to call it.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
VNC: Use 'enabled' key instead of 'status'
Currently the 'status' key is a string whose value can be"disabled" or "enabled", change it to the QMP's standard'enabled' key, which is a bool.
Note that 'status' in being dropped and this wouldn't beallowed if QMP were stable....
VNC: Make 'auth' key mandatory
There is no reason to have it as optional and the codein the server and client gets slightly simpler if thekey is mandatory.
While there also do some cleanup on how the server info iscollected.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
VNC: Rename client's 'username' key
It's the SASL username, so it's better to call it 'sasl_username'to be consistent.
Note that this change wouldn't be allowed if QMP were stable.
VNC: Add 'family' key
It contains the socket adress family name, like "ipv4" or"ipv6".
This is useful for clients so that they can interpret the'host' key reliably.
VNC: Cache client info at connection time
When a disconnection happens the client's socket on QEMUside may become invalid, this way it won't be possibleto query it to get client information, which is going tobe needed by the future QMP VNC_DISCONNECTED event....
QMP: Introduce VNC_CONNECTED event
It's emitted when a VNC client connects to QEMU, client's informationsuch as port and IP address are provided.
Note that this event is emitted right when the connection isestablished. This means that it happens before authentication...
QMP: Introduce VNC_DISCONNECTED event
It's emitted when a VNC client disconnects from QEMU, client'sinformation such as port and IP address are provided.
{ "event": "VNC_DISCONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 },...
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).
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.
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.
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.
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.