Statistics
| Branch: | Revision:

root / target-arm @ 505935fc

# Date Author Comment
6a57f3eb 12/10/2013 03:28 pm Will Newton

target-arm: Move call to disas_vfp_insn out of disas_coproc_insn.

Floating point is an extension to the instruction set rather than
a coprocessor, so call it directly from the ARM and Thumb decode
functions.

Signed-off-by: Will Newton <>...

04731fb5 12/10/2013 03:28 pm Will Newton

target-arm: Implement ARMv8 VSEL instruction.

This adds support for the VSEL floating point selection instruction
which was added in ARMv8.

Signed-off-by: Will Newton <>
Reviewed-by: Peter Maydell <>
Message-id: ...

40cfacdd 12/10/2013 03:28 pm Will Newton

target-arm: Implement ARMv8 FP VMAXNM and VMINNM instructions.

This adds support for the ARMv8 floating point VMAXNM and VMINNM
instructions.

Signed-off-by: Will Newton <>
Reviewed-by: Peter Maydell <>
Message-id: ...

505935fc 12/10/2013 03:28 pm Will Newton

target-arm: Implement ARMv8 SIMD VMAXNM and VMINNM instructions.

This adds support for the ARMv8 Advanced SIMD VMAXNM and VMINNM
instructions.

Signed-off-by: Will Newton <>
Message-id: ...

3541addc 12/10/2013 03:28 pm Peter Maydell

target-arm: Don't hardcode KVM target CPU to be A15

Instead of assuming that a KVM target CPU must always be a
Cortex-A15 and hardcoding this in kvm_arch_init_vcpu(),
store the KVM_ARM_TARGET_* value in the ARMCPU class,
and use that.

Signed-off-by: Peter Maydell <>...

a96c0514 12/10/2013 03:28 pm Peter Maydell

target-arm: Provide '-cpu host' when running KVM

Implement '-cpu host' for ARM when we're using KVM, broadly
in line with other KVM-supporting architectures.

Signed-off-by: Peter Maydell <>
Reviewed-by: Christoffer Dall <>...

a22ec1e6 12/10/2013 03:28 pm Peter Maydell

target-arm: Provide PSCI constants to generic QEMU code

Provide versions of the KVM PSCI constants to non-KVM code;
this will allow us to avoid an ifdef in boards which set up
a PSCI node in the device tree.

Signed-off-by: Peter Maydell <>...

54d3e3f5 12/10/2013 03:28 pm Peter Maydell

target-arm: Add ARMCPU field for Linux device-tree 'compatible' string

Linux requires device tree CPU nodes to include a 'compatible'
string describing the CPU. Add a field in the ARMCPU struct for
this so that boards which construct a device tree can insert...

5de16430 12/10/2013 03:28 pm Peter Maydell

target-arm: Allow secondary KVM CPUs to be booted via PSCI

New ARM boards are generally expected to boot their secondary CPUs
via the PSCI interface, rather than ad-hoc "loop around in holding
pen code" as hw/arm/boot.c implements. In particular this is
necessary for mach-virt kernels. For KVM we achieve this by creating...

72b0cd35 12/10/2013 03:28 pm Peter Maydell

target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM

There are a number of places where it would be convenient for ARM
code to have working definitions of KVM constants even in code
which is compiled with CONFIG_KVM not set. In this situation we...

8641136c 10/31/2013 03:00 pm Nathan Rossi

target-arm: Add CP15 VBAR support

Added Vector Base Address remapping on ARM v7.

Signed-off-by: Nathan Rossi <>
Signed-off-by: Peter Crosthwaite <>
[PMM: removed spurious mask of value with 1<<31]
Signed-off-by: Peter Maydell <>

cbf239b7 10/31/2013 03:00 pm Alvise Rigo

target-arm: sort TCG cpreg list by KVM-style 64 bit ID number

Both KVM and TCG populate the cpreg_list with 64 bit register IDs,
but in the TCG side the cpreg_list is sorted using the 32 bit ID
version while in the kvm side the 64 bit ID version is used. This...

0bc2a331 10/31/2013 03:00 pm Alvise Rigo

target-arm: fix sorting issue of KVM cpreg list

The compare_u64 function was not sorting the KVM cpreg_list in the
right way due to the wrong returned value. Since we are comparing
two 64bit values we can't simply return their difference if the
returned type is int....

