Support PCI based option rom loading
Currently, we preload option roms into the option rom space in memory. Thisprevents DDIM from functioning correctly which severely limits the numberof roms we can support.
This patch introduces a pci_add_option_rom() which registers the...
pci romfiles: add property, add default to PCIDeviceInfo
This patch adds a romfile property to the pci bus. It allows to specifya romfile to load into the rom bar of the pci device. The default valuecomes from a new field in PCIDeviceInfo. The property allows to change...
VMware VGA: Only enable dirty log tracking when fifo is disabled
This patch enables dirty log tracking whenever it's needed and disables itwhen it is not.
We unconditionally enable dirty log tracking on reset, restart dirty logtracking when PCI IO regions are remapped, and disable/enable it based on...
vmware: increase cursor buffer size.
The cursor pixmap size we calculate later ends up being 4096 dwordslong by the looks of it. This boots an F12 LiveCD now.
Signed-off-by: Dave Airlie <airlied@linux.ie>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "kvm: x86: Save/restore exception_index"
This reverts commit ebbc8a3d8e76d0402f8a08c10c0f32e24715d41d.
As suggested by Jan Kiszka,
"It was obsoleted by d1793b836f8f123b961c613de1bb1c0c185c84cc and now saves/restores a useless field."
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Accept input only byte-wise
This allows to suspend command interpretation and executionsynchronously, e.g. during migration.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "fdc: fix vmstate variable passed"
Floppy used the io_base address to register savevm region.
This reverts commit 2966b390d0f7cd5e5b971290fcc20685de374228.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fdc: fix migration from 0.11
0.11 uses as instance ide io_base, get it back
Fix backcompat for hotplug of SCSI controllers
SCSI controllers have no trouble existing without any attacheddisks. This could be achieved with the (legacy) monitor syntax
pci_add pci_addr=auto storage if=scsi
This is now denied with
scsi requires a backing file/device....
Make sure to enable dirty log tracking for VMware VGA
This is needed for VMware VGA to work properly under KVM.
Fix VMware VGA depth computation
VMware VGA requires that the depth presented to the guest is the same as theDisplaySurface that it renders to. This is because it performs a very simplememcpy() to blit from one surface to another.
We currently hardcode a 24-bit depth. The surface allocator for SDL may, and...
vmware: setup PCI BAR 2 for FIFO as per vmware spec
Make sure to enable dirty tracking of VBE vram mapping
Apparently, VBE maps the VGA vram to a fixed physical location. KVM requiresthat all mappings of the VGA vram have dirty tracking enabled on them. Anyaccess to the VGA vram through the VBE mapping currently fails to result in...
qdev: improve property error reporting.
Add a error message in case we fail to parse a qdev property.
Also make qemu not abort() in case setting a global property can't beset. This used to be a clear programming error. The introduction ofthe -global switch changed that though, so better exit instead (after...
usb-net: use qdev for -usbdevice
Rebased to master, adapted to device renaming by armbru,no other changes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-host: check mon before using it.
fix vga names in default_list
Fix mismerge between 64465297 and 556cd098.
Cc: Markus Armbruster <armbru@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QDict: Fix size update
Key replacement should not update the dictionary's size.
This commit also adds a test for the bug.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Use 'device' in eject
Monitor's eject command uses 'filename' for the device nameargument, but 'device' is a better name.
monitor: do_balloon(): Check for errors
do_balloon() should check for ballooning availability asdo_info_balloon() does.
Noted by Daniel P. Berrange <berrange@redhat.com>.
monitor: Avoid readline functions in QMP
The monitor_read_command() function is readline specificand should only be used when readline is available.
monitor: Catch printing to non-existent monitor
The monitor_vprintf() function now touches the 'mon' pointerbefore calling monitor_puts(), this causes block migrationto segfault as its functions call monitor_printf() with aNULL 'mon'.
To fix the problem this commit moves the 'mon' NULL check...
defaults: split default_drive
Split default_drive into default_{floppy,cdrom,sdcard}.Also add QEMUMachine flags to disable them per machine.
defaults: update device_list[]
Add isa-fdc (disables default_floppy).Add ide-drive (disables default_cdrom).
Also walk the -global QemuOpts, so we'll catch-global isa-fdc.drive{A,B}=<name> too.
Check rom_load_all() return value.
Check rom_load_all() return value.Also don't make option rom loading failure fatal.
Fix thinko in linuxboot.S
The %gs segment that was used was not matching the comments.I just moved the GDT descriptor on the stack instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-io: Fix memory leak
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "Rename DriveInfo.onerror to on_write_error" (fix mismerge)
Part of the first patch of the -drive rerror series has been merged once moreon top of the rest of the series. This effectively disables the rerror optionand always goes with the default value. Reverting the commit re-enables the...
Fix loading of ELF multiboot kernels
The multiboot implementation assumed that there is only one program header(which contains the entry point) and that the entry point is at the start ofthe code. This doesn't hold true generally and caused too little data to be...
Avoid permanently disabled QEMU monitor when UNIX migration fails
If a UNIX migration command is attempt to a UNIX socket which doesnot exist, then the monitor is suspended, but never resumed. Thisprevents any further use of the monitor
qdev: Improve uni-north device names
Switch to the names suggested by Blue Swirl.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "pci: interrupt disable bit support"
This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607.
Per discussion with Michael Tsirkin, this is too risky for 0.12
vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles
This violates the RFB specification (section 6.6.4). It happens to work withmost clients but it's still wrong.
Reported-by: Yaniv Kaul <ykaul@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: x86: Use separate exception_injected CPUState field
Marcelo correctly remarked that there are usage conflicts between QEMUcore code and KVM /wrt exception_index. So spend a separate field andalso save/restore it properly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
target-i386: Fix evaluation of DR7 register
hw_breakpoint_type and hw_breakpoint_len used the wrong index multiplierto extract type and len.
S390: Bail out without KVM
Currently only the S390 KVM target works. To keep users from accidently notusing KVM, let's not even initialize the machine when KVM is not used.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
S390: Don't tell guest we're updating config space
Currently we always set the "config space changed" bit to 1 when triggeringany virtio interrupt. While that worked in 2.6.27, newer kernels interpretthat value as "only the config space changed and nothing else happened"....
add default virtcon initialization
When going through the default devices, we don't initialize the virtioconsole, unless we're doing -nographic.
I suppose that's just a leftover from the recent code restructuring, solet's put it in.
Signed-off-by: Alexander Graf <agraf@suse.de>...
S390: Loop through virtio console devices
We used to always create one single virtio console device. This breaks wheneither zero of multiple virtio console devices are requested, so let's usethe same code as on x86.
target-s390: Fail on unknown instructions
We were being a bit too nice and didn't give the guest an invalid instructioninterrupt.
While that works, it's not exactly the fastest thing to do, since now theguest doesn't know that we're not really implementing that instruction, so it...
osdep: Fix runtime failure on older Linux kernels
If QEMU finds newer kernel header files on compilation time, it will useadvertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test.If later the executables are executed on an older kernel (<2.6.27,...
Fix a make -j race
Make libuser.a depend on $(GENERATED_HEADERS) too so make -j won't startbuilding it before the headers exist. (There may be more bugs like thisbut at least this makes (g)make -j4 started from scratch on a quadcorenow always complete here again.)...
target-alpha: Fix generic ctz64.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-alpha: Fix cvtlq.
We were missing the 0xc0000000 mask, leading to incorrect results.
target-alpha: Fix float32_to_s vs zero exponent.
There was a bug in float32_to_s that incorrectly mapped a zero exponentto 0x38. This meant 0.0f != 0. At the same time, fix a generic typepunning bug in helper_memory_to_s and helper_s_to_memory.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
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.
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.
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.
char: Convert qemu_chr_info() to QObject
Each device is represented by a QDict. The returned QObject is a QListof all devices.
This commit should not change user output.
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...