Statistics
| Branch: | Revision:

root / target-s390x / helper.c @ feature-archipelago

History | View | Annotate | Download (22.2 kB)

# Date Author Comment
f606604f 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make stq_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

2c17449b 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make ldq/ldub_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

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 <>

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()....

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

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

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

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

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

2b7ac767 02/16/2013 03:50 pm Andreas Färber

target-s390x: Move TCG initialization to S390CPU initfn

Ensures that a QOM-created S390CPU is usable.

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

1f136632 02/16/2013 03:50 pm Andreas Färber

target-s390x: Introduce QOM realizefn for S390CPU

Introduce realizefn and set realized = true in cpu_s390x_init().

Defer CPU reset from initfn to realizefn.

Acked-by: Richard Henderson <>
[AF: Invoke parent's realizefn]
Signed-off-by: Andreas Färber <>

bd9a8d85 02/13/2013 07:56 pm Cornelia Huck

s390: Keep I/O interrupts enabled for all iscs.

do_io_interrupt() would stop scanning further iscs if it found
an I/O interrupt it could inject. This might cause the pending
interrupt indication for I/O interrupts to be reset although there
might be queued I/O interrupts for subsequent iscs....

91b0a8f3 02/13/2013 07:56 pm Cornelia Huck

s390: Fix handling of iscs.

There are two ways to express an interruption subclass:
- As a bitmask, as used in cr6.
- As a number, as used in the I/O interruption word.

Unfortunately, we have treated to I/O interruption word as if it
contained the bitmask as well, which went unnoticed so far as...

0123c486 02/04/2013 11:24 pm Anthony Liguori

s390x: silence warning from GCC on uninitialized values

As best I can tell, this is a false positive.

[aliguori@ccnode4 qemu-s390]$ make
CC s390x-softmmu/target-s390x/helper.o
/home/aliguori/git/qemu/target-s390x/helper.c: In function ‘do_interrupt’:...
b22dd124 02/04/2013 11:24 pm Stefan Weil

target-s390x: Fix wrong comparison in interrupt handling

gcc with -Wextra complains about an ordered pointer comparison:

target-s390x/helper.c:660:27: warning:
ordered comparison of pointer with integer zero [-Wextra]

Obviously the index was missing in the code....

a6f921b0 02/01/2013 03:02 am Andreas Färber

target-s390x: Fix debug output (continued)

Since its introduction in d5a439645a5a70fed5431318c3bce9dc2caa950f
(s390x: helper functions for system emulation) the variable name was
raddr. Fix this.

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

07cc7d12 02/01/2013 03:02 am Andreas Färber

target-s390x: Fix debug output

Commit 71e470886fb6092504503a5fe41092ace71c096c (target-s390x: fix
style) renamed the cpu_s390x_handle_mmu_fault() argument from _vaddr to
orig_vaddr. Update the debug output code.

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

f9466733 02/01/2013 03:02 am Andreas Färber

target-s390x: Clean up cpu_inject_*() signatures

Despite cautioning that S390CPU is needed for upcoming CPUState
refactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390:
I/O interrupt and machine check injection.) added functions
cpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument,...

49e15878 02/01/2013 03:02 am Andreas Färber

target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()

This prepares for moving the halted field to CPUState.
Most call sites can already supply S390CPU, for some env becomes unused.

Signed-off-by: Andreas Färber <>
Acked-by: Cornelia Huck <>...

4782a23b 01/29/2013 10:50 pm Cornelia Huck

s390: Lowcore mapping helper.

Create a lowcore mapping helper that includes a check for sufficient
length.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

38322ed6 01/29/2013 10:50 pm Cornelia Huck

s390: Add mapping helper functions.

Add s390_cpu_physical_memory_{map,unmap} with special handling
for the lowcore.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

5d69c547 01/29/2013 10:50 pm Cornelia Huck

s390: I/O interrupt and machine check injection.

I/O interrupts are queued per isc. Only crw pending machine checks
are supported.

Signed-off-by: Cornelia Huck <>
Signed-off-by: Alexander Graf <>

d5a103cd 01/05/2013 10:00 pm Richard Henderson

target-s390: Reorg exception handling

Make the user path more like the system path. Prepare for more kinds
of runtime exceptions. Rename ILC to ILEN to make it clear that we
want to pass around a full instruction length, rather than a "code"
that happens to be stored one bit left in a larger field....

51855ecf 01/05/2013 10:00 pm Richard Henderson

target-s390: Fix PSW_MASK handling

We were treating psw.mask as the 32-bit quantity it is in ESA mode.
In particular, the CC field was at the wrong place.

Signed-off-by: Richard Henderson <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

0d404541 09/27/2012 10:44 pm Richard Henderson

target-s390x: Use CPU_LOG_INT

Three places in the interrupt code did we not honor the mask.

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

19b0516f 09/10/2012 02:38 pm Blue Swirl

target-s390x: switch to AREG0 free mode

Add an explicit CPUState parameter instead of relying on AREG0.

Remove temporary wrappers and switch to AREG0 free mode.

Signed-off-by: Blue Swirl <>
[agraf: fix conflicts]
Signed-off-by: Alexander Graf <>

71e47088 09/10/2012 02:38 pm Blue Swirl

target-s390x: fix style

Before splitting op_helper.c and helper.c in the next patches,
fix style issues. No functional changes.

Replace also GCC specific FUNCTION with
standard func.

Don't init static variable (cpu_s390x_init:inited) with 0.

Signed-off-by: Blue Swirl <>...

564b863d 06/11/2012 01:23 am Andreas Färber