1cb9b64d 10/18/2013 08:01 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/configure' into staging

  1. By Peter Maydell (3) and Ákos Kovács (2)
  2. Via Paolo Bonzini
    • bonzini/configure:
      ui/Makefile.objs: delete unnecessary cocoa.o dependency
      default-configs/: CONFIG_GDBSTUB_XML removed
      Makefile.target: CONFIG_NO_* variables removed...
cf01ba9e 10/16/2013 07:21 pm Ákos Kovács

Makefile.target: CONFIG_NO_* variables removed

CONFIG_NO_* variables replaced with the lnot logical function

Signed-off-by: Ákos Kovács <>
[PMM: fixed a few CONFIG_NO_* uses that were missed]
Signed-off-by: Peter Maydell <>...

ab1eb72b 10/11/2013 07:36 pm Anthony Liguori

Merge remote-tracking branch 'rth/tcg-pull' into staging

  1. By Richard Henderson
  2. Via Richard Henderson
    • rth/tcg-pull:
      exec: Add both big- and little-endian memory helpers
      tcg: Add qemu_ld_st_i32/64
      tcg: Add TCGMemOp
      configure: Remove CONFIG_QEMU_LDST_OPTIMIZATION...
39c153b8 10/10/2013 11:16 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings / X86CPU

  • Fix for X86CPU model field of qemu32/qemu64 CPU models
  • Bug fix for longjmp on FreeBSD
  • Removal of unused function
  • Confinement of clone syscall infrastructure to linux-user...
5cd8f621 10/10/2013 09:43 pm Richard Henderson

tcg: Move helper registration into tcg_context_init

No longer needs to be done on a per-target basis.

Signed-off-by: Richard Henderson <>

f5daeec4 10/10/2013 09:43 pm Richard Henderson

tcg: Remove stray semi-colons from target-*/helper.h

During GEN_HELPER=1, these are actually stray top-level semi-colons
which are technically invalid ISO C, but GCC accepts as an extension.
If we added enough extension markers that we could dare use...

51fb256a 10/07/2013 12:48 pm Andreas Färber

cpu: Drop cpu_model_str from CPU_COMMON

Since this is only read in cpu_copy() and linux-user has a global
cpu_model, drop the field from generic code.

Signed-off-by: Andreas Färber <>

3df2b8fd 09/25/2013 10:23 pm Stefan Weil

misc: Use new rotate functions

Signed-off-by: Stefan Weil <>

3407ad0e 09/10/2013 09:11 pm Alexander Graf

target-arm: Export cpu_env

The cpu_env tcg variable will be used by both the AArch32 and AArch64
handling code. Unstaticify it, so that both sides can make use of it.

Signed-off-by: Alexander Graf <>
Signed-off-by: John Rigby <>...

0a2461fa 09/10/2013 09:11 pm Alexander Graf

target-arm: Fix target_ulong/uint32_t confusions

Correct a few places that were using uint32_t or a 32 bit
only format string to handle something that should be a target_ulong.

Signed-off-by: Alexander Graf <>
Signed-off-by: John Rigby <>...

eaed129d 09/10/2013 09:11 pm Peter Maydell

target-arm: Pass DisasContext* to gen_set_pc_im()

We want gen_set_pc_im() to work for both AArch64 and AArch32, but
to do this we'll need the DisasContext* so we can tell which mode
we're in, so pass it in as a parameter.

Signed-off-by: Peter Maydell <>...

d14d42f1 09/10/2013 09:11 pm Peter Maydell

target-arm: Add new AArch64CPUInfo base class and subclasses

Create a new AArch64CPU class; all 64-bit capable ARM
CPUs are subclasses of this. (Currently we only support
one, the "any" CPU used by linux-user.)

Signed-off-by: Peter Maydell <>...

15ee776b 09/10/2013 09:11 pm Peter Maydell

target-arm: Disable 32 bit CPUs in 64 bit linux-user builds

If we're building aarch64-linux-user then the 32 bit CPUs are
all unwanted, because they can't possibly execute the 64 bit
binaries we will be running; disable them.

Signed-off-by: Peter Maydell <>...

3926cc84 09/10/2013 09:11 pm Alexander Graf

target-arm: Prepare translation for AArch64 code

This patch adds all the prerequisites for AArch64 support that didn't
fit into split up patches. It extends important bits in the core cpu
headers to also take AArch64 mode into account.

Add new ARM_TBFLAG_AARCH64_STATE translation buffer flag...

