tcg-i386: Implement setcond.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg-i386: Implement small forward branches.
There are places, like brcond2, where we know that the destinationof a forward branch will be within 127 bytes.
Add the R_386_PC8 relocation type to support this. Add a flag totcg_out_jxx and tcg_out_brcond* to enable it. Set the flag in the...
Add -static earlier to LDFLAGS for compile_prog()
Add -static to LDFLAGS earlier as to run the compile_prog() tests withthis flags, this will avoid turning on features for which a sharedlibrary is available but not a static one.
Signed-off-by: Loïc Minier <lool@dooz.org>...
Fix missing symbols in .rel/.rela.plt sections
Fix .rel.plt sections in the output to not only include .rel.pltsections from the input but also the .rel.iplt sections and to definethe hidden symbols __rel_iplt_start and __rel_iplt_end around.rel.iplt as otherwise we get undefined references to these when...
configure: remove debugging code introduced in aa527b65d8187b97d73f889b6cae7b6ac6f82d32
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
configure: fix compilation on hosts without -fstack-protector-all
Commit a0f291fc101a7ab3e40850a329da2cc2f2cd1f2d has enabled-fstack-protector-all on all targets, as the configure test is bogus.GCC only emits a warning and not an error if this option is not...
Update MAINTAINERS
Remove Thiemo from the maintainers. Requiescat in pace.
target-mips: don't call cpu_loop_exit() from helper.c
In helper.c AREG0 may not correspond do env, so it's not possible tocall cpu_loop_exit() here. Call it from op_helper.c instead.
linux-user: adapt uname machine to emulated CPU
This patch for linux-user adapts the output of the emulated uname()syscall to match the configured CPU. Tested with x86, x86-64 and armemulation.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Loïc Minier <lool@dooz.org>
fix locking error with current_tb
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user: remove signal handler before calling abort()
Qemu may hang in host_signal_handler after qemu has done aseppuku with cpu_abort(). But at this stage we are not reallyinterested in target process coredump anymore, so unregisterhost_signal_handler to die grafefully....
target-arm: refactor cp15.c13 register access
Access the cp15.c13 TLS registers directly with TCG ops instead of witha slow helper. If the the cp15 read/write was not TLS register access,fall back to the cp15 helper.
This makes accessing __thread variables in linux-user when apps are compiled...
mips/malta: fix typo
usb-linux: increase buffer for USB control requests
The WLAN USB stick ZyXEL NWD271N (0586:3417) uses very largeusb control transfers of more than 2048 bytes which won't fitinto the buffer of the ctrl_struct. This results in an error message"husb: ctrl buffer too small" and a non-working device....
tcg: document double-word support opcodes.
The internal opcodes brcond2, add2, sub2, mulu2 were undocumented.Place these in a new section that clearly indicates that they arenot to be emitted by translators.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
tcg: generic support for conditional set
Defines setcond_{i32,i64} and setcond2_i32 for 64-on-32-bit.
tcg: add tcg_invert_cond
It is very handy to have a reliable mapping of a condition to its inverse.
tcg-x86_64: implement setcond
target-ppc: change DCR helpers to target_long arguments
The recent transition to always have the DCR helper functions take 32 bitvalues broke the PPC64 target, as target_long became 64 bits there.
This patch changes DCR helpers to target_long arguments, and cast the values...
PCI: show also host bridge data in "info pci" output
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
PCI: fix multiple bridge problems
When several PCI bridges were in use, monitor command "info pci" wouldenter into infinite loop. Buses behind the bridge were not discoverablebecause secondary and subordinate bus numbers were not used properly.Other buses were not found because bus search terminated on first miss....
Refactor DEC 21154 PCI bridge
It's currently not used by PPC machines. Refactor so that also Sparc64machines can use it.
usb-linux.c: remove write-only variable
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vnc.c: remove dead code
to= is handled in qemu-sockets.c inet_listen.
remove two dead assignments in target-i386/translate.c
exec.c: dead assignments
fix undefined shifts by >32
This one is for 0.12 too.
monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX
This changes the error message from "Invalid CPU index" to "Invalidparameter index" in the human monitor.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "QError: New QERR_INVALID_CPU_INDEX"
This reverts commit 64a34bb14c0e358a6b2f14805e59ef25bf62d6d5.
qemu-option: Make qemu_opts_foreach() accumulate return values
Return the bitwise inclusive or of all return values instead of thelast call's value. This lets you find out whether any of the callsreturned a non-zero value.
No functional change, as existing users either don't care for the...
qdev: Fix exit code for -device ?
Help was shoehorned into device creation, qdev_device_add(). Sincehelp doesn't create a device, it returns NULL, which looks to callersjust like failed device creation. Monitor handler do_device_add()doesn't care, but main() exits unsuccessfully....
Revert "qdev: Add help for property value"
This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4.
The commit has four issues:
Revert "qdev: Add help for device properties"
This reverts commit 2ba6edf0dd740166632df80caa85992b20791a68.
The commit has two issues:
qdev: Add help for device properties
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?" print the supported properties instead of creating a device. Theformer also terminates the program.
This is commit 2ba6edf0 (just reverted) done right....
qdev: update help on -device
While there, use "property" rather than "option", for consistency with-global.
qdev: Add rudimentary help for property value
This provides the same information as reverted commit 2ba6edf0. Notmuch, just better than nothing.
monitor: New argument type 'b'
This is a double value with optional suffixes G, g, M, m, K, k. We'llneed this to get migrate_set_speed() QMP-ready.
monitor: Use argument type 'b' for migrate_set_speed
Before, it used type 's', which strips quotes and interprets escapes,and is quite inappropriate for QMP.
Negative arguments are no flushed to zero. Before, they were cast touint32_t, which wrecked the sign....
monitor: convert do_migrate_set_speed() to QObject
monitor: New argument type 'T'
This is a double value with optional suffixes ms, us, ns. We'll needthis to get migrate_set_downtime() QMP-ready.
monitor: Use argument type 'T' for migrate_set_downtime
monitor: convert do_migrate_set_downtime() to QObject
seabios: use correct submodule hash
Commit 392ecf543dd2b219828374850d833296a55567ea introduced an accidental changeto the roms/seabios submodule. This commit partially reverts that commit toensure the seabios module points to the right commit.
Reported-by: Marcelo Tosatti <mtosatti@redhat.com>...
monitor: Document argument type 'M'
Was forgotten in commit b6e098d7.
QDict: New qdict_get_double()
Helper function just like qdict_get_int(), just for QFloat/double.
bsd/darwin-user: mmap_frag() users only check for -1 error
See also ee636500d6eab44b83f09cb730b67226b70423b1.
cris: Prettify register dumps.
Use friendly names for registers in the dumps.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
sparc32 don't mark page dirty when failing
if the access check fails, the page can not be modifiedand shouldn't be marked dirty.The patch fixes the "hsfs_putpage: dirty HSFS page" error in Solaris guests.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>...
sparc64: implement basic IOMMU/interrupt handling
Also add reset control.
Sparc64: byte swap IO port access
This requires an updated OpenBIOS image.
virtio-blk: Fix restart after read error
Current code assumes that only write requests are ever going to be restarted.This is wrong since rerror=stop exists. Instead of directly starting writes,use the same request processing as used for new requests....
virtio-blk: Fix error cases which ignored rerror/werror
If an I/O request fails right away instead of getting an error only in thecallback, we still need to consider rerror/werror.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial-bus: Fix bus initialisation and allow for bus identification
This commit enables one to use multiple virtio-serial devices and toassign ports to arbitrary devices like this:
-device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \...
cirrus: Properly re-register cirrus_linear_io_addr on vram unmap
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more:
When switching away from linearly mapped vram, we also have to restorethe I/O handlers for the LFB.
This regression was once introduced by commit 2bec46dc97....
virtio_blk: Factor virtio_blk_handle_request out
We need a function that handles a single request. Create one by splitting outcode from virtio_blk_handle_output.
softmmu: Dont clobber retaddr in slow_ldx().
When splitting up unaligned IO accesses, ld calls slow_ld which wasclobbering retaddr.
AFAIK the problem only shows up when running emulations with -icountthat may abort TB execution on IO accesses.
Solaris: test for presence of commands with has()
Signed-off-by: Loïc Minier <lool@dooz.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add and use has() and path_of() funcs
Add has() and path_of() funcs and use them across configure; has()will test whether a command or builtin is available; path_of() willsearch the PATH for executables and return the full pathname if found.
Signed-off-by: Loïc Minier <lool@dooz.org...
Check for sdl-config before calling it
Check whether sdl-config is available before calling it, otherwise./configure triggers a warning: ./configure: 957: sdl-config: not found
If neither the .pc file not sdl-config are present, disable SDL support....
Monitor: Fix command execution regression
Function is_async_return() added by commit 940cc30d0d4 assumesthat 'data', which is returned by handlers, is always a QDict.
This is not true, as QLists can also be returned, in this casewe'll get a segfault....
sparc64: reimplement tick timers v4
sparc64 timer has tick counter which can be set and read,and tick compare value used as deadline to fire timer interrupt.The timer is not used as periodic timer, instead deadlineis set each time new timer interrupt is needed....
sparc64: correct write extra bits to cwp
- correctly fit to cwp if provided window number is out of range
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix BSD build
<sys/wait.h> must be included in order to use WIF* macros.
Fix regression in option parsing
Commit ec229bbe7 broke invocation without a specific -hda. IOW, qemu foo.img.The lack of an optind update caused an infinite loop.
Reported-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pflash: Buffer block writes
Buffer block writes to avoid flushing every word access onto backingstorage device. This significantly speeds up flash emulation for flashesconnected through an 8 or 16-bit bus combined with backing storage (-pflash).
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
block: avoid creating too large iovecs in multiwrite_merge
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.
Add a MAX_IOV defintion for platforms that don't have it. For now we use...
New API for asynchronous monitor commands
Qemu has a number of commands that can operate asynchronously (savevm, migrate,etc) and it will be getting more. For these commands, the user monitor needsto be suspended, but QMP monitors could continue to to accept other commands....
virtio: Add memory statistics reporting to the balloon driver
When using ballooning to manage overcommitted memory on a host, a system forguests to communicate their memory usage to the host can provide informationthat will minimize the impact of ballooning on the guests. The current method...
vnc_refresh: calling vnc_update_client might free vs
Hi all,this patch fixes another bug in vnc_refresh: calling vnc_update_clientmight cause vs to be free()ed, in this case we cannot access vs->nextright after to examine the next item on the list.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
block/raw-posix: Abort on pread beyond end of non-growable file
This shouldn't happen under any normal circumstances. However, it looks likeit's possible to achieve this with corrupted images. Without this patchraw_pread is hanging in an endless loop in such cases....
win32: pair qemu_memalign() with qemu_vfree()
Win32 suffers from a very big memory leak when dealing with SCSI devices.Each read/write request allocates memory with qemu_memalign (ieVirtualAlloc) but frees it with qemu_free (ie free).Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks....
Tell users about out-of-memory errors
Aborting without an error message when memory is shortis not helpful, so print the reason for the abort.
Try qemu -m 1000000or qemu -m 2000 (win32)
to force an out-of-memory error.
win32/sdl: Fix toggle full screen
Toggle full screen on Win32/SDL 1.2.13 was broken by commitc18a2c360e3100bbd71162cf922dcd8c429a8b71. Re-add the call todo_sdl_resize() which was removed in this revision
Signed-off-by: Herve Poussineau <hpoussin@reactos.org>...
PCI: fix bridge configuration
PCI bridges' qdev info structures must indicate bridge header type,otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.
fix savevm command without id or tag
savevm without id or tag segfaults in:
(gdb) bt#0 0x00007f600a83bf8a in __strcmp_sse42 () from /lib64/libc.so.6#1 0x00000000004745b6 in bdrv_snapshot_find (bs=<value optimized out>, sn_info=0x7fff996be280, name=0x0) at savevm.c:1631...
qcow2: rename two QCowAIOCB members
The n member is not very descriptive and very hard to grep, rename it tocur_nr_sectors to better indicate what it is used for. Also renamenb_sectors to remaining_sectors as that is what it is used for.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
PCI: Convert pci_info() to QObject
The returned QObject is a QList of all buses. Each bus isrepresented by a QDict, which has a key with a QList of allPCI devices attached to it. Each device is represented bya QDict.
As has happended to other complex conversions, it's hard to...
PCI: do_pci_info(): PCI bridge devices support
This commit completes the do_pci_info() conversion toQObject by adding support to PCI bridge devices.
This is done by recursively adding devices in the"pci_bridge" key.
IMPORTANT: This code is being added separately because I could...
ide save/restore current transfer fields
If migration takes place between write of the bmdma address register andwrite of the command register (to initiate DMA), the destination willnot properly start the DMA op, hanging the guest:
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen...
Fix generation of config-host.h
This patch improves Anthony patch a6a853c86275efd89996ce59612a000c5873db5d
Once there, it improves handling of object files for qemu tools
cc: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Juan Quintela <quintela@redhat.com>...
virtio-console: Rename virtio-serial.c back to virtio-console.c
This file was renamed to ease the reviews of the recent changesthat went in.
Now that the changes are done, rename the file back to its originalname.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
virtio-console: Automatically use virtio-serial-bus for the older -virtioconsole invocation
These hunks got dropped off mysteriously during the rebasing of myvirtio-serial series. Thanks go to Markus for noticing it.
Without these fixes, -virtioconsole doesn't actually have any effect....
block: clean up bdrv_open2 structure a bit
Check the whitelist as early as possible instead of continuing thesetup, and move all the error handling code to the end of thefunction.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: kill BDRV_O_CREAT
The BDRV_O_CREAT option is unused inside qemu and partially duplicatesthe bdrv_create method. Remove it, and the -C option to qemu-io whichisn't used in qemu-iotests anyway.
When called with property "?", a list of supportedproperties will be printed (instead of an error message).
This is useful for command lines like qemu -device e1000,?and was already standard for other options like model=?...
qdev: Add help for property value
When called with property value "?",a help text will be printed (instead of an error message).
This is useful for command lines like qemu -device e1000,mac=?and is already standard for other command line options....
Documentation: Improve command line help for -device option
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Documentation: Add missing texi description for command line options
Some more command line options had entries for command line help,but documentation for texi and derived formats (man, html, info)was missing.
For conditional options, the texi documentation was added...
No need anymoe for bdrv_set_read_only
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Ask for read-write permissions when opening files
Found some places that seems needs this explicitly, now thatread-write is not the default.
Read-only device changed to opens it's file for read-only.
QList: Introduce QLIST_FOREACH_ENTRY()
Iterate over QList entries, it's needed to call qlist_entry_obj()to retrieve the stored QObject.
I'm not sure if it's ok to have this, because it's not as easy asqlist_iter() and the QListEntry data type is now exposed to the...
QDict: Introduce qdict_get_qdict()
A helper to retrieve a QDict from a QDict.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c: fix warning with _FORTIFY_SOURCE
CC i386-softmmu/vl.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/vl.c: In function 'qemu_event_increment':/usr/src/RPM/BUILD/qemu-0.11.92/vl.c:3404: error: ignoring return value of 'write', declared with attribute warn_unused_result...
monitor.c: fix warnings with _FORTIFY_SOURCE
CC i386-softmmu/monitor.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/monitor.c: In function 'do_memory_save':/usr/src/RPM/BUILD/qemu-0.11.92/monitor.c:1318: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result...
linux-user/mmap.c: fix warnings with _FORTIFY_SOURCE
CC i386-linux-user/mmap.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/linux-user/mmap.c: In function 'mmap_frag':/usr/src/RPM/BUILD/qemu-0.11.92/linux-user/mmap.c:253: error: ignoring return value of 'pread', declared with attribute warn_unused_result...
check pipe() return value
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Enable _FORTIFY_SOURCE=2
_FORTIFY_SOURCE is a Glibc feature which adds memory and string functionprotection.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Check availavility of -fstack-protector-all
mmap_frag() users only check for -1 error