tcg/ppc64,x86_64: fix constraints of op_qemu_st64
This op only takes two arguments, not two.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add missing break.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Update SeaBIOS
This includes the following changes:
42bc394 Make sure to reenable ata interrupts even on error. 494dfc6 Move SeaBIOS post/boot stack to avoid conflict with gPXE. 3133e38 Test for broken gcc -combine on FC12.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ARM atomic ops rewrite
Implement ARMv6 atomic ops (ldrex/strex) using the same trick as PPC.
BCD cleanup
Combine multiple BCD implementations.
DS1338 RTC
Implement MAXIM SD1338 RTC+NVRAM.
GPIO I2C rework
Reqrite bitbanging I2C implementation. New code improves stop/startcondition handling, and gives more accurate input line level.
Introduce intermediate abstraction layer for I2C bitbanging thatis not connected via a GPIO port.
ARM RealView I2C
Add ARM Realview I2C host emulation.
Makefile dependencies for device configs
Add makefile dependencies for target specific device configs.These will copy the default config if none exists, obsoleting the oldconfigure time code. If a config already exists but is older than thedefault then print a warning....
target-mips: fix physical address type in MMU functions
[WIN32] Enable -k option on Windows too
There is no reason to have it disabled on this platform.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips: make CP0_LLAddr register CPU dependent
Depending on the CPU, CP0_LLAddr is either read-only or read-write,and the returned value can be shifted by a variable amount of bits.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
target-mips: rename CP0_LLAddr into lladdr
The variable CP0_LLAddr represent the full lladdr, not the actualregister value, which is only part of this value and depends on theCPU.
Allow build of linuxboot.S with old assemblers
In the spirit of ff56954baf9cfab5cbbe18d10b4a09e4a17f39a8, fix thebuild of linuxboot.S with old as(1) (as found in some BSD base systems)by emitting the bytes of the insn it doesn't like instead.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>...
Avoid segfault on net_tap_init() failure
Check for fd == -1 there.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tap-bsd: handle ifname on FreeBSD hosts
Handle ifname on FreeBSD hosts; if no ifname is given, always startthe search from tap0. (Simplified/cleaned up version of what has beenin the FreeBSD ports for a long time.)
Fix tap breakage on BSD hosts (no IFF_VNET_HDR)
net/tap-bsd.c was assuming IFF_VNET_HDR was always available, whichI think isn't true on any BSD.
Fix OpenBSD build of qemu-io
GCC 3.3.5 generates warnings for static forward declarations of data, sorearrange code to use static forward declarations of functions instead.
Use <getopt.h> for optind instead of local definition.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure: Fix spelling in comment and rework the comment
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
qemu-io: build on all platforms
Since c32d766af127f68bb75ba5689f2f5239227bf559, qemu-io should beportable. It is currently built only on linux and mingw32.
This patch enables qemu-io on all platforms. Tested on FreeBSD.
slirp: fix use-after-free
460fec67ee introduced a use-after free in slirp.
Cc: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ARM PBX-A9 board support
Implement ARM RealView PBX-A9 board support.
ARM FP16 support
Implement the ARM VFP half precision floating point extensions.
ARM Cortex-A9 cpu support
Basic Cortex-A9 support.
Built network devices once
Move some generic NICS into libhw, and build them for ARM targets.
sb16: remove highspeed reset code
It was never enabled in any of the public builds anyway.
Noticed by Steve Grubb.
Signed-off-by: malc <av1474@comtv.ru>
audio: Remove conditional around sw which can not be NULL
audio: link with -lpulse in addition to -lpulse-simple
Link with -lpulse in addition to -lpulse-simple, needed when --no-add-neededis passed to the linker (gold default).
Fix typo
Fix mingw32 build
Prevent configuring for a user emulator on a different type of OS
Move common option rom code to header file
We will have a linux boot option rom soon, so let's take all functionalitythat might be useful for both to a header file that both roms can include.
That way we only have to write fw_cfg access code once.
Signed-off-by: Alexander Graf <agraf@suse.de>...
Convert linux bootrom to external rom and fw_cfg
We already have a working multiboot implementation that uses fw_cfg to getits kernel module etc. data in int19 runtime now.
So what's missing is a working linux boot option rom. While at it I figured itwould be a good idea to take the opcode generator out of pc.c and instead use...
Add linuxboot to BLOBS
We should install linuxboot.bin too, so let's add it to the to-be-installedblobs.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Convert multiboot to fw_cfg backed data storage
Right now we load the guest kernel to RAM, fire off the BIOS, hope itdoesn't clobber memory and run an option rom that jumps into the kernel.
That breaks with SeaBIOS, as that clears memory. So let's read all...
Introduce rom_copy
We have several rom helpers currently, but none of them can get uscode that spans several roms into a pointer.
This patch introduces a function that copies over rom contents.
fw_cfg: change cur_offset to 32 bits
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Provide marshalling mechanism for json
This introduces qobject_to_json which will convert a QObject to a JSON stringrepresentation.
Add test suite for json marshalling
By reusing the qjson test suite. After checking that we can demarshal, marshalagain and compared to the expected decoded value. This doesn't work so wellfor floats because they cannot be accurately represented in decimal but we...
Update SeaBIOS to latest
Add a QBool type
Add a lexer for JSON
Our JSON parser is a three stage parser. The first stage tokenizes the streaminto a set of lexical tokens. Since the lexical grammar is regular, we canuse a finite state machine to model it. The state machine will emit tokensas they are identified....
Add a JSON message boundary identifier
The second stage of our JSON parser is a simple state machine that identifiesindividual JSON values by counting the levels of nesting of tokens. It doesnot perform grammar validation. We use this to emit a full JSON value to the...
Add a JSON parser
This is the third and final stage of the JSON parser. It parses lexical tokensperforming grammar validation and creating the final QObject representation. Ituses a recursive decent parser.
Add a QObject JSON wrapper
This provides a QObject interface for creating QObjects from a JSON expression.
Add a unit test for JSON support
QDict: Introduce qdict_iter()
This adds iterator support to QDict, it will be used by the(to be introduced) QError module.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Cleanup configure checks for dup3 and fallocate
We have a function for this which does not issue annoying warnings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Properly escape QDECREF macro arguments
QDECREF does not properly escape the macro arguments which can lead tounexpected syntax errors.
Add operations to qlist to allow it to be used as a stack
This makes lists no longer invariant. It's a very useful bit of functionalitythough.
To deal with the fact that lists are no longer invariant, introduce a deepcopy mechanism for lists.
Allow strings to grow in size
This lets us use QString for building larger strings
Add a QFloat datatype
Add unit test for QFloat
Enable migration without shared storage from the monitor
This patch adds the option to activate non-shared storage migration from themonitor.The migration command is as follows:(qemu) migrate -d tcp:0:4444 # for ordinary live migration(qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy...
kvm: Add arch reset handler
Will be required by succeeding changes.
kvm: x86: Refactor use of interrupt_bitmap
Drop interrupt_bitmap from the cpustate and solely rely on the integerinterupt_injected. This prepares us for the new injected-interruptinterface, which will deprecate the bitmap, while preservingcompatibility....
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
char: rename qemu_chr_reset to qemu_chr_generic_open
This function sends out the OPENED event to backends thathave drive the chardevs. The 'reset' is now a historicalartifact and we can now just call the function for what itis.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Expose a mechanism to trace block writes
To support live migration without shared storage we need to be able to tracewrites to disk while migrating. This Patch expose dirty block tracking perdevice to be polled from upper layer.
Changes from v4:- Register dirty tracking for each block device....
char: don't limit data sent to backends to 1k per buffer
chardevs have a 'can_read' function via which backends specifythe amount of data they can receive. When can_read returns > 0,apps can start sending data. However, each chardev driver hereallows a max. of 1k bytes inspite of the backend being able to...
char: Remove special init_reset handling
The initial_reset sent to chardevs doesn't do much other than settinga bool to true. Char devices are interested in the open event andthat gets sent whenever the device is opened.
Moreover, the reset logic breaks as and when qemu's bh scheduling...
LAN9118 emulation
Add SMSC LAN9118 ethernet emulation.
ARM PB-A8 support
Add ARM Realview PB-A8 board support.
mips_r4k: fix reset
(broken by 45a50b1668822c23afc2a89f724654e176518bc4)
PPC64: map Uni-North AGP bus aka fix Linux boot
Uni-North AGP device mapping was accidentally dropped in2e29bd04786003561303dcad940b38afe790fb9b.
Map the device.
PPC64: Partial fix to Linux crash: revert to old devfn
Before 2e29bd04786003561303dcad940b38afe790fb9b, Uni-North host and AGPbridge were using the same devfn, 11 << 3. The net effect was that onlyAGP bridge was visible. This was changed in the commit to 13 << 3 for AGP....
PCI: make duplicate devfn allocation fatal
Only two callers of pci_create_simple/pci_register_device botheredto check the return value. Other cases were prone to crashing withspurious NULL pointer dereferences.
Make QEMU exit with an error message when devfn is attempted to...
Do not execute shell scripts directly
mips malta: fix indentation
target-mips: fix indentation
mips-malta: fix reset
mips: fix cpu_reset memory leak
Remove cpu_mips_register()- move mmu_init(), fpu_init() and mvp_init() into cpu_mips_init()- move the other parts in cpu_mips_init()
Reported-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
fix make clean targets
This patch fixes clean in case of missing directories andalso adds code to distclean that removes the following files: qemu-monitor.texi roms/seabios/config.mak roms/vgabios/config.mak
Signed-off-by: Magnus Damm <damm@opensource.se>...
sh4 disasm fixes
Add the sh4 target to the monitor disassembly function,and remove a duplicate "0x" printout from the sh4 dis-assembly code.
Signed-off-by: Magnus Damm <damm@opensource.se>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/i386: remove duplicate sar opcode
pci: Fix function pci_default_write_config
Change 260c0cd3d985e51b15870ff47e17b7b930efbda1(pci: use range helper functions) introduced abug which made pci cirrus vga on mips malta(and maybe other pci devices) fail.
Don't change addr - its original value is needed...
mips: fix CPU reset
Don't load the kernel twice during reset.See f2d74978764f62d832d61ac17bb5d934ade58816.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix PPC crash
Because of a typo, structure field vga_bios_size was not initializedproperly and a bogus BAR6 for the nonexistent VGA BIOS appeared.
The bug was uncovered by c169998802505c244b8bcad562633f29de7d74a4.
ARM MPCore tweaks
Allow the user to specify the number of cores present on theRealView EB + ARM11MPCore board. Also split into its own configrather than guessing from the CPU name.
Realview/EB procid hacks
Guess core tile ID based on CPU type.
pci: fix the conversion of config field from array to pointer
Fix 32-bit overflow in parallels image support
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
e1000 fix: read access to some registers is missing.
While writing working on an e1000 driver for my university's OS Inoticed that some registers aren't readable in QEMU, but they shouldbe readable as stated in Intels Driver Developer Manual (and alsoverified on real hardware)....
vnc: improve capslock handling.
When capslock is toggled while the vnc window hasn't the focus qemuwill miss the state change. Add sanity checks for the capslock stateand toggle it if needed, so hosts and guests idea of capslock statestay in sync. Simliar logic for numlock is present in qemu already....
fdc: fix vmstate variable passed
When code was transformed to use qdev_reset/vmstate registration, vmstatewas passed a variable of the wrong type
qemu_system_reset: we need to call it before loadvm/migration
fix type in CFLAGS name
Fix incoming migration
commit b04c4134d6de28c249277de19e523bfbe4aebbd6broke incoming migration. After talking with Gleb, code was intendedto be the way is in this fix. This fixes migration here.
savevm: Delete existing snapshots in all images
When creating a snapshot we can run into the situation that the first diskdoesn't have a snapshot, but the second one does have one with the same name asthe new snapshot.
In this case, qemu doesn't recognize that there is a snapshot to be...
virtio-blk: Pass read errors to the guest
We need to signal not only write errors, but also read errors to the guestdriver. This fixes a regression introduced by 869a5c6d.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: Move KVM mp_state accessors to i386-specific code
Unbreaks PowerPC and S390 KVM builds.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm ppc: Remove unused label
eepro100: Fix boot ROM support
eepro100: Add missing .exit initialisation
Some devices did not have an initialisation valuefor entry ".exit". This is fixed here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile: Fix definition of pxe-*.bin blobs
qdev: Check if unplug handler exists before calling it
A bus may have hotplugging enabled but not have the 'unplug'callback defined, which would lead to a crash on trying tounplug a device on the bus.
Fix by introducing an assert to check if the callback is valid....
fix parallel build
Based on a ideas of Daniel Jacobowitz + Stefan Weil
serial: Add interface to set reference oscillator frequency
Many (most?) serial interfaces have a programmableclock which provides the reference frequency ("baudbase").So a fixed baudbase which is only set once can be wrong.
omap1.c is an example which could use the new interface...
Makefile: Prettify logging
Replace GEN config-all-devices.makby GEN config-all-devices.mak
Like this, the logging output is column aligned.
microblaze: Move the kcmdline out of the way.
Avoids rom overlap conflicts.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>