tcg: Move helper registration into tcg_context_init
No longer needs to be done on a per-target basis.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-m68k: Rename helpers.h to helper.h
This brings the m68k target in line with all other targets.
Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Use a GHashTable for tcg_find_helper
Slightly changes the interface, in that we now return nameinstead of a TCGHelperInfo structure, which goes away.
tcg: Delete tcg_helper_get_name declaration
The function was deleted in 4dc81f2822187f4503d4bdb76785cafa5b28db0b.
tcg-hppa: Remove tcg backend
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'rth/tcg-arm-pull' into staging
Merge remote-tracking branch 'sweil/mingw' into staging
Merge remote-tracking branch 'kraxel/chardev.8' into staging
Message-id: 1380708925-6721-1-git-send-email-kraxel@redhat.comSigned-off-by: Anthony Liguori <anthony@codemonkey.ws>
Merge remote-tracking branch 'sweil/tci' into staging
Message-id: 1380137693-3729-1-git-send-email-sw@weilnetz.de...
qcow2: Free allocated L2 cluster on error
If an error occurs in l2_allocate, the allocated (but unused) L2 clustershould be freed.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-iotests: Correct 026 output
Because l2_allocate now frees the unused L2 cluster on error, theaccording test cases in 026 don't result in one leaked cluster anymore.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: use correct filename
The content filename point to may be erased by qemu_opts_absorb_qdict()in raw_open_common() in drv->bdrv_file_open()
So it's better to use bs->filename.
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>Reviewed-by: Max Reitz <mreitz@redhat.com>...
migration: Fix compiler warning ('caps' may be used uninitialized)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>Reviewed-by: Stefan Weil <sw@weilnetz.de>
util/path: Fix type which is longer than 8 bit for MinGW
While dirent->d_type is 8 bit for most systems, it is 32 bit for MinGW.Reducing it to 8 bit results in a compiler warning because the macrois_dir_maybe compares that 8 bit value with 32 bit constants....
vl: Clean up unnecessary boot_order complications
Messed up in commit 8281abd.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/9pfs: Fix errno value for xattr functions
If there is no operation driver for the xattr type thefunctions return '-1' and set errno to '-EOPNOTSUPP'.When the calling code sets 'ret = -errno' this turnsinto a large positive number.
In Linux 3.11, the kernel has switched to using 9p...
qemu-char: Fix potential out of bounds access to local arrays
Latest gcc-4.8 supports a new option -fsanitize=address which activatesan AddressSanitizer. This AddressSanitizer stops the QEMU system emulationvery early because two character arrays of size 8 are potentially written...
exec: cleanup DEBUG_SUBPAGE
Touched some error after enabling DEBUG_SUBPAGE.
Signed-off-by: Amos Kong <akong@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block: Remove unused assignment (fixes warning from clang)
blockdev.c:1929:13: warning: Value stored to 'ret' is never read ret = 0; ^ ~
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target-i386: Fix compiler warning (integer constant is too large)
From buildbot default_i386_rhel61:
CC i386-softmmu/target-i386/arch_memory_mapping.otarget-i386/arch_memory_mapping.c: In function 'walk_pde':target-i386/arch_memory_mapping.c:110: warning:...
hw/alpha: Fix compiler warning (integer constant is too large)
CC alpha-softmmu/hw/alpha/typhoon.ohw/alpha/typhoon.c: In function 'typhoon_translate_iommu':hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type...
sh4: Fix serial line access for Linux kernels later than 3.2
With Linux kernel version 3.3 or later, qemu fails with the following message:
sh_serial: unsupported read from 0x18 Aborted
Reported-and-analyzed-by: Rob Landley <rob@landley.net>Signed-off-by: Guenter Roeck <linux@roeck-us.net>...
pci-ohci: Add missing 'break' in ohci_service_td
Device communication errors need to be reported to driver.Add a debug message while at it.
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>Acked-by: Gerd Hoffmann <kraxel@gmail.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests: Fix schema parser test for in-tree build
Commit 4f193e3 added the test, but screwed up in-tree builds(SRCDIR=.): the tests's output overwrites the expected output, and isthus compared to itself.
Cc: qemu-stable@nongnu.orgReported-by: Laszlo Ersek <lersek@redhat.com>...
util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR
If a socket is closed it remains in TIME_WAIT state for some time. On operatingsystems using BSD sockets the endpoint of the socket may not be reused while inthis state unless SO_REUSEADDR was set on the socket. On windows on the other...
gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR
SO_REUSEADDR should be avoided on Windows but is desired on other operatingsystems. So instead of setting it we call socket_set_fast_reuse that will resultin the appropriate behaviour on all operating systems....
net: call socket_set_fast_reuse instead of setting SO_REUSEADDR
slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR
util: call socket_set_fast_reuse instead of setting SO_REUSEADDR
Update MAINTAINERS
All of Paul's emails are bouncing and he hasn't been active forsome time.
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
qcow2: Switch L1 table in a single sequence
Switching the L1 table in memory should be an atomic operation, as faras possible. Calling qcow2_free_clusters on the old L1 table on disk isnot a good idea when the old L1 table is no longer valid and the address...
block: vhdx - add migration blocker
This blocks migration for VHDX image files, until thefunctionality can be supported.
Signed-off-by: Jeff Cody <jcody@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: use correct filename for error report
The content filename point to will be erased by qemu_opts_absorb_qdict()in raw_open_common() in drv->bdrv_file_open()
qcow2: CHECK_OFLAG_COPIED is obsolete
CHECK_OFLAG_COPIED as a parameter to check_refcounts_l1 andcheck_refcounts_l2 is obselete now, since the OFLAG_COPIED consistencycheck is actually no longer performed by these functions (but bycheck_oflag_copied)....
qcow2: Correct endianness in overlap check
If an inactive L1 table is loaded from disk, its entries are in bigendian and have to be converted to host byte order before using them.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>...
tcg-arm: Use ldrd/strd for appropriate qemu_ld/st64
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-arm: Rearrange slow-path qemu_ld/st
Use the new helper_ret_*_mmu routines. Use a conditional callto arrange for a tail-call from the store path, and to load thereturn address for the helper for the load path.
tcg-arm: Use strd for tcg_out_arg_reg64
tcg-arm: Use QEMU_BUILD_BUG_ON to verify constraints on tlb
One of the two constraints we already checked via #if, butthe tlb offset distance was only checked at runtime.
tcg-arm: Move load of tlb addend into tcg_out_tlb_read
This allows us to make more intelligent decisions about the relativeoffsets of the tlb comparator and the addend, avoiding any need ofwriteback addressing.
tcg-arm: Return register containing tlb addend
Preparatory to rescheduling the tlb load, and changing said register.Continues to use R1 for now.
tcg-arm: Remove restriction on qemu_ld output register
The main intent of the patch is to allow the tlb addend registerto be changed, without tying that change to the constraint. Butthe most common side-effect seems to be to enable usage of ldrdwith the r0,r1 pair....
tcg-arm: Move the tlb addend load earlier
There are free scheduling slots between the sequence ofcomparison instructions. This requires changing theregister in use to avoid conflict with those compares.
.gitignore: ignore tests/qemu-iotests/socket_scm_helper
Signed-off-by: Fam Zheng <famz@redhat.com>Reviewed-by: Wenchao Xia<xiawenc@linux.vnet.ibm.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests: Update .gitignore for test-int128 and test-bitops
Forgotten in commit 6046c62 and 3464700.
Cc: qemu-stable@nongnu.orgReviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Markus Armbruster <armbru@redhat.com>...
chardev: handle qmp_chardev_add(KIND_MUX) failure
Cc: Markus Armbruster <armbru@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging
Message-id: 1380533055-24960-1-git-send-email-kraxel@redhat.com
Merge remote-tracking branch 'kraxel/roms.1' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio-net bugfix related to softmac programming.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'sstabellini/xen-2013-09-25' into staging
Merge remote-tracking branch 'rth/tcg-ppc-pull' into staging
Merge remote-tracking branch 'quintela/migration.next' into staging
Merge remote-tracking branch 'kraxel/audio.1' into staging
Merge remote-tracking branch 'borntraeger/tags/s390-next-20130924' into staging
This is a bunch of fixes/changes for the s390 architecture. It alsocontains the fixes from the previous pull request, which did not makeit yet.Overall it contains- a fix for kexec without kdump (which uses diag308 subcode 0 instead of 1)...
update seabios from 1.7.2.2 to 1.7.3.2
'git shortlog d4f7d90f..ece025f5' says:
Alex Williamson (4): seabios q35: Enable all PIRQn IRQs at startup seabios q35: Add new PCI slot to irq routing function seabios: Add a dummy PCI slot to irq mapping function...
roms: add support for building sgabios
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
roms: add 'make clean'
roms: enable parallel builds for 'make lgplvgabios'
Recurse into vgabios once, adjust dependencies, call make using$(MAKE) $(MAKEFLAGS) so jobserver mode works.
roms: build lgplvgabios isavga variant
Add logic to also build+install the isavga vgabios variant.
roms: parallel ipxe builds
Enable parallel ipxe builds. Reduce the recursive make calls. Callrecursive make properly using $(MAKE) $(MAKEFLAGS).
roms: rewrite scripts/refresh-pxe-roms.sh
Just use the Makefile in roms/
roms: add rules to build slof
Add some logic to detect cross compilers. Add support for "make slof",which should JustWork[tm] if you are on a ppx64 machine or have a ppc64cross compiler installed somewhere in your path.
roms: enable ipxe cross builds
roms: enable parallel seabios / seavgabios builds
smbios: Improve diagnostics for conflicting entries
We allow either tables or fields for the same type. Makes sense,because SeaBIOS uses fields only when no tables are present.
We do this by searching the SMBIOS blob for a previously added tableor field. Error messages look like this:...
smbios: Make multiple -smbios type= accumulate sanely
Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) withvalue VAL to fw_cfg for each unique NAME. If NAME occurs multipletimes, the last one's VAL is used (before the QemuOpts conversion, the...
smbios: Factor out smbios_maybe_add_str()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
smbios: Convert to QemuOpts
So that it can be set in config file for -readconfig.
This tightens parsing of -smbios, and makes it more consistent withother options: unknown parameters are rejected, numbers with trailingjunk are rejected, when a parameter is given multiple times, last...
smbios: Normalize smbios_entry_add()'s error handling to exit(1)
It exits on all error conditions but one, where it returns -1.Normalize, and return void.
qcow2: Always use error path in l2_allocate
Just returning -errno in some cases preventstrace_qcow2_l2_allocate_done from being executed (and, in one case, alsothe unused allocated L2 table from being freed). Always going down theerror path fixes this....
qcow2: Free only newly allocated clusters on error
In expand_zero_clusters_in_l1, a new cluster is only allocated if it wasnot already preallocated. On error, such preallocated clusters shouldnot be freed, but only the newly allocated ones.
Signed-off-by: Max Reitz <mreitz@redhat.com>...
qcow2: count_contiguous_clusters and compression
The function is not intended to be used on compressed clusters and willnot work correctly, if used anyway, since L2E_OFFSET_MASK is not theright mask for determining the offset of compressed clusters. Therefore,...
qcow2: COMPRESSED on count_contiguous_clusters
Compressed clusters can never be contiguous, therefore the correspondingflag does not need to be given explicitly to count_contiguous_clusters.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qcow2: Remove useless count_contiguous_clusters() parameter
All callers pass start = 0, and it's doubtful if any other value wouldactually do what you expect. Remove the parameter.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Jeff Cody <jcody@redhat.com>
qcow2: Don't put invalid L2 table into cache
In l2_allocate, the fail path is executed if qcow2_cache_flush fails.However, the L2 table has not yet been fetched from the L2 table cache.The qcow2_cache_put in the fail path therefore basically gives anundefined argument as the L2 table address (in this case)....
qemu-iotests: Preallocated zero clusters in 061
Add a test case for zero cluster expansion on an image completely filledwith preallocated zero clusters to test 061.
qcow2: Correct bitmap size in zero expansion
Since the expanded_clusters bitmap is addressed using host offsets inthe underlying image file, the correct size to use for allocating thebitmap is not determined by the guest disk image but by the underlying...
qemu-iotests: Quote $TEST_IMG* and $TEST_DIR usage
A lot of image filename and paths are used unquoted. Quote these tomake sure that directories / filenames with spaces are not problematic.
Signed-off-by: Jeff Cody <jcody@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
qemu-iotests: Add basic ability to use binary sample images
For image formats that are not "QEMU native", but supported forcompatibility, it is useful to verify that an image created withthe 'gold standard' native tool can be read / written to successfully...
qemu-iotests: fix qmp.py search path
QMP/qmp.py is renamed to scripts/qmp/qmp.py, fix the search path in iotests.py.
Signed-off-by: Fam Zheng <famz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: use DIV_ROUND_UP in bdrv_co_do_readv
Signed-off-by: Fam Zheng <famz@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qcow2: Assert against currently impossible overflow
If qcow2_alloc_cluster_link_l2 is called with a QCowL2Meta describing arequest crossing L2 boundaries, a buffer overflow will occur. This isimpossible right now since such requests are never generated (every...
misc: Use new rotate functions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
bitops: Add rotate functions (rol8, ror8, ...)
These functions were copies from include/linux/bitopts.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Richard Henderson <rth@twiddle.net>
tci: Add implementation of rotl_i64, rotr_i64
It is used by qemu-ppc64 when running Debian's busybox-static.
Cc: qemu-stable <qemu-stable@nongnu.org>Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Richard Henderson <rth@twiddle.net>
block: qed - use QEMU_PACKED for on-disk structures
QEDHeader is read, and written, directly from on-disk imagesvia bdrv_pread()/write(). To avoid any unintentional padding,these structs should be packed.
Signed-off-by: Jeff Cody <jcody@redhat.com>Reviewed-by: Richard Henderson <rth@twiddle.net>...
block: qcow2 - used QEMU_PACKED for on-disk structures
QCowHeader and QCowExtension are structs that reside in the on-diskimage format, and are read and written directly via bdrv_pread()/write(),and as such should be packed to avoid any unintentional struct padding....
block: vpc - use QEMU_PACKED for on-disk structures
The VHD footer and header structs (vhd_footer and vhd_dyndisk_header)are on-disk structures for the image format, and as such should bepacked.
Go ahead and make these typedefs as well, with the preferred QEMU...
block: vdi - use QEMU_PACKED for on-disk structures
The header struct VdiHeader is an on-disk structure for the imageformat, and as such should be packed.
Signed-off-by: Jeff Cody <jcody@redhat.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xen: Enable cpu-hotplug on xenfv machine.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen: Fix vcpu initialization.
Each vcpu need a evtchn binded in qemu, even those that areoffline at QEMU initialisation.
qemu: Add qemu xen logic for Xen HVM S3 resume
This patch is qemu patch 2 to fix Xen HVM S3 bug, adding qemuxen logic. When qemu wakeup, qemu xen logic is notified andhypercall to xen hypervisor to unpause domain.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>...
qemu: Adjust qemu wakeup
Currently Xen hvm s3 has a bug coming from the difference betweenqemu-traditioanl and qemu-xen. For qemu-traditional, the way toresume from hvm s3 is via 'xl trigger' command. However, forqemu-xen, the way to resume from hvm s3 inherited from standard...
tcg-ppc64: Implement CONFIG_QEMU_LDST_OPTIMIZATION
tcg-ppc64: Implement tcg_register_jit
tcg-ppc64: Streamline tcg_out_tlb_read
Less conditional compilation. Merge an add insn with the indexedmemory load insn. Load the tlb addend earlier. Avoid the addressupdate memory form.
Fix a bug in not allowing large enough tlb offsets for some guests....
tcg-ppc64: Add _noaddr functions for emitting forward branches
... rather than open-coding this stuff through the file.