14ade10f 09/10/2013 09:11 pm Alexander Graf

target-arm: Add AArch64 translation stub

We should translate AArch64 mode separately from AArch32 mode. In AArch64 mode,
registers look vastly different, instruction encoding is completely different,
basically the system turns into a different machine.

So let's do a simple if() in translate.c to decide whether we can handle the...

96c04212 09/10/2013 09:11 pm Alexander Graf

target-arm: Add AArch64 gdbstub support

We want to be able to debug AArch64 guests. So let's add the respective gdb
stub functions and xml descriptions that allow us to do so.

Signed-off-by: Alexander Graf <>
Signed-off-by: John Rigby <>...

08307563 09/10/2013 09:11 pm Peter Maydell

target-arm: Abstract out load/store from a vaddr in AArch32

AArch32 code (ie traditional 32 bit world) expects to be
able to pass a vaddr in a TCGv_i32. However when QEMU is
compiled with TARGET_LONG_BITS=32 the TCG load/store
functions take a TCGv_i64. Abstract out load/store with...

f570c61e 09/10/2013 09:11 pm Alexander Graf

target-arm: Extract the disas struct to a header file

We will need to share the disassembly status struct between AArch32 and
AArch64 modes. So put it into a header file that both sides can use.

Signed-off-by: Alexander Graf <>
Signed-off-by: John Rigby <>...

78027bb6 09/10/2013 09:09 pm Cole Robinson

target-arm: Implement qmp query-cpu-definitions

Libvirt uses this to introspect available CPU models.

Signed-off-by: Cole Robinson <>
Reviewed-by: Andreas Färber <>
Message-id: ...

f5f6d38b 09/10/2013 09:09 pm Peter Maydell

target-arm: Make '-cpu any' available in linux-user mode only

Make the 'any' CPU for target-arm available only in linux-user mode.
The ARM target provides a CPU named "any", which turns on support for
all user-level instruction set extensions we know about. This is...

534df156 09/10/2013 09:09 pm Peter Maydell

target-arm: Use sextract32() in branch decode

In the decode of ARM B and BL insns, swap the order of the
"append 2 implicit zeros to imm24" and the sign extend, and
use the new sextract32() utility function to do the latter.
This avoids a direct dependency on the undefined C behaviour...

78dbbbe4 09/10/2013 09:09 pm Peter Maydell

target-arm: Avoid "1 << 31" undefined behaviour

Avoid the undefined behaviour of "1 << 31" by using 1U to make
the shift be of an unsigned value rather than shifting into the
sign bit of a signed integer. For consistency, we make all the
CPSR_* constants unsigned, though the only one which triggers...

f62cafd4 09/10/2013 09:09 pm Sebastian Ottlik

target-arm: fix ARMv7M stack alignment on reset

When the initial SP is loaded from the vector table on ARMv7M systems the two
least significant bits are ignored as the stack is always aligned at a four byte
boundary (see ARM DDI 0403C, B1.4.1 and B1.5.5). So far QEMU did not ignore...

5a93d5c2 09/03/2013 08:31 pm Anthony Liguori

Merge remote-tracking branch 'mjt/trivial-patches' into staging

  1. By Stefan Weil (6) and others
  2. Via Michael Tokarev
    • mjt/trivial-patches:
      aio / timers: use g_usleep() not sleep()
      adlib: sort offsets in portio registration
      qmp: fix integer usage in examples...
8cfd0495 09/02/2013 07:08 pm Richard Henderson

tcg: Change tcg_gen_exit_tb argument to uintptr_t

And update all users.

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

e0c270d9 09/01/2013 06:34 pm Stefan Weil

target-arm: Report unimplemented opcodes (LOG_UNIMP)

These unimplemented opcodes are handled like illegal opcodes, but
they are used in existing code. We should at least report when they
are executed.

Signed-off-by: Stefan Weil <>
Reviewed-by: Peter Maydell <>...

bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <>...

22d9e1a9 08/20/2013 04:54 pm Peter Maydell

target-arm: Allow raw_read() and raw_write() to handle 64 bit regs

Extend the raw_read() and raw_write() helper accessors so that
they can be used for 64 bit registers as well as 32 bit registers.

Signed-off-by: Peter Maydell <>
Tested-by: Laurent Desnogues <>...

2452731c 08/20/2013 04:54 pm Peter Maydell

target-arm: Support coprocessor registers which do I/O

