qed: Add support for zero clusters
Zero clusters are similar to unallocated clusters except instead of readingtheir value from a backing file when one is available, the cluster is alwaysread as zero.
This implements read support only. At this stage, QED will never write a...
docs: Describe zero data clusters in QED specification
Zero data clusters are a space-efficient way of storing zeroed regionsof the image.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
target-arm: Handle UNDEF cases for Neon invalid modified-immediates
For Neon "one register and a modified immediate value" forms, thecombination op=1 cmode=1111 is unallocated and should UNDEF.All instructions of this form also UNDEF if Q 1 and Vd<0> 1....
target-arm: Handle UNDEF cases for Neon 3-regs-different-widths
Add missing UNDEF checks for instructions in the Neon "3 registers ofdifferent widths" data processing space.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Handle UNDEF cases for Neon 2 regs + scalar forms
Add missing checks for cases which must UNDEF in the Neon "2 registers anda scalar" data processing instruction space.
target-arm: Handle UNDEF cases for VEXT
VEXT must UNDEF if Q 1 && (Vd<0> 1 || Vr<0> 1 || Vm<0> 1)
target-arm: Simplify checking of size field in Neon 2reg-misc forms
Many of the Neon "2 register misc" instruction forms require invalidsize fields to cause the instruction to UNDEF. Pull this informationout into an array; this simplifies the code and also means we can do...
target-arm: Handle UNDEF cases for Neon 2 register misc forms
Add missing UNDEF checks for Neon "two register miscellaneous" forms: * all instructions except VMOVN,VQMOVN must UNDEF if Q==1 && (Vd<0> 1 || Vm<0> 1) * VMOVN,VQMOVN,VCVT.F16.F32 UNDEF if Q 1 || Vm<0> 1...
target-arm: Treat UNPREDICTABLE VTBL, VTBX case as UNDEF
Catch the UNPREDICTABLE case for Neon VTBL,VTBX, and UNDEF itrather than allowing the helper function to index off the endof the register file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-arm: Handle UNDEF cases for VDUP (scalar)
Handle the UNDEF cases for VDUP: imm4 x000 Q 1 && Vd<0> == 1
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
softfloat: Add setter function for tininess detection mode
Add a setter function for the underflow tininess detection mode,in line with the similar functions for other parts of the float statusstructure.
target-arm: Detect tininess before rounding for FP operations
The ARM architecture mandates that we detect tininess before rounding,so set the softfloat fp_status up appropriately.
target-arm: Collapse VSRI case into VSHL, VSLI
Collapse some switch cases for VSRI into those for VSHL, VSLI,since the bodies are the same. (This is not completely obviousfor the size < 3 case, but since for VSRI we know U=1 theGEN_NEON_INTEGER_OP() expansion is equivalent to the open-coded...
fix acpi regression
This bug is introduced by commit 23910d3f.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Use lookup table for size check on Neon 3-reg-same insns
Simplify the checks for invalid size values for the Neon "three registersof the same size" instruction forms (and add them where they were missing)by using a lookup table.
This includes adding symbolic constants for the op values in this space,...
target-arm: Handle UNDEF cases for Neon 3-regs-same insns
Correct the handling of UNDEF cases for the NEON "3 registers samesize" forms, by adding missing checks and rationalising some othersso they are done early enough to avoid leaking TCG temporaries....
target-arm: Simplify three-register pairwise code
Since we know that the case of (pairwise && q) has been caughtearlier, we can simplify the register setup code for each passin the three-register-same-size Neon loop.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>...
target-arm: Handle UNDEF cases for Neon "2 regs and shift" insns
Correctly handle all the UNDEF cases for Neon instructions of the"2 registers and shift" form, and make sure that we check for thesecases early enough not to leak TCG temporaries.
target-sh4: get rid of CPU_{Float,Double}U
SH4 is always using softfloat, so it's possible to have helpers directlytaking float32 or float64 value. This allow to get rid of conversionsthrough CPU_{Float,Double}U.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-ppc: remove #ifdef FLOAT128
Now that PPC defaults to softfloat which always provides float128support, there is no need to keep two version of the code, depending iffloat128 support is available or not. Suggested by Peter Maydell.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
configure: disable opengl per default
There is a bug in nvidia's binary GPU driver, which causes a segmentationfault if linked to libGL.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write
A lot of calls don't operate on bytes but on words or on structured data.So instead of a pointer to uint8_t, a void pointer is the better choice.
This allows removing many type casts....
exec: Remove a type cast which is no longer needed
All other type casts in calls of cpu_physical_memory_write areused by hardware emulations and will be fixed by separate patches.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
monitor: Remove some type casts which are no longer needed
All other type casts in calls of cpu_physical_memory_read areused by hardware emulations and will be fixed by separate patches.
Replace cpu_physical_memory_rw were possible
Using cpu_physical_memory_read, cpu_physical_memory_write and ldub_physimproves readability and allows removing some type casts.
lduw_phys and ldl_phys were not used because both require alignedaddresses. Therefore it is not possible to simply replace existing...
unicore32: necessary modifications for other files to support unicore32
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
unicore32: add necessry headers in linux-user/unicore32 for unicore32 support
unicore32: add target-unicore32 directory for unicore32-linux-user support
microblaze: Add partial decoding of stream insns
Based on a patch from: Alejandro Cabrera <aldaya@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Add stream-insn related constants
microblaze: Correct ec mask in debug print
microblaze: Add constant for exception-code mask
microblaze: Correct MMU_ZONES mask
Signed-off-by: Alejandro Cabrera <aldaya@gmail.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
ppc: remove a write-only variable
Remove a write-only variable, spotted by GCC 4.6.0:/src/qemu/hw/ppc.c: In function 'power7_set_irq':/src/qemu/hw/ppc.c:255:9: error: variable 'cur_level' set but not used [-Werror=unused-but-set-variable]
Acked-by: Alexander Graf <agraf@suse.de>...
s390x: fix virtio feature bitmap
The feature bitmap in the s390 virtio machine is little endian. Toaddress for that, we need to bswap the values after reading them out.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
s390x: set alignment for long to 8
The alignment for longs on s390x is 8. That's the only place where it differsfrom the default alignments found in configure already. The example alignmentprogram from Laurent printed the following on a real s390x:
alignof(short) 2...
musicpal: Fix registration of MMIO-less sysbus devices
The proper way to signal that a sysbus devices need no MMIO region is topass -1 to sysbus_create_simple.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
acpi, acpi_piix: factor out GPE logic
factor out ACPI GPE logic. Later it will be used by ICH9 ACPI.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
arm: basic support for ARMv4/ARMv4T emulation
Currently target-arm/ assumes at least ARMv5 core. Add support forhandling also ARMv4/ARMv4T. This changes the following instructions:
BX
BKPT, BLX, CDP2, CLZ, LDC2, LDRD, MCRR, MCRR2, MRRC, MCRR, MRC2, MRRC,...
Fix conversions from pointer to tcg_target_long
tcg_gen_exit_tb takes a parameter of type tcg_target_long,so the type casts of pointer to long should be replaced bytype casts of pointer to tcg_target_long (suggested by Blue Swirl).
These changes are needed for build environments where...
vnc: tight: Fix crash after 2GB of output
fix 2Gb integer overflow in in VNC tight and zlib encodings
As found by Roland Dreier <roland@purestorage.com> (excellentcatch!), when amount of VNC compressed data produced by zliband sent to client exceeds 2Gb, integer overflow occurs because...
smbus_eeprom: consolidate smbus eeprom creation oc pc_piix, mips_mapta, mips_fulong
consolidate smbus initialization for pc_piix, mips_malta and mips_fulong.
Cc: Aurelien Jarno <aurelien@aurel32.net>Cc: Huacai Chen <zltjiangshi@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
lan9118: Ignore write to MAC_VLAN1 register
On Mon, 4 Apr 2011 20:15:30 +0200, Aurelien Jarno <aurelien@aurel32.net> wrote:
Is it really safe ignoring write to this register? If yes, it's probablya good idea to explain why in a comment. In any case, if supporting this...
acpi, acpi_piix, vt82c686: factor out PM1_CNT logic
factor out ACPI PM1_CNT logic. This will be used by ich9 acpi.
Cc: Blue Swirl <blauwirbel@gmail.com>Cc: Huacai Chen <zltjiangshi@gmail.com>Cc: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
acpi, acpi_piix, vt82c686: factor out PM_TMR logic
factor out PM_TMR logic. Later This will be used by ich9 acpi.Also fixes the same bug in vt82c686.c that was fixed by the followingcommits.
commit 055479feab63607b8042bb8ebb2e0523f17cbc4eAuthor: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>...
acpi, acpi_piix, vt82c686: factor out PM1a EVT logic
factor out ACPI PM1a EVT logic.Later this will be used by ich9 acpi.
hw/pflash_cfi02: Fix lazy reset of ROMD mode
When checking pfl->rom_mode for when to lazily reenter ROMD mode,the value was check was the opposite of what it should have been.This prevent the part from returning to ROMD mode after a writewas made to the CFI rom region....
configure: avoid basename usage message
basename prints a missing-argument error when sdlconfig is emptyand we're cross-compiling.
Signed-off-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
mpc85xx_pci_map_irq: change "unknow" to "unknown"
Signed-off-by: Scott Wood <scottwood@freescale.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
event: trivial coding style fixes
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
multiboot: Quote filename in error message
Quote filename in error message to spot possible whitespace character inthe filename and make error message more meaningful.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Acked-by: Alexander Graf <agraf@suse.de>...
ppce500_mpc8544ds: Fix compile with --enable-debug and --disable-kvm
When configured with --enable-debug, we compile without optimization.This means that the function mpc8544_copy_soc_cell() in ppce500_mpc8544ds.cis not optimized out, even though it is never called without kvm. That in...
pseries: Abolish envs array
Currently the pseries machine init code builds up an array, envs, ofCPUState pointers for all the cpus in the system. This is kind ofpointless, given the generic code already has a perfectly good linked listof the cpus.
In addition, there are a number of places which assume that the cpu's...
Delay creation of pseries device tree until reset
At present, the 'pseries' machine creates a flattened device tree in themachine->init function to pass to either the guest kernel or to firmware.
However, the machine->init function runs before processing of -device...
Use existing helper function to implement popcntd instruction
The recent patches adding partial support for POWER7 cpu emulation includedimplementing the popcntd instruction. The support for this was open coded,but host-utils.h already included a function implementing an equivalent...
Don't call cpu_synchronize_state() from machine init.
This will deadlock when the I/O thread is used, since theCPU thread is blocked waiting for qemu_system_ready.
The synchronization is unnecessary since this is beforecpu_synchronize_all_post_init()....
spapr_vscsi: Set uninitialized variable
cppcheck reports this error:
hw/spapr_vscsi.c:274: error: Uninitialized variable: rc
If llen == 0, rc was indeed used without being initialized.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Alexander Graf <agraf@suse.de>
Merge remote branch 'kwolf/for-anthony' into staging
virtio-blk: fail unaligned requests
Like all block drivers virtio-blk should not allow small than block sizegranularity access. But given that the protocol specifies abyte unit length field we currently accept such requests, which causeqemu to abort() in lower layers. Add checks to the main read and...
usb-ccid: Spelling fixes
While looking at David Gibson's build-fix for hw/usb-ccid.c, I noticed a spelloin a comment on the following (unchanged) line.
qdev: Fix comment around qdev_init_nofail()
In previous life qdev_init_nofail() used to call hw_error() whichdid register dump and other scary things. Now it callserror_report() and does a regular exit(1). Fix the commentto match reality.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>...
spapr_llan: Fix warning when compiled with -dDEBUG
Compiling with the DEBUG macro causes leaves hw/spapr_llan.c with anunused variable, which is treated as an error in the qemu build.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: David Gibson <david@gibson.dropbear.id.au>...
virtio-9p: fixed LE-to-host conversion bug when QEMU is called from guest
The 9p code already contains an attempt at the necessary endianconversions, but it's broken.
The code which does conversion from host to guest does it correctlyand this code was copied to the function which does guest to host...
virtio-balloon: fixed endianness bug in the config space
The specification for the virtio balloon device requres that the valuesin the config space be encoded little-endian. This differs from mostvirtio things, where guest-native endian is the norm.
Currently, the qemu virtio-balloon code correctly makes the conversion...
qemu-img rebase: Fix segfault if backing file can't be opened
bdrv_delete must not be called for a NULL BlockDriverState.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
exit if -drive specified is invalid instead of ignoring the "wrong" -drive
This fixes the problem when qemu continues even if -drive specificationis somehow invalid, resulting in a mess. Applicable for both currentmaster and for stable-0.14 (and the same issue exist 0.13 and 0.12 too)....
ide: consolidate drive_get(IF_IDE)
factor out ide initialization to call drive_get(IF_IDE)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
NBD library: whitespace changes
Signed-off-by: Nick Thomas <nick@bytemark.co.uk>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Set errno=ENOTSUP for attempts to use UNIX sockets on Windows platforms
NBD: Use qemu_socket functions to open TCP and UNIX sockets
This commit has the side-effect of making the qemu-nbd binarycapable of binding to IPv6 addresses. ("-b ::1", for instance).block/nbd.c fails to parse IPv6 IP addresses correctly at thispoint, but will work over IPv6 when given a hostname. It still...
NBD device: Separate out parsing configuration and opening sockets.
We also change the way the file parameter is parsed so IPv6 IPaddresses can be used, e.g.: "drive=nbd:[::1]:5000"
floppy: save and restore DIR register
We need to keep DIR register unchanged across migration, but currently itdepends on the media_changed flags from block layer. Since we do notsave/restore it and the bdrv_open() called in dest node may set themedia_changed flag when trying to open floppy image, guest driver may think the...
Fix integer overflow in block migration bandwidth calculation
block_mig_state.reads is an int, and multiplying by BLOCK_SIZE yielded anegative number, resulting in a negative bandwidth (running on a 32-bitmachine). Change order to avoid.
Signed-off-by: Avishay Traeger <avishay@il.ibm.com>...
hw/xen_disk: ioreq not finished on error
Bug fix: routines 'ioreq_runio_qemu_sync' and 'ioreq_runio_qemu_aio'won't call 'ioreq_unmap' or 'ioreq_finish' on errors, leaving ioreq inthe blkdev->inflight list and a leak.
Signed-off-by: Feiran Zheng <famcool@gmail.com>...
Do not delete BlockDriverState when deleting the drive
When removing a drive from the host-side via drive_del we currently havethe following path:
drive_delqemu_aio_flush()bdrv_close() // zaps bs->drv, which makes any subsequent I/O get // dropped. Works as designed...
trace: Trace bdrv_set_locked()
It can be handy to know when the guest locks/unlocks the CD-ROM tray.This trace event makes that possible.
block: Do not cache device size for removable media
The block layer caches the device size to avoid doing lseek(fd, 0,SEEK_END) every time this value is needed. For removable media thedevice size becomes stale if a new medium is inserted. This patchsimply prevents device size caching for removable media....
qemu-img: Initial progress printing support
This adds the basic infrastructure for supporting progress outputon the command line, as well as progress support for qemu-img commands'rebase' and 'convert'.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
exec: Handle registrations of the entire address space
configure: add --version flag
Standard autoconf scripts include a --version flag so people can easilyquery things. Add this to qemu's configure so it too can integrate withbuild systems that have standard autotool helpers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>...
cpu-all.h: Remove unnecessary target-specific ifdef for CPU_QuadU
CPU_QuadU isn't used on all targets, but there's no harm in defining thetypedef anyway. It only needs to be guarded by CONFIG_SOFTFLOAT, becausesoftfloat-native doesn't have a float128 type. This avoids the need for...
target-arm: Use global env in iwmmxt_helper.c helpers
Use the global 'env' variable in the helper functions in iwmmxt_helper.c.This means we don't need to pass env as an argument to them any more.
target-arm: Make Neon helper routines use correct FP status
Make the Neon helper routines use the correct FP status fromthe CPUEnv rather than using a dummy static one. This meansthey will correctly handle denormals and NaNs and will setFPSCR exception bits properly....
Makefile.target: Allow target helpers to be in any *_helper.c file
Build all files matching *_helper.c with HELPER_CFLAGS, not justop_helper.c. This allows you to put target helper functions whichuse the global 'env' variable in multiple source files....
target-arm: Use global env in neon_helper.c helpers
Use the global 'env' variable in the helper functions in neon_helper.c.This means we don't need to pass env as an argument to them any more.
Fix non-portable format string in usb-ccid.c
At one point, usb-ccid.c attempts to use a %lX format specifier to printa uint64_t, which is only correct on some host platforms. This patchcorrects the statement to use the stdint specified PRIX64 constant instead....
lm32: add support for the Milkymist board
This patch adds almost complete support for the Milkymist system-on-chip(http://www.milkymist.org).
Additional to running bare metal applications, booting a linux kernel withinitrd is supported.
Signed-off-by: Michael Walle <michael@walle.cc>...
MAINTAINERS: add Milkymist board
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
lm32: add Milkymist AC97 support
This patch adds support for the Milkymist AC97 compatible sound output andinput core.
lm32: add Milkymist HPDMC support
This patch adds support for the Milkymist's High Performance Dynamic MemoryController. This is just a dumb model without any functionality. While thereal hardware acts for example as a bridge between software and hardware...
lm32: add Milkymist memory card support
This patch adds support for Milkymist's memory card core.
lm32: add Milkymist Minimac support
This patch adds support for Milkymist's minimal Ethernet MAC.
lm32: add Milkymist PFPU support
This patch adds support for Milkymist's Programmable FPU.
lm32: add Milkymist SoftUSB support
This patch adds support for Milkymist's SoftUSB core. This model differfrom the real hardware in its functionality. The real hardware consits of atiny freely programmable microcontroller which controls the USB ports. For...
lm32: add Milkymist System Controller support
This patch adds support for Milkymist's System Controller core. The modelhas the following features: - support for shutting down and restarting the board - provide two timers and GPIO - provide registers for system identification and reading the boards...
configure: add opengl detection
This patch introduce a new config option CONFIG_OPENGL.
lm32: add Milkymist TMU2 support
This patch adds support for Milkymist's texture mapping unit. For fastcomputation this model needs hardware accelerated 3D graphics support(OpenGL). There is no graphical output, all computations belong to internalframebuffers only....
lm32: add Milkymist UART support
This patch adds support for Milkymist's simple UART.
lm32: add Milkymist VGAFB support
This patch adds support for Milkymist's VGA framebuffer.
lm32: add milkymist hw support functions
This patch adds wrappers for easy creation of the qdev devices.