target-alpha: Implement fp branch/cmov inline.
The old fcmov implementation had a typo:- tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]);which moved the condition, not the second source, to the destination.
But it's also easy to implement the simplified fp comparison inline....
target-alpha: Add placeholders for missing userspace PALcalls.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips: No MIPS16 support for 4Kc, 4KEc cores
Fix regression introduced by d19954f46dfc262612c30e9534e660e953049487.
4Kc and 4KEc don't support MIPS16.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-alpha: Fix compiler warning for gcc-4.3 (and older)
"Old" compilers obviously are not able to recognisethat all cases are handled here:
qemu/target-alpha/helper.c:70: error: ‘round_mode’ may be used uninitialized in this function
A small modification helps the compiler to do its jobs....
s390: Fix buggy assignment
nd->model keeps dynamically allocated model names.So casting of a constant string is wrong here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips: 4Kc, 4KEc cores do not support MIPS16
4Kc, 4KEc cores do not support MIPS16, so not only theCP0_Config1 had to be fixed (see previous patch),but also MIPS16 instructions must not be executed.
(Hint from Nathan Froyd, thanks).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
microblaze: Print content of EAR register
I need to see EAR register in output because I need to parse irqsoff problem.
Signed-off-by: Michal Simek <monstr@monstr.eu>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Update debug logs.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
tcg/ppc64: Fix loading of 32bit constants
Signed-off-by: malc <av1474@comtv.ru>
target-alpha: Expand ins*l inline.
Similar in difficulty to ext*l, already expanded.
target-alpha: Expand msk*l inline.
target-alpha: Expand msk*h inline.
target-alpha: Expand ins*h inline.
target-alpha: Fix FMOV.
Properly handle move from the zero register.
target-alpha: Fix double log_cpu_state.
The proper logging is handled by generic code.
target-alpha: Implement RD/WRUNIQUE in the translator
When emulating user-mode only, there's no reason to exitthe translation block to effect a call_pal. We can generatea move to/from the unique slot directly.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
target-alpha: Implement missing MVI instructions.
target-alpha: Fix -d in_asm
Generic disassembly was incorrectly keyed on ALPHA_DEBUG_DISASrather than the generic DEBUG_DISAS. Use qemu_log_mask foradditional LOG_DISAS output. Delete some random insn_countlogging noise from gen_intermediate_code_internal....
target-alpha: Expand zap/zapnot with immediate inline.
The vast majority of zap instructions have an immediate operand,since zapnot is the canonical method to zero-extend from u16 or u32.
target-alpha: Rewrite gen_ext_[hl] in terms of zapnot.
The architecture manual specifies the EXT instructionsin terms of the ZAPNOT operation; writing it that way inthe translator makes things a bit clearer.
target-alpha: Fix fbcond branch offset.
The instructions use a disp21 like all other branch insns,not the disp16 that was being passed.
target-mips: fix user-mode emulation startup
Running programs with the MIPS user-mode emulator fails during dynamicloading, as floating-point instructions are not enabled in inenv->hflags. Move the code for doing so from fpu_init to cpu_reset sothe MIPS_HFLAG_{FPU,F64} setting doesn't get clobbered by cpu_reset...
target-i386: Update CPUID feature set for TCG
The CPUID features QEMU presented to the guest were not up-to-datewith QEMU's emulated feature set.Add the missing bits of recent (and not so recent) additions toQEMU's emulation engine.For stability reasons only the user mode usable bits are exposed for...
target-alpha: Drop bogus UNIQ initial value on Linux.
target-alpha: Add binfmt entry.
target-alpha: Remove bogus DO_TB_FLUSH code from translator.
target-alpha: Honor the -cpu command line argument.
Also change the default cpu to ev67.
target-alpha: Enable softfloat.
target-alpha: Fixes for alpha-linux syscalls.
1. Add correct definitions of error numbers.2. Implement SYS_osf_sigprocmask3. Implement SYS_osf_get/setsysinfo for IEEE_FP_CONTROL.
This last requires exposing the FPCR value to do_syscall.Since this value is actually split up into the float_status,...
target-mips: add enums for MIPS16 opcodes
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips: add mips16 instruction decoding
There's no good way to add this incrementally, so we do it all at once.The only changes to shared code are in handle_delay_slot. We need toflip ISAMode when doing a jump-and-exchange. We also need to setISAMode the low bit of the target address for jump-to-register....
gdbstub: add MIPS16 support
The only thing to do here is to expose the current processor mode to GDBand to set the processor mode properly when we change the PC.
target-mips: add copyright notice for mips16 work
Also cross off mips16 ASE in TODO.
target-mips: set Config1.CA for MIPS16-aware CPUs
target-mips: add new HFLAGs for JALX and 16/32-bit delay slots
We create separate masks for the "basic" branch hflags and the"extended" branch hflags and define MIPS_HFLAG_BMASK as the logical orof those two. This is done to avoid churning the codebase in lots of...
target-mips: change interrupt bits to be mips16-aware
We need to stash the operating mode into the low bit of the error PC andrestore it on return from interrupts.
target-mips: move ROTR and ROTRV inside gen_shift_{imm, }
It's easier to implement mips16 shift instructions if we're notexamining the opcode inside gen_shift_{imm,}. So move ROTR and ROTRVand do the special-case handling of SRL and SRLV inside decode_opc....
target-mips: make gen_compute_branch 16/32-bit-aware
target-mips: add gen_base_offset_addr
This is a common pattern in existing code. We'll also use it toimplement the mips16 SAVE/RESTORE instructions.
target-mips: split out delay slot handling
Move delay slot handling to common code whose invocation can becontrolled from gen_intermediate_code_internal.
workaround for cmd646 bmdma register access while no dma is active
This is a workaround only, and is a partial revertof a few changes to BMDMAState which removed pci_devfield on the way.
- cmd646 pci_from_bm() expects bm->unit value tocorrespond with bm data being passed to callback...
s390: typo fix
s390 code has an obvious typo, which results in:hw/s390-virtio.c: At top level:hw/s390-virtio.c:249: error: request for member ‘no_vga’ in something not a structure or union
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Alexander Graf <agraf@suse.de>...
s390: fix build on 32 bit host
Building on 32 bit host we get:hw/s390-virtio.c: In function ‘s390_init’:hw/s390-virtio.c:184: error: integer constant is too large for ‘unsigned long’ type64 bit values must be ULL.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
qemu-io: add 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Silence softfloat warnings on OpenSolaris
Don't define C99 math functions on OpenSolaris (Solaris 11),which still ships GCC 3.4.3. This fixes redefinition warnings.
Spotted by Palle Lyckegaard.
Signed-off-by: Andreas Färber <afaerber@opensolaris.org>Cc: Palle Lyckegaard <palle@lyckegaard.dk>...
tap: Compilation fix for Solaris
Avoid an unresolved symbol error for TFR,which is defined in sysemu.h.
Based on patch by Palle Lyckegaard.
Signed-off-by: Andreas Färber <afaerber@opensolaris.org>Cc: Palle Lyckegaard <palle@lyckegaard.dk>Cc: Ben Taylor <bentaylor.solx86@gmail.com>...
fdc/sparc32: don't hang on detection under OBP
Stepping through the SS-5's OBP initialization routinesit looks like reading fdc main status register shouldclear the fd interrupt.The patch doesn't fix problems with fdc on sparc platform,it only fixes fdc detection....
Sparc32: implement AFX for SS-5
Implement a stub for the AFX register on SparcStation-5.This stub is needed for running the original SS-5 OBPinstead of OpenBIOS (which allows to boot Solaris 2.5.1and Solaris 2.6 kernels).
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>...
scsi-disk: Inquiry with allocation length of CDB < 36 (v4)
According to the SCSI-2 specification,http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2-08.html#8.2.5 ,"if the allocation length of the command descriptor block (CDB) is toosmall to transfer all of the parameters, the additional length shall...
microblaze: Handle wdc flush and clear.
microblaze: Correct branch to registers.
monitor: Convert do_info_mice() to QObject
Each mouse is represented by a QDict, the returned QObject is a QList ofall mice.
This commit should not change user output.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration: Convert do_info_migrate() to QObject
Return a QDict, which may contain up to more two QDicts, dependingon the type of migration we're performing.
IMPORTANT: as a QInt stores a int64_t integer, RAM values are goingto be stored as int64_t and not as uint64_t as they are today. If...
block: Convert bdrv_info() to QObject
Each block device information is stored in a QDict and thereturned QObject is a QList of all devices.
block: Convert bdrv_info_stats() to QObject
Each device statistic information is stored in a QDict andthe returned QObject is a QList of all devices.
char: Convert qemu_chr_info() to QObject
Each device is represented by a QDict. The returned QObject is a QListof all devices.
PCI: Convert pci_device_hot_add() to QObject
Return a QDict with information about the just added device.
Please, note that this patch does not do error handlingconversion. In error conditions the handler still calls...
VNC: Convert do_info_vnc() to QObject
Return a QDict with server information. Connected clients are returnedas a QList of QDicts.
The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() andput_addr_qdict()) are used to insert 'host' and 'service' information...
v2: properly save kvm system time msr registers
Currently, the msrs involved in setting up pvclock are not saved overmigration and/or save/restore. This patch puts their value in specialfields in our CPUState, and deal with them using vmstate.
kvm also has to account for it, by including them in the msr list...
monitor: do_info_version(): Use QDict
All 'info' commands should use QDict, this commit also killsmonitor_print_qobject() as do_info_version() doesn't use itanymore (and no handler will).
monitor: Convert do_info_status() to QObject
monitor: Convert do_info_kvm() to QObject
monitor: Convert do_info_name() to QObject
monitor: Convert do_info_hpet() to QObject
monitor: Convert do_info_uuid() to QObject
snprintf() is used because the UUID_FMT is too complex forqobject_from_jsonf().
monitor: Fix do_info_balloon() output
Monitor commands should always return values in bytes and infocommands should always return a QDict.
monitor: Fix do_info_commands() output
Should return a QDict and should not print the user protocol bits(eg. "c|cont").
monitor: do_info_cpus(): Use QBool
While there update the documentation as well.
QDict: Introduce qdict_get_qlist()
A helper function to get a QList from a QDict.
QemuOpts: allow larger option values.
Use case: loooooooooooooooooong file names for -drive file=...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: fix capslock tracking logic.
The capslock tracking logic added by commit6b1325029d80455b9da7cd7bd84a88cb915b867c doesn't work correctly for vncclients without EXT_KEY_EVENT support. The reason is that qemu convertskeysyms for letters to lowercase for the keysym2scancode lookup. It...
Introduce qemu-objects.h header file
An easy way to include all QEMU objects.
Makefile: move QObject objs to their own entry
Other subsystems will need to link against them.
QDict: Introduce qdict_get_qbool()
This is a helper function that does type checking before retrievinga QBool from the dictionary.
default devices: virtio consoles.
This patch adds a variable default_virtcon which says whenever a defaultvirtio console should be added. It is disabled by default, followuppatch will enable it for s390. It is cleared when qemu finds'-virtiocon', '-device virtio-console-s390' or '-device...
Set default console to virtio on S390x
All "normal" system emulation targets in qemu I'm aware of displayoutput on either VGA or serial output.
Our S390x virtio machine doesn't have such kind of legacy hardware. Soinstead we need to default to a virtio console....
pci: don't abort() when trying to hotplug with acpi off.
The PCI bus on x86 requires ACPI for hotplug support, thus disbling ACPIalso disables hotplug for the PCI bus. This patch makes qemu checkwhenever the PCI bus in question can handle hotplug before trying to add...
pci: don't hw_error() when no slot is available.
Current PCI code will simply hw_error() and thus abort in case no freePCI slot is available or the requested PCI slot is already in use byanother device. For the hotplug case this behavior is not acceptable....
scsi: fix drive hotplug.
This patch fills the DriveInfo->unit after hotplugging a scsi disk.It makes a difference when auto-assigning a scsi id, where unit wasleft filled with '-1' instead of the actual scsi id.
With this patch applied the the drive naming logic in drive_init() works...
default devices: add global cmd line option.
Add global command line option to disable default devices.
default devices: network
Add a default_net variable which specified whenever a default networkshould be created. It is cleared in case any -net option is specifiedand it is also added to the new -nodefaults switch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
default devices: drives
Add a default_drive variable which specified whenever the default drives(cdrom, floppy, sd) should be created. It is cleared when the new-nodefaults switch is specified on the command line.
un-static qemu_chr_parse_compat()
rework -monitor handling, switch to QemuOpts
This patch reworks the -monitor handling:
- It adds a new "mon" QemuOpts list for the monitor(s). - It adds a monitor_parse() function to parse the -monitor switch. - It adds a mon_init function to initialize the monitor(s) from the...
add new -mon switch
Add -mon switch which maps pretty straight forward into the QemuOptsinternal representation:
-mon chardev=<name>[,mode=[control|readline]][,[no]default]
Via config file:
[mon] chardev = "<name>" mode = "readline" default = "on"...
add -qmp convinience switch
Acts like -monitor but switched into qmp mode.
vc: colorize chardev title line with blue background.
default devices: core code & serial lines.
Qemu creates a default serial line for you in case you didn't specifyone on the command line. Right now this is tied to the '-serial<chardev>' command line switch, which in turn causes trouble if you arecreating your serial line via '-device isa-serial,<props>'....
default devices: parallel port.
Qemu creates a default parallel port for you in case you didn't specifyone on the command line. Right now this is tied to the '-parallel<chardev>' command line switch, which in turn causes trouble if you arecreating your parallel port via '-device isa-parallel,<props>'....
default devices: qemu monitor.
This patch makes the monitor default device configuration work like thedefault serial and parallel port devices. It adds a variabledefault_monitor which says whenever a default monitor should be added.It is enabled by default. It is cleared when qemu finds '-monitor' on...
zap serial_monitor_mux
The logic in this code obviously predates the multiple monitorcapability of qemu and looks increasingly silly these days.
I think the intention of this piece of code is to get a reasonabledefault for the -nographic case: have monitor and serial line muxed...
default devices: vga adapter.
Qemu creates a vga display for you in case you didn't specify one on thecommand line. Right now this is tied to the '-vga <type>' command lineswitch, which in turn causes trouble if you are creating your gfx cardusing '-device VGA,<props>'....
qdev: also match bus name for global properties
i.e. -global PCI.<property>=<value> will set a default property for allPCI devices. Also works for the compat properties used by machinetypes.
chardev: make chardevs specified in config file work.
The patch decuples the -chardev switch and the actual chardevinitialization. Without this patch qemu ignores chardev entriescoming via -readconfig.
Revert "monitor: Command-line flag to enable control mode"
This reverts commit adcb181afe5a951c521411c7a8e9d9b791aa6742.
Conflicts:
monitor.h
Revert "Set default console to virtio on S390x"
This reverts commit 93d434b4aec0702b87ebf52449a3cdf2c3596825.
chardev: move greeting into vc backend.
Make the 'vc' chardev backend print a title line with the chardev nameafter initialization, using CharDriverState->label.
This replaces the banner printing code in vl.c.
qdev: make compat stuff more generic
This patch renames the compat properties into global properties andmakes them more generic. The compatibility stuff is only one ofmultiple possible users now.
qdev: add command line option to set global defaults for properties.
This patch adds infrastructure and command line option for settingglobal defaults for device properties, i.e. you can for example use
-global virtio-blk-pci.vectors=0
to turn off msi by default for all virtio block devices. The config...
kvm: x86: Save/restore exception_index
As KVM now makes use of exception_index to keep pending exceptions, wehave to save&restore this field as well.
NOTE: We have to nail the arch-independent exception_index down to acertain bit width for proper vmstate processing, namely to 32 bit....