Add an ARM_CP_IO flag which an ARMCPRegInfo definition can use to
indicate that the register's implementation does I/O and thus
its accesses need to be surrounded by gen_io_start()/gen_io_end()
in order for icount to work. Most notably, cp registers which...

55d284af 08/20/2013 04:54 pm Peter Maydell

target-arm: Implement the generic timer

The ARMv7 architecture specifies a 'generic timer' which is implemented
via cp15 registers. Newer kernels will prefer to use this rather than
a devboard-level timer. Implement the generic timer for TCG; for KVM
we will already use the hardware's virtualized timer for this....

3f1beaca 08/20/2013 04:54 pm Peter Maydell

target-arm: Implement 'int' loglevel

The 'int' loglevel for recording interrupts and exceptions
requires support in the target-specific code. Implement
it for ARM. This improves debug logging in some situations
that were otherwise pretty opaque, such as when we fault...

7c1840b6 08/20/2013 04:54 pm Peter Maydell

target-arm: Make IRQ and FIQ gpio lines on the CPU object

Now that ARMCPU is a subclass of DeviceState, we can make the
CPU's inbound IRQ and FIQ lines be simply gpio lines, which
means we can remove the odd arm_pic shim.

We retain the arm_pic_init_cpu() function as a backwards...

14a10fc3 07/29/2013 04:29 pm Andreas Färber

cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".

The reason for the failure is that CPUClass::kvm_fd is not yet...

dfc6f865 07/27/2013 10:22 am Stefan Weil

misc: Use g_assert_not_reached for code which is expected to be unreachable

The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

986a2998 07/27/2013 01:04 am Andreas Färber

gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions

This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.

Semi-automatic conversion using, e.g.,
sed i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target*/gdbstub.c...

5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

Acked-by: Michael Walle <> (for lm32)
Acked-by: Max Filippov <> (for xtensa)
Signed-off-by: Andreas Färber <>

5b24c641 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_core_xml_file for GDB_CORE_XML

Replace the GDB_CORE_XML define in gdbstub.c with a CPUClass field.
Use first_cpu for qSupported and qXfer:features:read: for now.
Add a stub for xml_builtin.

Signed-off-by: Andreas Färber <>

58850dad 07/27/2013 12:24 am Andreas Färber

target-arm: Move cpu_gdb_{read,write}_register()

Signed-off-by: Andreas Färber <>

a0e372f0 07/27/2013 12:23 am Andreas Färber

cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs

CPUState::gdb_num_regs replaces num_g_regs.
CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.

Allows building gdb_register_coprocessor() for xtensa, too.

As a side effect this should fix coprocessor register numbering for SMP....

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

f17ec444 07/23/2013 03:41 am Andreas Färber

exec: Change cpu_memory_rw_debug() argument to CPUState

Propagate X86CPU in kvmvapic for simplicity.

Signed-off-by: Andreas Färber <>

22169d41 07/23/2013 03:41 am Andreas Färber

gdbstub: Change gdb_register_coprocessor() argument to CPUState

Signed-off-by: Andreas Färber <>

bdf7ae5b 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

ed2803da 07/23/2013 03:41 am Andreas Färber

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

9e0c5422 07/23/2013 03:41 am Andreas Färber

gdbstub: Change syscall callback argument to CPUState

Callback implementations were specific to arm and m68k, so can easily
cast to ARMCPU and M68kCPU respectively.

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

f45748f1 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

Signed-off-by: Andreas Färber <>

2359bf80 07/15/2013 07:13 pm Mans Rullgard

target-arm: implement LDA/STL instructions

This adds support for the ARMv8 load acquire/store release instructions.
Since qemu does nothing special for memory barriers, these can be
emulated like their non-acquire/release counterparts.

Signed-off-by: Mans Rullgard <>...

12b10571 07/15/2013 07:13 pm Mans Rullgard

target-arm: explicitly decode SEVL instruction

The ARMv8 SEVL instruction is in the architectural hint space already
emulated as nop. This makes the decoding of SEVL explicit for clarity.

Signed-off-by: Mans Rullgard <>
Message-id: ...

a703eda1 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: OMAP/StrongARM cp15 crn=0 cleanup

The if block detecting OMAP/StrongARM modifies the id_cp_reginfo
.access fields in place. So there is no need to replicate the call
to define_arm_cp_reg(). Dropped, and let the OMAP case fall through...

97ce8d61 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: Implement MIDR aliases