target-s390x: Let cpu_s390x_init() return S390CPU

Let cpu_init() return CPUS390XState for backwards compatibility.

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

b7e516ce 06/05/2012 12:00 am Andreas Färber

Kill off cpu_state_reset()

In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset()
was renamed to cpu_state_reset(), to allow introducing a new cpu_reset()
that would operate on QOM objects.

All callers have been updated except for one in target-mips, so drop all...

b8ba6799 04/04/2012 08:06 pm Andreas Färber

target-s390x: Update s390x_{tod,cpu}_timer() to use S390CPU

In place of CPUS390XState pass S390CPU as opaque from the new initfn.
cpu_interrupt() is anticipated to take a CPUState in the future.

Signed-off-by: Andreas Färber <>
Tested-by: Christian Borntraeger <>

8f22e0df 04/04/2012 06:35 pm Andreas Färber

target-s390x: QOM'ify CPU init

Move code from cpu_s390x_init() into an initfn.

Signed-off-by: Andreas Färber <>
Tested-by: Christian Borntraeger <>

1ac1a749 04/04/2012 06:34 pm Andreas Färber

target-s390x: QOM'ify CPU reset

Move code from cpu_state_reset() to s390_cpu_reset().

Signed-off-by: Andreas Färber <>
Tested-by: Christian Borntraeger <>

29e4bcb2 04/04/2012 06:29 pm Andreas Färber

target-s390x: QOM'ify CPU

Embed CPUS390XState as first member of S390CPU.
Since -cpu is being ignored, make TYPE_S390_CPU non-abstract.

Signed-off-by: Andreas Färber <>
Tested-by: Christian Borntraeger <>

a4e3ad19 03/14/2012 11:20 pm Andreas Färber

target-s390x: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUS390XState/g" target-s390x/*.[hc]
sed -i "s/#define CPUS390XState/#define CPUState/" target-s390x/cpu.h

Signed-off-by: Andreas Färber <>
Acked-by: Anthony Liguori <>

1bba0dc9 03/14/2012 11:20 pm Andreas Färber

Rename cpu_reset() to cpu_state_reset()

Frees the identifier cpu_reset for QOM CPUs (manual rename).

Don't hide the parameter type behind explicit casts, use static
functions with strongly typed argument to indirect.

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

45133b74 02/28/2012 11:33 pm Stefan Weil

target-s390x: Clean includes

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

Signed-off-by: Stefan Weil <>

b9959138 11/14/2011 06:47 pm Alexander Graf

s390x: update R and C bits in storage key

When the s390x maps a page or writes happen to a page, the R and C
bits get updated. The easiest way to implement this in qemu is to
simply update them whenever we map a TLB translation and act according
to the permissions....

ef81522b 11/14/2011 06:47 pm Alexander Graf

s390x: Add shutdown for TCG s390-virtio machine

Now that we have code in place to do refcounting of online CPUs, we
can drag the TCG code along and implement shutdown for that one too,
so it doesn't feel left out by its KVM counterpart.

Signed-off-by: Alexander Graf <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

97b348e7 08/07/2011 12:32 pm Blue Swirl

Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <>...

d5ab9713 08/05/2011 06:57 pm Jan Kiszka

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when
running over KVM or XEN. Saves a "few" bytes in the qemu address space
and is also conceptually cleaner.

Signed-off-by: Jan Kiszka <>...

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

d4a3ef69 06/03/2011 02:34 pm Stefan Weil

target-s390x: Fix build for non-linux hosts

linux/kvm.h is not always available for compilation.

Neither linux/kvm.h nor kvm.h are needed, so remove both
which also fixes the build problem for non-linux hosts.

Cc: Alexander Graf <>
Signed-off-by: Stefan Weil <>...

d5a43964 05/20/2011 06:35 pm Alexander Graf

s390x: helper functions for system emulation

When running system emulation, we need to transverse through the MMU and
deliver interrupts according to the specification.

This patch implements those two pieces and in addition adjusts the CPU
initialization code to account for the new fields in CPUState....

3110e292 04/18/2011 09:51 pm Alexander Graf

s390x: Enable s390x-softmmu target

This patch adds some code paths for running s390x guest OSs without the
need for KVM.

Signed-off-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

c92114b1 04/01/2010 10:51 pm Alexander Graf

S390: Add stub for cpu_get_phys_page_debug

We don't implement any virtual memory in the S390 target so far, so let's
add a stub for this now mandatory function.

Fixes building of S390 target.

Signed-off-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

d4c430a8 03/17/2010 04:44 am Paul Brook

Large page TLB flush

QEMU uses a fixed page size for the CPU TLB. If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate...

4fcc562b 03/12/2010 08:34 pm Paul Brook

Remove cpu_get_phys_page_debug from userspace emulation

cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.

Signed-off-by: Paul Brook <>

70539e18 03/07/2010 05:48 pm Blue Swirl

Update to a hopefully more future proof FSF address

See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,
530e7615ce3c01882e582c84dc6304ab98a3d5c5 and
fad6cb1a565bb73f83fc0e2654489457b489e436.

Signed-off-by: Blue Swirl <>

10c339a0 12/05/2009 06:36 pm Alexander Graf

Add support for S390x system emulation

Let's enable the basics for system emulation so we can run virtual machines
with KVM!

Signed-off-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

10ec5117 12/05/2009 06:36 pm Alexander Graf

S/390 CPU fake emulation

Because Qemu currently requires a TCG target to exist and there are quite some
useful helpers here to lay the groundwork for out KVM target, let's create a
stub TCG emulation target for S390X CPUs.

This is required to make tcg happy. The emulation target itself won't work...