target-ppc: fix evsrwu and evsrws
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-ppc: fix evslw instruction
audio: fix comment
Signed-off-by: malc <av1474@comtv.ru>
QMP: Really move the RESET event to qemu_system_reset()
Something bad has happened in the merge of commit 0ee44250, asthe log message says it's supposed to be in qemu_system_reset()but it is do_vm_stop().
Possibly, it was a problem with the conflict resolution with...
target-i386: fix SIB decoding with index = 4
A SIB byte with an index of 4 means "no scaled index", even if the scalevalue is not 0. In 64-bit mode, if REX.X is used, an index of 4 selects%r12. This is correctly handled by the computation of the index variable,...
slirp: check system() success
we shouldn't call W*() macros until we check that fork worked.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: return errno instead of -1
qcow: return errno instead of -1
vmdk: return errno instead of -1
vmdk: make vmdk_snapshot_create return -errno
vmdk: fix double free
fail_gd error case would also free rgd_buf that was already freed
vmdk: share cleanup code
cleanup code is identical for error/success cases. Only differenceare goto labels.
block: print errno on error
Now that we changed all create calls to return errno, just print it.
documentation: qemu_write_full don't work with non-blocking fd's
cow: return errno instead of -1
Remove not needed ret = 0 assignment.
qemu-img rebase: Add -f option
Allow the user to specify the format of the image to rebase.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure: Fix wrong stderr redirection
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure: Fix code which creates config.mak files
These files are created by configure and growunnecessarily at each new call of configure:
roms/seabios/config.makroms/vgabios/config.maklibhw32/config.maklibhw64/config.mak
libhw32/config.mak and libhw64/config.mak set...
kbd keds: vnc
Use led status notification support in vnc.
The qemu vnc server keeps track of the capslock and numlock states basedon the key presses it receives from the vnc client. But this fails incase the guests idea of the capslock and numlock state changes for other...
Restore terminal attributes for tty based monitor
Patch http://permalink.gmane.org/gmane.comp.emulators.qemu/63472 handleclose when using tty devices (like /dev/ttyS0),yet tty based monitor are not restoring terminal attributes (as donewith stdio based monitor), when closing qemu after that command:...
QMP: Introduce WATCHDOG event
It's emitted whenever the watchdog device's timer expires. The actiontaken is provided in the 'data' member.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Catch attempt to attach more than one device to a netdev
Guest device and host netdev are peers, i.e. it's a 1:1 relation.However, we fail to enforce that:
$ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio...
scsi: Make device scsi-disk reject /dev/sg*
You're supposed to use scsi-generic for that. Which rejects anythingbut /dev/sg*.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kbd leds: infrastructure
Adds infrastructure for keyboard led status tracking to qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kbd leds: ps/2 kbd
Add led status notification support to the ps/2 kbd driver.
kbd leds: usb kbd
Add led status notification support to the usb kbd driver.
qdev: Improve diagnostics for bad property values
Property "vlan" reports "failed to parse" even when the value parsesjust fine, but the result doesn't name an existing VLAN.
Similarly, properties "drive", "chr" and "netdev" misleadingly report"failed to parse" when the value doesn't name an existing host device....
QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.
adding helper pci functions
Signed-off-by: Izik Eidus <ieidus@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move x509 file name defines to qemu-x509.h
Want share them with vnc and spice.
pcnet APROMWE bit location (retry)
According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2.
Signed-off-by: Christopher Kilgour <techie@whiterocker.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extendthat to all qdev devices.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reported-by: "Michael S. Tsirkin" <mst@redhat.com>...
virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serial
Use the named constant instead of -1.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reported-by: "Michael S. Tsirkin" <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Move RESET event into qemu_system_reset()
Nothing will change as that function is currently only called bythe main loop code, but it's the right place for the RESET event,as it's where the reset is actually performed.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
QMP: Drop DEBUG event
This event has been introduced in the first round of QMP commits,turns out that it's based on the usage of the EXCP_DEBUG macro,which has discussable semantics when exposed through QMP.
As libvirt doesn't use this, let's just drop it....
QMP: Revamp the qmp-events.txt file
Now we can say it's useful, the following changes have been made:
- Put events in alphabetical order- Add examples to all events- Document all 'data' members- Small corrections and cleanups
block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), tohave the expected event sequence we need to emit the I/O errorevent before calling vm_stop().
The expected sequence is:
{ "event": "BLOCK_IO_ERROR" [...] }...
QMP: Move STOP event into do_vm_stop()
I've introduced the STOP event in the main loop, this is wrongas it will be only emitted if the io thread is enabled.
This fixes that by moving the STOP event to do_vm_stop().
Fix hanging user monitor when using balloon command
This patch application failed. My patch adds a cb() call indo_balloon(), but the change in git has added the cb() call todo_info_balloon(). That is causing qemu segfaults. Applying thefollowing should correct the damage. Thanks....
sdl: improve grab exiting instructions
It might not be obvious what "grab" is.
Reported-by: Ingo Molnar <mingo@elte.hu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ppc: don't define bamboo-0.13 as the default machine
It has been broken by commit 977b6b91cee1132f8c7b12d22f4b273091598e44.
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
i386-dis: remove dead assignments, spotted by clang
Value stored to 'mask' is never read.
softfloat: remove dead assignments, spotted by clang
Value stored to 'bSign' is never read.
slirp: remove dead initialization, spotted by clang
Value stored during initialization is never read.
slirp: remove dead nested assignment, spotted by clang
Although the value stored to 'r' is used in the enclosing expression,the value is never actually read from 'r'.
slirp: remove dead increments, spotted by clang
Value stored is never read.
slirp: remove dead assignments, spotted by clang
target-arm: Fix missing 'return' in SRS handling.
There's a return missing in the srs handling which leads to srs always beingtreated an an invalid op.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix curses interaction with keymaps
The combination of keymap support (-k option) and curses is currentlyvery broken. The patch below fixes it by first extending keymap supportto interpret the shift, ctrl, altgr and addupper keywords in keymaps,and to fix curses into properly using keymaps....
use absolute URLs for .gitmodules
The relative URLs do not work when cloning a fork of qemu or whencloning from the Savannah URL.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Documentation: Modify rule for html output (better looking output format)
To create html output from texi input, texi2html was used.Output from makeinfo looks cleaner, so replace the old ruleand use makeinfo now.
For those who want to use their own variant of html output,...
scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-nbd: Fix wrong description in qemu-nbd.texi
-c option needs argument <dev> but it's missing now.This patch fixes it.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Build usb-ohci for PCs
The OHCI emulation isn't obviously broken and there are people who want to useit. Let's build it by default so that it can be enabled via -device.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type
Disable the MULTIPORT feature and MSI vectors for the 0.12 machinetypes; those features are added only for 0.13 onwards.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat
Add a 0.12 machine type for compatibility with older versions. Mark thedefault one as 0.13.
s390-virtio: Fix compile error for virtio-block init
Commit 428c149b0be790b440e1cbee185b152cdb22feec modified the argumentthat virtio_blk_init takes. Update the s390 bus code that calls thisfunction.
Signed-off-by: Amit Shah <amit.shah@redhat.com>CC: Christoph Hellwig <hch@lst.de>...
json-parser: Fix segfault on malformed input
If the parser fails to parse the key in parse_pair, it will access a NULLpointer. A simple way to trigger this is sending {foo} via QMP. This patchturns the segfault into a syntax error reply.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
hw/serial.c: fix THRE interrupt clearing
UART_IIR_THRI is not a mask, but a possible value for the IIR ID.Use UART_IIR_ID to extract this value.
Broken by commit 71e605f80313a632cc6714cde7bd240042dbdd95.
hw/serial.c: fix indentation
linux-user: Save/restore fpu registers to signal context on sh4
As "todo" comment in source code.And modify restore_sigcontext() to have three args as kernel's does.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: Fix syscall pipe2() retval on sh4
On linux/sh4 pipe() return values by r0:r1 as SH C calling convention. pipe2() return values on memory as traditional unix way.
target-i386: Fix long jumps/calls in long mode with REX.W set
Signed-off-by: malc <av1474@comtv.ru>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386: fix lddqu SSE instruction
This instruction load data from memory to register and not the reverse.
Update to latest SeaBIOS
- 8f469b9 Dynamically allocate ata_channel info; introduce custom atadrive_s struct. - 575ffc8 Cleanup - build drive description in temp memory during init.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile: Fix names of GPXE ROM files
da51e79b7ff2126cc2448749d657a4f6e3b1270f added two new ROM filesand removed an old one for eepro100.c.
These changes were missing in Makefile (which resultedin a broken "make install").
Reported by Lucas Meneghel Rodrigues, thanks....
target-mips: use newer logical ops
Merge remote branch 'qemu-kvm/uq/master' into pulls
x86: Extend validity of bsp_to_cpu
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equalscpu_index, bsp_to_cpu can also be based on the latter directly. Thiswill help an early user of it: KVM while initializing mp_state.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
KVM: x86: Restrict writeback of VCPU state
Do not write nmi_pending, sipi_vector, and mpstate unless we at least gothrough a reset. And TSC as well as KVM wallclocks should only bewritten on full sync, otherwise we risk to drop some time on stateread-modify-write....
KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load relatedsynchronization points in favor of four(!) generic hooks:
- cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave)...
KVM: Rework of guest debug state writing
So far we synchronized any dirty VCPU state back into the kernel beforeupdating the guest debug state. This was a tribute to a deficite in x86kernels before 2.6.33. But as this is an arch-dependent issue, it isbetter handle in the x86 part of KVM and remove the writeback point for...
Add option to use file backed guest memory
Port qemu-kvm's -mem-path and -mem-prealloc options. These are usefulfor backing guest memory with huge pages via hugetlbfs.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>CC: john cooper <john.cooper@redhat.com>
Allocate memory below 4GB as one chunk
Instead of allocating a separate chunk for the first 640KB and anotherfor 1MB+, allocate one large chunk. This plays well in terms of alignmentand size with large pages.
Signed-off-by: Avi Kivity <avi@redhat.com>...
eepro100: Keep includes sorted
I always try to keep standard includes sortedand add a comment why they are there (so theycan be removed when they are no longer needed).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
eepro100: Remove C++ comments
C++ comments are unwanted, so this is fixed here.
eepro100: Add diagnose command
Real hardware would run an internal self-test.The emulation just returns a passed status.
Original patch was from Reimar Döffinger, thanks.
eepro100: New function for reading command block
Move code which reads the command block to thenew function read_cb. The patch also fixes someendianess issues related to the command blockand moves declarations of local variables tothe beginning of the block....
eepro100: Use tx.status
There is no need for a local variable "status".Using tx.status makes it clearer which statusis addressed.
eepro100: Prettify code (no functional changes)
eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state.
eepro100: Support RNR interrupt
The RNR interrupt is triggered under these conditions:
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
eepro100: Replace variable name to fix a compiler warning
When compiling with -Wshadow, gcc gives a warningwhich is fixed by renaming stat -> status.
eepro100: Use symbolic names for bits in EEPROM id
V2 - Use UPPER_CASE for enum values
eepro100: Remove old unused code
This code is no longer needed.
eepro100: Use symbolic names and BIT macros in binary operations
Instead of magic numbers like 0x8000, symbolic names are usedfor the SCB command and status bits.
There are too many configuration bits to use symbolic namesthere, too. Using the BIT macro is a little help when comparing...
eepro100: Add device descriptions
Add descriptions for all devices.These descriptions are shown when users call qemu -device ?
eepro100: Update copyright notice
eepro100: Add TODO list
eepro100: Support gpxe boot for all eepro100 devices
Only two boot ROM files are needed for all devices.
eepro100: Fix PXE boot
The phy handling was wrong for PXE, GPXE boot:GPXE's eepro100 driver did not detect a valid link.
This is fixed here.
eepro100: Add missing SCB register names
Some system control block registers were addressedusing their offset value. Use symbolic names nowand clean the documentation.
eepro100: Fix compiler errors from debug messages
When debug output was enabled (by defining DEBUG_EEPRO100),some debug messages resulted in a compiler error.
(curses) Use more descriptive values
Hello,
curses_keys.h is using obscure constant values while the curses.h headerprovides fine defines, let's use the latter.
To be applied on top of my previous patch.
Samuel
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>...
Fix curses return key when using -k
There is a small incoherency in curses_keys.h, which makes it fail toemit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157into \n, but name2keysym binds \r with Return, not \n. The patch below...
target-mips: use setcond when possible
tcg/arm: merge the two sets of #define for optional ops
tcg/arm: accept immediate arguments for brcond/setcond
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Add a missing break