configure: Fix spice probe
Non-existent $pkgconfig instead of $pkg_config was used when configureprobes for spice availability.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
spice: add chardev (v5)
Adding a chardev backend for spice, where spice determines whatto do with it based on the name attribute given during chardev creation.For usage by spice vdagent in conjunction with a properly namedvirtio-serial device, and future smartcard channel usage....
qxl: locking fix
One spice worker call lacks the unlock/relock calls,which may lead to deadlocks, add them.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
add migration state change notifiers
This patch adds functions to register and unregister notifiers formigration state changes and a function to query the migration state.The notifier is called on every state change. Once after establishing anew migration object (which is in active state then) and once when the...
spice/vnc: client migration.
Handle spice client migration, i.e. inform a spice client connectedabout the new host and connection parameters, so it can move over theconnection automatically.
The monitor command has a not-yet used protocol argument simliar to...
spice: MAINTAINERS update
vnc/spice: fix "never" and "now" expire_time
spice/qxl: zap spice 0.4 migration compatibility bits
Live migration from and to spice 0.4 qxl devices isn't going to work.Rip out the bits which attempt to support that. Zap the subsectionlogic which is obsolete now. Bumb the version to make a clean cut....
multiboot: Fix upper memory size in multiboot info
The upper memory size field should exclude the first MB of RAM.
Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Delete useless 'extern' qualifiers for functions
'extern' qualifier is useless for function declarations. Deletethem.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
gdbstub-xml: avoid a warning from sparse
Include a header to get the declaration for xml_builtin. Thisavoids a warning from sparse: CC m68k-softmmu/gdbstub-xml.ogdbstub-xml.c:244:12: warning: symbol 'xml_builtin' was not declared. Should it be static?...
Avoid deadlock whith iothread and icount
When using the iothread together with icount, make sure theqemu_icount counter makes forward progress when the vcpu isidle to avoid deadlocks.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: cleanup helper_addkc
Remove unused addition and rename to helper_carry.
microblaze: Improve subkc
Move code from the helper into the translator. The remaininghelper parts can reuse helper_addkc, making it possible toremove helper_subkc entirely.
microblaze: Fix 3rd addkc arg when rd is r0
microblaze: Improve addkc
microblaze: Remove debug leftovers.
No functional changes.
microblaze: Reorganize for future patches
ppc: Correct BookE tlb reads
Call the tlb read helper (and not the write helper) for tlbreads.
checkpatch: Fix bracing false positives on #else
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge branch 'usb.4' of git://anongit.freedesktop.org/spice/qemu
sm501: fix screen redraw
Due to signed/unsigned comparison, the dirty bits are never reset, andthe screen redrawn each time. Fix that by only using ram_addr_t types,and looking for page_min != addr_max instead.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
checkpatch: adjust to QEMUisms
Change checkpatch.pl for QEMU use: - Root directory detection - Forbid tabs - Indent at 4 spaces - Allow typedefs - Enforce brace use even for single statement blocks - Don't suggest nonexistent cleanup tools
Mention the script in CODING_STYLE....
Add checkpatch.pl from Linux kernel
Unchanged import fromhttp://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.31
Add scripts directory
Move build and user scripts into scripts directory.
gt64xxx: set isa_mem_base during registration
isa_mem_base is computed from registers during reset, but due to QEMUlimitations some devices (e.g. VGA card) need to know it earlier whenthey are registered.
Workaround this by setting the value during registration instead of...
hw/pl190.c: Fix writing of default vector address
The PL190 implementation keeps the default vector addressin vect_addr16, but we weren't using this for writes tothe DEFVECTADDR register. As a result of this fix thedefault_addr structure member is unused and we can delete it....
Merge remote branch 'mst/for_anthony' into staging
target-ppc: fix wrong NaN tests
Some tests in FPU emulation code were wrongly using float64_is_nan()before commit 185698715dfb18c82ad2a5dbc169908602d43e81, and wronglyusing float64_is_quiet_nan() after. Fix them by using float64_is_any_nan()instead.
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>...
target-ppc: fix sNaN propagation
The current FPU code returns 0.0 if one of the operand is asignaling NaN and the VXSNAN exception is disabled.
fload_invalid_op_excp() doesn't return a qNaN in case of a VXSNANexception as the operand should be propagated instead of a new...
pci: use qemu_malloc() in pcibus_get_dev_path()
use qemu_malloc() instead of direct use of malloc().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
msix: simplify write config
use pci_device_deassert_intx().
msi: simplify write config a bit.
pci: deassert intx on reset.
deassert intx on device reset.So far pci_device_reset() is used for system reset.In that case, interrupt controller is reset at the same time so thatall irq is are deasserted.But now pci bus reset/flr is supported, and in that case irq needs to be...
sh_pci: qdev conversion
gt64xxx: qdev conversion
pl190: Implement save/restore
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vpb_sic: Implement save/restore
arm_sysctl: Implement save/restore
pl050: Implement save/restore
pl031: Implement save/restore
pl110: Implement save/restore
pl080: Implement save/restore
stc91c111: Implement save/restore
add bepo (french dvorak) keyboard layout
I'm using the Qemu program with VNC I/O, and I had some problems withmy keyboard layout, so I've prepared a definition to be included inQemu, built from Xorg description.
Signed-off-by: Frédéric Boiteux <fboiteux@free.fr>...
mainstone: fix name of the allocated memory for roms
Mainstone board has two flash chips (emulated by two ram regions), howevercurrently code tries to allocate them with the same name, which fails.Fix that to make mainstone emulation work again.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>...
scoop: fix access to registers from second instance
Second instance of scoop contains registers shifted to 0x40 from the startof the page. Instead of messing with register mapping, just limit registeraddress to 0x00..0x3f.
pxa2xx: fix vmstate_pxa2xx_i2c
vmstate_pxa2xx_i2c incorrectly recursed to itself instead of goingto store slave device. Fix that stop stop qemu from segfaultingduring savevm for pxa2xx-based devices.
pxa2xx_lcd: restore updating of display
Recently PXA2xx lcd have stopped to be updated incrementally (picturefrozen). This patch fixes that by passing non min/max x/y, but rather(correctly) x/y and w/h.
softfloat: fix floatx80_is_{quiet,signaling}_nan()
floatx80_is_{quiet,signaling}_nan() functions are incorrectly detectingthe type of NaN, depending on SNAN_BIT_IS_ONE, one of the two isreturning the correct value, and the other true for any kind of NaN....
usb-hid: modifiers should generate an event
When a modifier key is pressed or released, the USB HID keyboard stillanswers NAK, unless another key is also pressed or released.
The patch fixes that by calling usb_hid_changed() when a modifier keyis pressed or released....
sh_serial: remove one level of indirection
The indirection functions are empty since commit8da3ff180974732fc4272cb4433fef85c1822961.
sh_serial: process all received characters
When operating on the SCIF, process all the received characters, as longas the FIFO can handle them.
tcg: README, name deposit second argument len/LEN
target-i386: Use deposit operation.
Use this for assignment to the low byte or low word of a register.
Acked-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
tcg: Define "deposit" as an optional operation.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Add support for load/store reversed
Load/store reversed (lwr/swr) are insns that endian translatethe sub-word part of the address and byteswap the data lanes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Tweak comment, fast cases -> common cases
pci: fix device paths
Patch a6a7005d14b3c32d4864a718fb1cb19c789f58a5 generatedbroken device paths. We snprintf with a length shorterthan the output, so the last character is discarded and replacedby the null byte. Fix it up by snprintf to a bufferwhich is larger by 1 byte and then memcpy the data (without...
sparc: fix NaN handling
Fix several bugs in NaN handling: * e in fcmpe* only changes qNaN handling * FCC is unchanged if an exception is raised * clear previous FTT before setting it
Reported-by: Mateusz Loskot <mateusz@loskot.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-arm: Log instruction start in TCG code
Add support for logging the start of instructions in TCGcode debug dumps for ARM targets.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
mips: Break TBs after mfc0_count
Break the TB after reading the count register. This makes itpossible to take timer interrupts immediately after a read ofa possibly expired timer.
mips: Expire late timers when reading cp0_count
When reading cp0_count from a timer with a late trigger that shouldalready have expired, expire it and raise the timer irq.
This makes it possible for guest code (e.g, Linux) that first readcp0_count, then compare it with cp0_compare and check for raised...
mips: Break out cpu_mips_timer_expire
Reorganize for future patches, no functional change.
Acked-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Replace 'extern inline' with 'static inline'
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
bsd-user: Fix possible memory leaks and wrong realloc call
These errors were reported by cppcheck:
[bsd-user/elfload.c:1108]: (error) Common realloc mistake: "syms" nulled but not freed upon failure[bsd-user/elfload.c:1076]: (error) Memory leak: s[bsd-user/elfload.c:1079]: (error) Memory leak: syms...
sm501: add 2D engine copyrect support
Linux kernel started to use the SM501 2D engine for the console, andespecially the copyrect operation.
Implement this operation so that recent kernels can be used with QEMU.
savevm: Fix no_migrate
The no_migrate save state flag is currently only checked in thelast phase of migration. This means that we potentially wastea lot of time and bandwidth with the live state handlers beforewe ever check the no_migrate flags. The error message printed...
acpi_piix4: expose no_hotplug attribute via i/o port
Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicateremovability status to guest OS.
An updated seabios is required to make use of this feature (seabios.gitcommit ID 3c241edf3d7ef29c21)....
document QEMU<->ACPIBIOS PCI hotplug interface
Document how QEMU communicates with ACPI BIOS for PCI hotplug.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
m48t59: Fix a wrong opaque passed to nvram read and write routines
This fixes boot on PPC prep.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
gdbstub: Close connection in gdb_exit
On Windows, this is required to flush the remaining data in the IO stream,otherwise Gdb do not receive the last packet.
Version 2: Fix linux-user build error.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>...
USB keyboard emulation key mapping error
The USB keyboard emulation's translation table in hw/usb-hid.c doesn'tmatch the codes actually sent for the Logo (a.k.a. "Windows") or Menukeys. This results in the guest OS not being able to receive these keysat all when the USB keyboard emulation is being used....
target-sh4: use rotl/rotr when possible
target-sh4: implement negc using TCG
Using setcond it's now possible to generate a relatively short negcinstruction in TCG.
tcg/sparc64: fix segfault
With current OpenBSD, code_gen_buffer was mapped 8GB away fromtext segment. Then any helpers were beyond the 2GB range of callinstruction genereated by TCG and so the calls would go nowhere,leading to a segfault.
Fix by specifying an address for the code_gen_buffer,...
target-sh4: correct use of ! and &
Fix wrong usage of ! and & in MMU related functions. Thanks to BlueSwirl for reporting the issue.
Reported-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
monitor: fix a typo
Fix usage of wrong variable, spotted by clang:/src/qemu/monitor.c:2278:36: warning: The left operand of '&' is a garbage value prot = pde & (PG_USER_MASK | PG_RW_MASK |
make_device_config: Fix non-fatal error message with dash and other shells
ORS=" " adds a blank to the name of the include file.Some shells (e.g. dash) don't accept input redirection(tr -d '\r' < $f) when $f ends with a blank, so theyprint an error message instead of reading pci.mak....
target-arm: Translate with VFP-enabled from TB flags, not CPUState
When translating code, whether the VFP unit is enabled for this TBis stored in a bit in the TB flags. Use this rather than incorrectlyreading the FPEXC from the CPUState passed to translation....
target-arm: Translate with VFP len/stride from TB flags, not CPUState
When translating, the VFP vector length and stride for this TB are encodedin the TB flags; the CPUState copies may be different and must not be used.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-arm: Translate with Thumb state from TB flags, not CPUState
The Thumb/ARM state for the TB being translated should come fromthe TB flags, not the CPUState.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>...
target-arm: Translate with condexec bits from TB flags, not CPUState
When translating, the condexec bits for the TB are in the TB flags;the CPUState condexec bits may be different.
This patch fixes https://bugs.launchpad.net/bugs/604872 where we mightsegfault if we took an exception in the middle of a TB with an IT...
target-arm: Set privileged bit in TB flags correctly for M profile
M profile ARM cores don't have a CPSR mode field. Set the bit in theTB flags that indicates non-user mode correctly for these cores.
target-arm: Translate with user-state from TB flags, not CPUState
When translating, get the user/priv state from the TB flags, notthe CPUState.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Remove redundant setting of IT bits before Thumb SWI
Remove a redundant call to gen_set_condexec() in the translation of Thumbmode SWI. (SWI and WFI generate "exceptions" which happen after theexecution of the instruction, ie when PC and IT bits have updated....
target-arm: Refactor translation of exception generating instructions
Create a new function which does the common sequence of gen_set_condexec,gen_set_pc_im, gen_exception, set is_jmp to DISAS_JUMP.
linux-user: ARM: clear the IT bits when invoking a signal handler
When invoking a signal handler for an ARM target, make sure the ITbits in the CPSR are cleared. (This would otherwise cause incorrectexecution if the IT state was non-zero when an exception occured....
target-arm: Restore IT bits when resuming after an exception
We were not correctly restoring the IT bits when resuming executionafter taking an unexpected exception in the middle of an IT block.Fix this by tracking them along with PC changes and restoring in...
MAINTAINERS: fix typos
MAINTAINERS: Change MIPS and SH4 maintainers
Since nobody else seems interested in maintaining MIPS and SH4 targets,and as I have done most of the recent code changes, let officializethat.
MAINTAINERS: add entries for TCG
The MAINTAINERS file was lacking entries concerning the TCG code, addthem based on the git history.
For the common TCG code, is probably better to keep qemu-devel@non-gnu.orgas this code can break easily, so it's better to get it reviewed by a few...
lsi53c895a: fix endianness issues
lsi_ram_read*() and lsi_ram_write*() are not consistent, one usesleXX_to_cpu() the other uses nothing. As the comment above the RAMdeclaration says: "Script ram is stored as 32-bit words in hostbyteorder.", remove the leXX_to_cpu() calls....
softfloat: Add float32_is_zero_or_denormal() function
Add a utility function to softfloat to test whether a float32is zero or denormal.
target-arm: Fix implementation of VRSQRTS
The implementation of the ARM VRSQRTS instruction (which calculates(3 - op1 * op2) / 2) was missing the division operation. It alsodid not handle the special cases of (0,inf) and (inf,0).
target-arm: Add support for 'Standard FPSCR Value' as used by Neon
Add support to the ARM helper routines for a second fp_status valuewhich should be used for operations which the ARM ARM indicates use"ARM standard floating-point arithmetic" rather than being controlled...
target-arm: Use the standard FPSCR value for VRSQRTS
VSQRTS always uses the standard FPSCR value as it is a Neon instruction.
target-arm: Don't generate code specific to current CPU mode for SRS
When translating the SRS instruction, handle the "store registersto stack of current mode" case in the helper function rather thaninline. This means the generated code does not make assumptions...
target-arm: Add symbolic constants for bitfields in TB flags
Add symbolic constants for the bitfields we use in the TB flags.