PXE: Use consistent naming for PXE ROMs
And add missing ROMs to tarbin build target.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Add ipxe submodule
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.
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
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
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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.
Revert "ioapic: when switches to level trigger mode, interrupts raised repeatedly."
This reverts commit 9bcfc7daabb138b0fe3d64d74892942d482e5bbd.
s390x: enable CPU_QuadU
S390x uses the QuadU type, so let's enable it.
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
s390x: Enable disassembler for s390x
This patch enables the instruction disassembler when using anS390x target.
s390x: Enable nptl for s390x
S390x user emulation can do nptl. Reflect this in the configure script.
s390x: fix KVM target
During Jan's rework of the generic KVM layer, he added some more error checksand actually aborted if something went wrong. Unfortunately, one of the s390internal error codes slipped through, aborting the VM without needing to.
This patch fixes booting of S390x virtual machines in KVM....
s390x: fix s390-virtio-serial
Commit 6b331efb733a0f913ddc0b7762a1307dec304061 broke the s390 proxy versionof virtio-serial by only taking its PCI brother into account.
So let's adjust s390-virtio-serial the same way as its PCI counterpart, makingit compile and work again....
virtio: use generic name when possible
We have two different virtio buses: pci and s390. The abstraction pathtaken in qemu is to have generic aliases for each device type in thearchitecture specific qdev devices.
So let's make use of these aliases whenever we can and define them...
Only build ivshmem when CONFIG_PCI && CONFIG_KVM
The ivshmem depends on PCI and KVM, not only KVM. Reflect thisin the Makefile, so we don't get build errors on s390x.
Signed-off-by: Alexander Graf <agraf@suse.de>CC: Cam Macdonell <cam@cs.ualberta.ca>CC: Juan Quintela <quintela@redhat.com>...
w32: Fix compilation (wrong include file)
arpa/inet.h is not available for w32, so commitedbb21363fbfe40e050f583df921484cbc31c79d breaksw32 compilations.
This is fixed by using qemu_socket.h.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Alon Levy <alevy@redhat.com>...
register signal handler after initializing SDL.
SDL library initialization mangles signal handlers, so QEMU shouldregister them after initializing SDL. This was the case before and codeeven have a comment about that. Fix it to be so again.
Signed-off-by: Gleb Natapov <gleb@redhat.com>...
vl.c: Tidy up message printed when we exit on a signal
Tidy up the message printed when qemu exits due to a signal, so thatit's clearer where the message is coming from and that it's not juststray debug output.
net: Remove unused net-checksum.c file
The common checksum functions were moved to net/checksum.c in commit7200ac3c7c8eefe574193b49eeff09f120e11ec7 but the original net-checksum.cwas never deleted from the source tree. Remove it now since all usersof the checksum functions link against net/checksum.o and net-checksum.c...
e1000: Mask out lower bits of RDBAL/TDBAL
Rx and Tx descriptors are 16 byte aligned, so the lower bits areignored by real hardware. In fact, they always read back as zero on realhardware, but probably nobody relies on that.
Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>...
gdbstub: Catch and report more vmstop reasons
When the VM goes into stop state while there is a gdb frontend attached,it makes sense to inform gdb about this fact and at least a bit aboutthe stop reason. Basically, all stops are interesting except for the...
tests/cris: Fix some errors and potential crashes
These errors were reported by cppcheck:
tests/cris/check_openpf1.c:30: error:Mismatching allocation and deallocation: f
tests/cris/check_openpf2.c:13: error:Mismatching allocation and deallocation: f...
ioapic: when switches to level trigger mode, interrupts raised repeatedly.
- the trigger mode is edge at first- During initializatoin, the interrupt is raised as edge which is masked. The corresponding bit of irr is set.- Then the mode is switched to level and it's unmasked....
Fix trivial "endianness bugs"
Replace endianess -> endianness.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/vexpress.c: Add model of ARM Versatile Express board
Add a model of the ARM Versatile Express board (with A9MPx4daughterboard).
target-arm: Fix VCLE.F32 #0, VCLT.F32 #0 NaN handling
Implementing the floating-point versions of VCLE #0 and VCLT #0 bydoing a GT comparison and inverting the result gives the wrongresult if the input is a NaN. Implement as a GT comparison with theoperands swapped instead....
target-arm: Correct ABD's handling of negative zeroes
Implement ABD by taking the absolute value of the differenceof the operands (as the ARM ARM specifies) rather than byflipping the order of the operands to the subtract basedon the results of a comparison. The latter approch gives...
softfloat: Add float*_min() and float*_max() functions
Add min and max operations to softfloat. This allows us to implementpropagation of NaNs and handling of negative zero correctly (unlikethe approach of having target helper routines return one of the operands...
target-arm: Use new softfloat min/max functions for VMAX, VMIN
Use the new softfloat min/max functions to implement the Neon VMAXand VMIN instructions. This allows us to get the right behaviourfor NaN and negative zero.
target-arm/helper.c: For float-int conversion helpers pass ints as ints
Correct the argument and return types for the float<->int conversion helperfunctions so that integer arguments and return values are declared asuint32_t/uint64_t, not float32/float64. This allows us to remove the...
target-arm: Return right result for Neon comparison with NaNs
Fix the helper functions implementing the Neon floating point comparisonops (VCGE, VCGT, VCEQ, VACGT, VACGE) to return the right answer whenone of the values being compared is a NaN.
target-arm/neon_helper.c: Use make_float32/float32_val macros
Use the softfloat make_float32 and float32_val macros to convert betweensoftfloat's float32 type and raw uint32_t types, rather than privateconversion functions.
libcacard: add vscclient
client to talk to ccid-card-passthru and use smartcard on client toperform actual operations.
v23->v24 changes: (Jes Sorensen review 2) * use qemu_socket instead of socket * use fprintf(stderr,..) for errors * remove unneccessary includes since using qemu_common.h
libcacard: add docs
ccid: add ccid-card-emulated device
This devices uses libcacard (internal) to emulate a smartcard conformingto the CAC standard. It attaches to the usb-ccid bus. Usage instructions(example command lines) are in the following patch in docs/ccid.txt. Ituses libcacard which uses nss, so it can work with both hw cards and...
ccid: add docs
Add documentation for the usb-ccid device and accompanying two carddevices, ccid-card-emulated and ccid-card-passthru.
Signed-off-by: Alon Levy <alevy@redhat.com>
trace: move trace objects from Makefile to Makefile.objs
qemu-thread.h: include inttypes.h
qemu-thread.h relies on uint64_t being defined, but doesn't includeinttypes.h explicitly. This makes it easier to use it from vscclient (partof libcacard).
usb-ccid: add CCID bus
A CCID device is a smart card reader. It is a USB device, defined at [1].This patch introduces the usb-ccid device that is a ccid bus. Next patches willintroduce two card types to use it, a passthru card and an emulated card.
[1] http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_Rev110....
introduce libcacard/vscard_common.h
v20->v21 changes: (Jes Sorensen review) * license set to 2+ * long comment fixes, remove empty line at eof. * add reference to COPYING
v19->v20 changes: * checkpatch.pl...
ccid: add passthru card device
The passthru ccid card is a device sitting on the usb-ccid bus andusing a chardevice to communicate with a remote device using theVSCard protocol defined in libcacard/vscard_common.h
Usage docs available in following patch in docs/ccid.txt...
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standardfor smartcards. It is used by the emulated ccid card introduced ina following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>...
net: Improve the warnings for dubious command line option combinations
Improve the warnings we give if the user specified a combination of -netoptions which don't make much sense: * Don't warn about anything if the config is the implicit default "-net user -net nic" rather than one specified by the user (this will...
hw/versatilepb, realview: Fix condition for instantiation of onboard NIC
Correct the condition determining whether we instantiate the onboardNIC or a PCI card NIC on VersatilePB and Realview boards. This was brokenin two ways: (1) if the user asked for two default NICs ("-net nic -net nic") we would...
pcnet: Fix sign extension: make ipxe work with >2G RAM
The problem is with definitions in hw/pcnet.c such as:
#define CSR_CRDA(S) ((S)->csr[28] | ((S)->csr[29] << 16))
"(S)->csr29" is a uint16_t, but "(S)->csr29 << 16" gets promoted toint, so the overall CSR_CRDA(s) is a (signed) int rather than a uint32_t....
target-arm: Fix VLD of single element to all lanes
Fix several bugs in VLD of single element to all lanes:
The "single element to all lanes" form of VLD1 differs from those forVLD2, VLD3 and VLD4 in that bit 5 indicates whether the loaded elementshould be written to one or two Dregs (rather than being a register...
target-arm: Don't leak TCG temp for UNDEFs in Neon load/store space
Move the allocation and freeing of the TCG temp used for the address forNeon load/store instructions so that we don't allocate the temporaryuntil we've done enough decoding to know that the instruction is not...
Fix net_check_clients warnings: make it per vlan.
Signed-off-by: Tristan Gingold <gingold@adacore.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vnc: added missing name->keysym pairs for Polish national characters
There are no { name, keysym } values in name2keysym[] array for Polishnational characters so "-k pl" option has no effect.
Signed-off-by: Leszek Grzegorek <leszek.grzegorek@gmail.com>...
get rid of private bitmap functions in block/sheepdog.c, use generic ones
qemu now has generic bitmap functions,so don't redefine them in sheepdog.c,use common header instead. A small cleanup.
Here's only one function which is actuallyused in sheepdog and gets replaced with...
lsi53c895a: add support for ABORT messages
If these messages are not handled correctly the guest driver may hang.
Always mandatory:- ABORT- BUS DEVICE RESET
Mandatory if tagged queuing is implemented (which disks usually do):- ABORT TAG- CLEAR QUEUE...
fix build errors when we enable acpi_piix4 debug
ui/sdl: Load optional QEMU icon
Load an optional QEMU icon file. If there is no icon file namedqemu.bmp in QEMU's default search path, QEMU will run withthe usual system default icon.
A matching icon file will be loaded and used by X Windows managers...
pc-bios/spapr-rtas.bin: remove executable flag
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Implement PAPR VPA functions for pSeries shared processor partitions
Shared-processor partitions are those where a CPU is time-sliced betweenpartitions, rather than being permanently dedicated to a singlepartition. qemu emulated partitions, since they are just scheduled with...
Add SLOF-based partition firmware for pSeries machine, allowing more boot options
Currently, the emulated pSeries machine requires the use of the-kernel parameter in order to explicitly load a guest kernel. Thismeans booting from the virtual disk, cdrom or network is not possible....