Unimplemented registers in the cp15, CRn=0, opc1=0, CRm=0 space default
to aliasing the MIDR register. Set all registers in the space to access
MIDR by default.

Signed-off-by: Peter Crosthwaite <>...

204a9c43 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: Allow const opaques in arm CP

Allow for defining const opaque data in ARM CP register definitions by
setting .opaque = foo. If non null opaque is passed into
define_one_arm_cp_reg_with_opaque then that opaque will take
precedence, otherwise if null opaque is passed, the original opaque...

2ebcebe2 07/15/2013 07:13 pm Peter Maydell

target-arm: avoid undefined behaviour when writing TTBCR

LPAE CPUs have more potentially valid bits in the TTBCR, and so the
simple masking out of invalid bits is no longer sufficient to obtain
the base address width field of the register, which is what we use to...

82a3a118 07/15/2013 07:13 pm Peter Maydell

target-arm: Avoid g_hash_table_get_keys()

g_hash_table_get_keys() was only introduced in glib 2.14, and we're
still targeting a minimum version of 2.12. Rewrite the offending
code (introduced in commit 721fae1) to use g_hash_table_foreach()
to build the list of keys....

81e69fb0 07/15/2013 04:35 pm Mans Rullgard

target-arm: add feature flag for ARMv8

Signed-off-by: Mans Rullgard <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

a0762859 07/09/2013 10:33 pm Andreas Färber

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

91b1df8c 07/09/2013 10:33 pm Andreas Färber

cpu: Move reset logging to CPUState

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

5639c3f2 07/09/2013 10:33 pm Andreas Färber

target-arm: Change gen_intermediate_code_internal() argument to ARMCPU

Also use bool type while at it.

Prepares for moving singlestep_enabled field to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

6291ad77 07/09/2013 10:20 pm Peter Maydell

linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-user

The functions cpu_clone_regs() and cpu_set_tls() are not purely CPU
related -- they are specific to the TLS ABI for a a particular OS.
Move them into the linux-user/ tree where they belong....

6e42be7c 07/09/2013 10:20 pm Andreas Färber

cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

A transition from CPUFooState to FooCPU can be considered safe,
just like FooCPU::env access in the opposite direction.
The only benefit of the FOO_CPU() casts would be protection against
bogus CPUFooState pointers, but then surrounding code would likely...

dfde4e6e 07/04/2013 06:42 pm Paolo Bonzini

memory: add ref/unref calls

Add ref/unref calls at the following places:

- places where memory regions are stashed by a listener and
used outside the BQL (including in Xen or KVM).

- memory_region_find callsites

