target-ppc: Initialize OpenPIC properly
When lowering an IRQ line, we search for the line we're supposed to lower.
Usually we run into an optimization there that queues up interrupts. Thisqueue ends with -1. Unfortunately we didn't set the first item to -1....
QMP: Update spec file
- Remove "draft" status- Change default success response to be json-object- Change error and event data member to be a json-object- Update examples- Add new section "Compatibility Considerations" - Other fixes and clarifications...
monitor: Introduce 'M' argument type
This is a target long value in megabytes which should beconverted to bytes.
It will be used by handlers which accept a megabyte valuewhen in "user mode".
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: do_balloon(): Use 'M' argument type
This makes do_balloon() accept megabyte values from the userMonitor while accepting byte values for QMP.
e1000: Don't muck with PCI commmand register
Otherwise, the driver does not work in Linux after the INT_DISABLE changes inPCI.
Michael Tsirkin had a patch to do this, I'm not sure what happened to it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "monitor: Convert do_migrate_set_speed() to QObject"
This reverts commit 3a4921047d514c336531c304bec362c4d138ebcc.
From Luiz:
do_migrate_set_speed() accepts a suffix for the 'value' argument and this is not good for QMP. We will have to add a new argument type to handle that and...
Update to SeaBIOS 0.5.0
The only change is updating the makefile but that way we're carrying an officialrelease.
Update version and changelog to sync with stable branch
QMP: Return an empty dict by default
Currently, when a regular command doesn't have any data to output,QMP will emit:
{ "return": "OK" }
Returning an empty dict is better though, because dicts can supportsome protocol changes in a compatible way.
So, with this commit we will return:...
QMP: Assure that returned data is a QDict
This is for debug purposes only.
QMP: Update README file
- Fix output description- Fix command-line usage notes- Minor improvements
QMP: Only handle converted commands
Looks like I dropped this check when addressing the 'query-'commands request.
QMP should only handle converted commands, obviously.
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
target-ppc: fix ppc32 kvm build
My segment sync patch broke compilation on PPC32, because it was trying tosync the SLB even though ppc32 CPUs don't have an SLB.
So let's only sync it when we're on a PP64 one!
Signed-off-by: Alexander Graf <agraf@suse.de>...
Fix win32 log file location
/tmp doesn't exist under win32. Ease the pain of win32 development slightly.
From: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
fix pidfile option to work in WIN32
Explicit read/write locking pidfile under WIN32 is bit extremenobody get the chance to read the pidfile. Convert to a write-only lock.
Also, creating pidfile was disabled along with daemonize underWIN32. Enable it, but do not enable daemon support which doesn't...
fix networking on win32 host
At least under some mingw compilers slirp networking fails without declaringthese fields packed.
From: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>...
Give a error when running out of iomem areas.
The limit of iomem areas is quite low. Without thedebug print, it is quite hard to figure out why moredevices are not getting registered.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Make USB hid devices self-powered
Simplifies power budget negotiation.
handle SD CMD5 without error messages
From: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
usb-musb: convert fifo to 8bit and add more registers
Convert musb fifo to 8bit to allow 8/16/32bit access
MUSB allows reading and writing to the fifo in 32/16/8 bitwidth. The Linux kernel does this sometimes, most usually atthe end of writing the packet to allow packet to end at a...
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...
fw_cfg: make calls typesafe
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fw_cfg: add API for file transfer.
This patch adds a file transfer interface to fw_cfg. Intended to beused for passing non-pci option roms and vgabios to seabios. Namespaceis modeled after the existing cbfs filesystem support in seabios.
Reading the new FW_CFG_FILE_DIR entry returns a file list....
roms: use new fw_cfg file xfer support.
roms: use fw_cfg for vgabios and option rom loading, additionally todeploying them the traditional way (copy to 0xc0000 -> 0xe0000 range).
roms: remove option rom packing logic
Now that we load the option roms via fw_cfg, we can stop copyingthem to the 0xc000 -> 0xe000. The patch does just that.
Also the rom loader gets simplified as all remaining users of therom loader load the bits at a fixed address so the packing and...
Update SeaBIOS to include PCI based option rom loading
Also remove pcbios from the tree. It will no longer work.
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."
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.
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.
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.
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: set Config1.CA for MIPS16-aware CPUs
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>