target-arm: Log bad system register accesses with LOG_UNIMP
Log guest attempts to access unimplemented system registers viathe LOG_UNIMP reporting mechanism (for both the 32 bit and 64 bitinstruction sets). This is particularly useful for debuggingproblems where the guest is trying to use a system register that...
target-arm: Define names for SCTLR bits
The SCTLR is full of bits for enabling or disabling various things, and sothere are many places in the code which check if certain bits are set.Define some named constants for the SCTLR bits so these checks are easier...
target-arm: Restrict check_ap() use of S and R bits to v6 and earlier
The SCTLR bits S and R (8 and 9) only exist in ARMv6 and earlier.In ARMv7 these bits RAZ, and in ARMv8 they are reassigned. Guardthe use of them in check_ap() so that we don't get incorrect results...
target-arm: Remove unused ARMCPUState sr substruct
Remove the 'struct sr' from ARMCPUState -- it isn't actually used and isa hangover from the original separate system register implementation usedby the SuSE linux-user-mode-only AArch64 target.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-arm: A64: Implement floating point pairwise insns
Add support for the floating-point pairwise operationsFADDP, FMAXP, FMAXNMP, FMINP and FMINNMP. To do this we use thecode which was previously handling only integer pairwise operations,and push the integer-specific decode and handling of unallocated...
softfloat: Support halving the result of muladd operation
The ARMv8 instruction set includes a fused floating pointreciprocal square root step instruction which demands an"(x * y + z) / 2" fused operation. Support this by addinga flag to the softfloat muladd operations which requests...
target-arm: A64: Implement remaining 3-same instructions
Implement the remaining instructions in the SIMD 3-reg-sameand scalar-3-reg-same groups: FMULX, FRECPS, FRSQRTS, FACGE,FACGT, FMLA and FMLS.
target-arm/kvm-consts.h: Define QEMU constants for known KVM CPUs
Extend the set of CPUs for which we provide a QEMU_KVM_ARM_TARGET_*constant to include all the ones currently supported by the kernelheaders we are using.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm: A64: Implement long vector x indexed insns
Implement the 'long' operations in the vector x indexedelement category.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <rth@twiddle.net>
target-arm: A64: Implement SIMD scalar indexed instructions
Implement the SIMD scalar indexed instructions. The encodinghere is nearly identical to the vector indexed grouping, sowe combine the two.
target-arm: A64: Implement scalar three different instructions
Implement the scalar three different instruction group:it only has three instructions in it.
target-arm: A64: Implement SIMD FP compare and set insns
This adds all forms of the SIMD floating point and set instructions:
FCM(GT|GE|EQ|LE|LT)
Most of the heavy lifting is done by either the existing neon helpers orsome new helpers for the 64bit double cases. Most of the code paths are...
hw/intc/arm_gic: Fix NVIC assertion failure
Commit 40d225009ef accidentally changed the behaviour ofgic_acknowledge_irq() for the NVIC. The NVIC doesn't have SGIs,so this meant we hit an assertion: gic_acknowledge_irq: Assertion `s->sgi_pending[irq][cpu] != 0' failed....
target-arm: A64: Implement plain vector SIMD indexed element insns
Implement all the SIMD vector x indexed element instructionsin the subcategory which are not 'long' ops.
Fix QEMU build on OpenBSD on x86 archs
This resolves the build issue with building the ROMs on OpenBSD on x86 archs.As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus thewhole OS/packages and so forth. The ROMs need to have PIE disabled....
libvixl: fix 64bit constants usage
Since commit 999b53ec8794f203964db3ecf939a3da5c4bc843: Author: Claudio Fontana <claudio.fontana@linaro.org> Date: Wed Feb 5 17:27:28 2014 +0000
disas: Implement disassembly output for A64
Use libvixl to implement disassembly output in debug...
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging
trivial patches for 2014-02-15
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
Merge remote-tracking branch 'remotes/jliu/or32-ld-st' into staging
Merge remote-tracking branch 'remotes/jovanovic/mips-ufrp' into staging
misc: Fix case Qemu -> QEMU
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
sparc/leon3: Initialize stack pointer
A lot of real world LEON3 systems are shipped with the GRMON bootloader. This boot loader initializes the stack pointer with the end ofRAM address. The application can use this to detect the RAM size of aparticular board variant....
configure: add hint of libfdt to DTC dependency not found message
Most distros package it as libfdt, and mentioning libfdt here makes itmuch easier to find the package you're missing.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>Reviewed-by: Stefan Weil <sw@weilnetz.de>...
configure: add hints to a remedy for feature_not_found errors
Modify feature_not_found to accept an optional second parameter to beprinted after the generic feature not found error.
Modify most calls to feature_not_found to provide hints as to thepackages that may be missing. The few calls remaining without a remedy...
linux-user: refactor do_socketcall()
Refactor do_socketcall() to do argument conversion/checking first,according to a lookup table (which call has how many args) andby calling the right function second with ready-to-go arguments.
This ensures that all arguments are handled as abi_long, according...
net: declare struct iovec in checksum.h to fix compiler warning
The checksum calculation header exports a function that refers tostruct iov defined in iov.h. Without including the former, buildfails like this:
In file included from hw/net/fsl_etsec/rings.c:24:0:...
vl: remove old, long-unused defines
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
vl: trim includes
Over time, lots of stuff moved from vl.c into separatefiles. But include statements has never been cleaned,and they continue to carry lots of anymore-unused stuff.
Remove includes which are not relevant for vl.c anymore.Apparently there are more includes like this, because...
gitignore: anchor all ignored names
by default, patterns/names in .gitignore are appliedrecursively to all subdirectories. So any name mentionedin .gitignore is ignored in all subdirectores. This is goodfor, say. object files (*.o), but not good for particular...
char/serial: Fix emptyness check
This was guarding against a full fifo rather than an empty fifo whenpopping. Fix.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Martin Kletzander <mkletzan@redhat.com>Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>...
block: qemu-iotests - add vhdx log replay tests for qemu-img
VHDX logs can now be replayed via 'qemu-img check -r all'. Addtests to verify that the log replay is successful when using qemu-img.
Signed-off-by: Jeff Cody <jcody@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-iotests: Don't run 005 on vmdk split formats
There would be too many extents that VMDK driver can't open all of them:
005 0s ... - output mismatch (see 005.out.bad) --- 005.out 2013-12-24 09:27:27.608181030 0800 ++ 005.out.bad 2014-02-13 10:00:15.282184557 +0800...
block: mirror - use local_err to avoid NULL errp
When starting a block job, commit_active_start() relies on whether *errpis set by mirror_start_job. This allows it to determine if the mirrorjob start failed, so that it can clean up any changes to open flags from...
blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
As bdrv_open() documentation states:"The reference to the QDict belongs to the block layer * after the call (even on failure), so if the caller intends to reuse the * dictionary, it needs to use QINCREF before calling bdrv_open."...
block: Relax bdrv_lookup_bs constraints.
The following patch will reuse bdrv_lookup_bs in order to open images byreferences so the rules of usage of bdrv_lookup_bs must be relaxed a bit.
Signed-off-by: Benoit Canet <benoit@irqsave.net>Reviewed-by: Max Reitz <mreitz@redhat.com>...
block: Open by reference will try device then node_name.
Since we introduced node_name for named bs of the graph modify the opening byreference to use it as a fallback.
This patch also enforce the separation of the device id and graph nodenamespaces....
block: Don't throw away errno via error_setg
There are a handful of places in the block layer where a failure pathhas a valid -errno value, yet error_setg() is used. Those instancesshould instead use error_setg_errno(), to preserve as much errorinformation as possible....
block: qemu-iotests - fix test 070 (vhdx)
VHDX test 070 failed, due to different output from qemu-io / qemuwhen opening an image read-only that contains a log file. Filterthe output, and update the expected results to match the correctoutput.
Signed-off-by: Jeff Cody <jcody@redhat.com>...
block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
iSCSI currently does not need to do any actions to support thecurrent usage of bdrv_reopen(). However, it is important to notea couple of things: 1.) A connection will not be re-established to...
sdhci: Drop unnecessary #include
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Fam Zheng <famz@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
blockdev: Remove 'type' parameter from blockdev_init()
blockdev-add doesn't know about the device that the backend will beattached to, this is a legacy -drive concept. Move the remaining checksthat use it to drive_init().
[Fam Zheng <famz@redhat.com> suggested line-wrapping to 80 chars as...
PPC: KVM: Add missing address space to ldl_phys helper
We now have to pass an address space to our _phys helpers. During thetransition apparently the EPR exit path missed out, so let's put it there.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi,pc,pci fixes and enhancements
Most changes here are hotplug related:
This merges hotplug infrastructure changes by Igor,some acpi related fixes, and PC fixes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging
PReP machine and devices
Merge remote-tracking branch 'remotes/alon/pull-libcacard.glusterfs' into staging
Merge remote-tracking branch 'remotes/kevin/tags/for-anthony' into staging
Block patches
target-openrisc: Use new qemu_ld/st opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>Acked-by: Jia Liu <proljc@gmail.com>Signed-off-by: Jia Liu <proljc@gmail.com>
petalogix-ml605: Create the CPU with object_new()
This is to allow future patches to set properties before cpu::realize().
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec: Make cpu_memory_rw_debug use the CPUs AS
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec: Make cpu_physical_memory_write_rom input an AS
exec: Make stb_phys input an AddressSpace
exec: Make stw_*_phys input an AddressSpace
exec: Make stl_phys_notdirty input an AddressSpace
exec: Make stl_*_phys input an AddressSpace
exec: Make stq_*_phys input an AddressSpace
exec: Make lduw_*_phys input an AddressSpace
exec: Make ldq/ldub_*_phys input an AddressSpace
exec: Make ldl_*_phys input an AddressSpace
exec: On AS changes, only flush affected CPU TLBs
cpu: Add per-cpu address space
memory: Add MemoryListener to typedefs.h
exec: Make memory_region_section_get_iotlb use section AS
exec: Always initialize MemorySection address spaces
exec: Make iotlb_to_region input an AS
exec: Make tb_invalidate_phys_addr input an AS
No functional change.
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140208' into staging
target-arm queue: * more A64 Neon instructions * AArch32 VCVTB and VCVTT ARMv8 instructions * fixes to inaccuracies in GIC emulation * libvixl disassembler for A64...
Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging
memory: fix limiting of translation at a page boundary
Commit 360e607 (address_space_translate: do not cross page boundaries,2014-01-30) broke MMIO accesses in cases where the section is shorterthan the full register width. This can happen for example with the...
prep: Drop from ppcemb-softmmu
ppcemb covers only embedded processors, which does not include PReP.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
target-mips: add user-mode FR switch support for MIPS32r5
Description of UFR feature:
Required in MIPS32r5 if floating point is implemented and user-mode FRswitching is supported. The UFR register allows user-mode to clear StatusFRby executing a CTC1 to UFR with GPR0 as input, and read StatusFR by...
target-mips: add support for CP0_Config5
Add CP0_Config5, define rw_bitmask and enable modifications.
Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>Reviewed-by: Eric Johnson <eric.johnson@imgtec.com>
target-mips: add support for CP0_Config4
Add CP0_Config4, define rw_bitmask.
target-mips: add CPU definition for MIPS32R5
Add mips32r5-generic among CPU definitions for MIPS.Define ISA_MIPS32R3 and ISA_MIPS32R5.
ACPI: Remove commented-out code from HPET._CRS
IRQNoFlags on HPET._CRS crashes WinXP because it causes the HPETto conflict with the system timer and/or the RTC. It only occurson Apple hardware, and even there it is exposed fully only whenOS X is detected (via _OSI). Recent OS X versions work on QEMU...
acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API
Split piix4_device_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPIIX4_PM device.
Replace pci_bus_hotplug() wiring with setting link on...
pci/shpc: convert SHPC hotplug to use hotplug-handler API
Split shpc_device_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPCI_BRIDGE_DEV device.
Replace pci_bus_hotplug() wiring with setting link on PCI BUS...
pci/pcie: convert PCIE hotplug to use hotplug-handler API
Split pcie_cap_slot_hotplug() into hotplug/unplug callbacksand register them as "hotplug-handler" interface implementation ofPCIE_SLOT device.
hw/pci: switch to a generic hotplug handling for PCIDevice
make qdev_unplug()/device_set_realized() to call hotplug handler'splug/unplug methods if available and remove not needed anymorehot(un)plug handling from PCIDevice.
In case if hotplug handler is not available, revert to the legacy...
qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and usegeneric DeviceClass.hotpluggable field instead.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>...
hw/acpi: move typeinfo to the file end
do so to avoid not necessary forward declarations andplace typeinfo registration at the file end where it'susually expected.
loader: document that errno is set
Document that get_image_size sets errnoon failure.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
define hotplug interface
Provide a generic hotplug interface for hotplug handlers.Intended for replacing hotplug mechanism used byPCI/PCIE/SHPC code and will be used for memory hotplug.
qdev: add to BusState "hotplug-handler" link
It will allow to reuse field with different BUSes,reducing code duplication. Field is intended forreplacing 'hotplug_qdev' field in PCIBus and alsowill allow to avoid adding equivalent field toDimmBus with possiblitity to refactor other BUSes...
qdev: add "hotpluggable" property to Device
Currently it's possible to make PCIDevice not hotpluggableby using no_hotplug field of PCIDeviceClass. However itlimits this only to PCI devices and prevents fromgeneralizing hotplug code.
So add similar field to DeviceClass so it could be reused...
raven: Use constant PCI_NUM_PINS instead of 4
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Andreas Färber <andreas.faerber@web.de>
prep: Kill get_system_io() usage
While ISA address space in prep machine is currently the one returnedby get_system_io(), this depends of the implementation of i82378/ravendevices, and this may not be the case forever.
Use the right ISA address space when adding some more ports to it....
libcacard: Don't link with all libraries QEMU links to
As described in https://bugzilla.redhat.com/show_bug.cgi?id=987441 ,libcacard currently links to all the libraries QEMU is linking to,including glusterfs libraries, libiscsi, ... libcacard does not need all of...
qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()
n_start can be actually calculated from offset. The number ofsectors to be allocated(n_end - n_start) can be passed in innum. By removing n_start and n_end, we can save two parameters.
The side effect is there is a bug in qcow2.c:preallocate() that...
qcow2: fix offset overflow in qcow2_alloc_clusters_at()
When cluster size is big enough it can lead to an offset overflowin qcow2_alloc_clusters_at(). This patch fixes it.
The allocation is stopped each time at L2 table boundary(see handle_alloc()), so the possible maximum bytes could be...
qcow2: check for NULL l2meta
In the case of a metadata preallocation with a large cluster size,qcow2_alloc_cluster_offset() can allocate nothing and returns aNULL l2meta. This patch checks for it and link2 l2 with only validl2meta.
Replace 9 and 512 with BDRV_SECTOR_BITS, BDRV_SECTOR_SIZE...
qemu-iotests: add test for qcow2 preallocation with different cluster sizes
Reviewed-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
raw: Fix BlockLimits passthrough
raw copies over the BlockLimits of bs->file during bdrv_open().However, since commit d34682cd it is immediately overwritten duringbdrv_refresh_limits(). This caused all fields except foropt_transfer_length and opt_mem_alignment (which happen to be correctly...
block: Fix memory leaks in bdrv_co_do_pwritev()
The error path for a failure in one of the two bdrv_aligned_preadv()calls leaked head_buf or tail_buf, respectively. This fixes the memoryleak.
Reported-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
block: bdrv_aligned_pwritev: Assert overlap range
This adds assertions that the request that we actually end up passing tothe block driver (which includes RMW data and has therefore potentiallybeen rounded to alignment boundaries) is fully covered by the...
block: Don't call ROUND_UP with negative values
The behaviour of the ROUND_UP macro with negative numbers isn't obvious.It happens to do the right thing in this please, but better avoid it.
Suggested-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
blkdebug: Don't leak bs->file on failure
Reported-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>
block: Fix 32 bit truncation in mark_request_serialising()
On 32 bit hosts, size_t is too small for align as the bitmask~(align - 1) will zero out the higher 32 bits of the offset.
While at it, change the local overlap_bytes variable to unsigned tomatch the field in BdrvTrackedRequest....
qemu-iotests: enable support for NFS protocol
Signed-off-by: Peter Lieven <pl@kamp.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Fail gracefully with missing filename
This fixes a regression introduced in commit 2a05cbe42 ('block: Allowblock devices without files'):
$ qemu-system-x86_64 drive driver=fileqemu-system-x86_64: block.c:892: bdrv_open_common: Assertion`!drv>bdrv_needs_filename || filename != ((void *)0)' failed....
block/iscsi: always fill bs->bl.opt_transfer_length
the opt_transfer_length has nothing to do with logicalblock provisioning stuff so always copy it fromthe block limits VPD page.
Reported-By: Benoit Canet <benoit@irqsave.net>Signed-off-by: Peter Lieven <pl@kamp.de>...