- creation of aliases and containers (only the aliased/contained...

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

721fae12 06/25/2013 08:16 pm Peter Maydell

target-arm: Convert TCG to using (index,value) list for cp migration

Convert the TCG ARM target to using an (index,value) list for migrating
coprocessors. The primary benefit of the (index,value) list is for
passing state between KVM and QEMU, but it works for TCG-to-TCG...

ff047453 06/25/2013 08:16 pm Peter Maydell

target-arm: Initialize cpreg list from KVM when using KVM

When using KVM, use the kernel's initial state to set up the
cpreg list, and sync to and from the kernel when doing
migration.

Signed-off-by: Peter Maydell <>

2d8e5a0e 06/25/2013 08:16 pm Peter Maydell

target-arm: Reinitialize all KVM VCPU registers on reset

Since the ARM KVM API doesn't include a "reset this VCPU"
ioctl, we have to capture the initial values of every
register it knows about so that we can reset the VCPU
by feeding those values back again....

f7134d96 06/25/2013 08:16 pm Peter Maydell

target-arm: Use tuple list to sync cp regs with KVM

Use the tuple list of cp registers for syncing KVM state to QEMU,
rather than only syncing a very minimal set by hand.

Signed-off-by: Peter Maydell <>

bdcc150d 06/25/2013 08:16 pm Peter Maydell

target-arm: Make LPAE feature imply V7MP

The v7 ARM ARM specifies that the Large Physical Address
Extension requires implementation of the Multiprocessing
Extensions, so make our LPAE feature imply V7MP rather
than specifying both in the A15 CPU initfn.
...

34affeef 06/25/2013 08:16 pm Peter Maydell

target-arm: Allow special cpregs to have flags set

Relax the "is this a valid ARMCPRegInfo type value?" check to permit
"special" cpregs to have flags other than ARM_CP_SPECIAL set. At
the moment none of the other flags are relevant for special regs,
but the migration related flag we're about to introduce can apply...

7023ec7e 06/25/2013 08:16 pm Peter Maydell

target-arm: Add raw_readfn and raw_writefn to ARMCPRegInfo

For reading and writing register values from the kernel for KVM,
we need to provide accessor functions which are guaranteed to succeed
and don't impose access checks, mask out unwritable bits, etc....

d4e6df63 06/25/2013 08:16 pm Peter Maydell

target-arm: mark up cpregs for no-migrate or raw access

Mark up coprocessor register definitions to add raw access
functions or mark the register as non-migratable where necessary.

Signed-off-by: Peter Maydell <>

301255e6 06/14/2013 03:51 pm Anthony Liguori

Merge remote-tracking branch 'mjt/trivial-patches-next' into staging

  1. By Michael Tokarev (4) and others
  2. Via Michael Tokarev
    • mjt/trivial-patches-next: (26 commits)
      piix: fix some printf errors when debug is enabled
      cputlb: fix debug logs
      create qemu_openpty_raw() helper function and move it to a separate file...
db9707f7 06/14/2013 03:50 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/target-arm.next' into staging

  1. By Peter Chubb
  2. Via Peter Maydell
    • pmaydell/target-arm.next:
      Fix rfe instruction

Message-id:
Signed-off-by: Anthony Liguori <>

b3a1c626 06/12/2013 12:19 pm Alexey Kardashevskiy

KVM: ARM: Add dummy kvm_arch_init_irq_routing()

The common KVM code insists on calling kvm_arch_init_irq_routing()
as soon as it sees kernel header support for it (regardless of whether
QEMU supports it). Provide a dummy function to satisfy this.

Signed-off-by: Alexey Kardashevskiy <>...

5866e078 06/03/2013 04:59 pm Peter Chubb

Fix rfe instruction

The rfe instruction has been broken since patch
5a839c0d54fac9db0516904db873a4fe01f50f4b because of a typo.

Signed-off-by: Peter Chubb <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

6681fca3 06/01/2013 01:25 pm Stefan Weil

Remove unnecessary break statements

Fix these warnings from cppcheck:

hw/display/cirrus_vga.c:2603:
hw/sd/sd.c:348:
hw/timer/exynos4210_mct.c:1033:
target-arm/translate.c:9886:
target-s390x/mem_helper.c:518:
target-unicore32/translate.c:1936:
style: Consecutive return, break, continue, goto or throw statements are unnecessary....

5b35b4e9 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* definitions

All the uses of the gen_{ld,st}* functions are gone now, so remove
the functions themselves.

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

58ab8e96 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove uses of gen_{ld,st}* from Neon code

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

94ee24e7 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove use of gen_{ld,st}* from ldrex/strex

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

5a839c0d 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from basic ARM insns

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

c40c8556 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from Thumb insns

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

e2592fad 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from thumb2 decoder

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

29531141 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove uses of gen_{ld,st}* from iWMMXt code

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

8ed1237d 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_ld64() and gen_st64()

gen_ld64() and gen_st64() are used only in one place, so just
expand them out.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

39d5492a 05/26/2013 01:04 pm Peter Maydell

target-arm: Don't use TCGv when we mean TCGv_i32

TCGv changes size depending on the compile time value of
TARGET_LONG_BITS. This is useful for generating code for MIPS style
"instructions are the same but the register width changes" CPUs, and
also for the generic bits of QEMU which operate on "width of a...

536f25e4 05/03/2013 08:47 pm Peter Maydell

target-arm: Fix incorrect check of kvm_vcpu_ioctl return value

kvm_vcpu_ioctl() returns ETHING on error, not ETHING - correct
an incorrect check in kvm_arch_init_vcpu(). This would not have
had any significant ill-effects -- we would just have propagated...

602131e9 04/19/2013 02:24 pm Peter Maydell

target-arm: Add some missing CPU state fields to VMState

A number of CPU state fields were accidentally omitted from
our migration state: some OMAP specific cp15 registers, and
some related to state for load/store exclusive insns. Add them.

Signed-off-by: Peter Maydell <>

e91f229a 04/19/2013 02:24 pm Peter Maydell

target-arm: Correctly restore FPSCR

Use the helper functions to save and restore the FPSCR, so that
we correctly propagate rounding mode and flushing behaviour into
the float_status fields. This also allows us to stop saving the
vector length/stride fields separately....