Statistics
| Branch: | Revision:

root / target-s390x / cpu.h @ cfef53e3

History | View | Annotate | Download (33.1 kB)

# Date Author Comment
102bf2c6 01/05/2013 10:18 pm Richard Henderson

target-s390: Convert FLOGR

Signed-off-by: Richard Henderson <>

587626f8 01/05/2013 10:18 pm Richard Henderson

target-s390: Convert FP ADD, COMPARE, LOAD TEST/ROUND/LENGTHENED

Signed-off-by: Richard Henderson <>

cbe24bfa 01/05/2013 10:18 pm Richard Henderson

target-s390: Convert SHIFT, ROTATE SINGLE

Note that we were missing the 32-bit SLA.

Signed-off-by: Richard Henderson <>

b4e2bd35 01/05/2013 10:18 pm Richard Henderson

target-s390: Send signals for divide

Signed-off-by: Richard Henderson <>

4e4bb438 01/05/2013 10:00 pm Richard Henderson

target-s390: Convert ADD LOGICAL CARRY and SUBTRACT LOGICAL BORROW

I'm resonably certain that the carry/borrow-out condition for both
helpers was incorrect, failing to take into account the carry-in.
Adding the new CC_OP codes also allows removing the awkward interface...

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

1ac5889f 01/05/2013 10:00 pm Richard Henderson

target-s390: Convert 64-bit MULTIPLY LOGICAL

Use a new "retxl" member of CPUS290XState to return the "eXtra Low" part
of a 128-bit value. That said, this will get used when two independent
values need returning (e.g. quotient+remainder) as well.

At the same time, shuffle the elements of CPUS390XState to get this new...

6ee77b16 01/05/2013 10:00 pm Richard Henderson

target-s390: Fix gdbstub

The real gdb protocol doesn't split out pc or cc as real registers.
Those are pseudos that are extracted as needed from the PSW. Don't
modify env->cc_op during read -- that way lies heisenbugs.

Fill in the XXX for the fp registers....

501a7ce7 12/23/2012 01:40 am Andreas Färber

Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu

Adapt header include paths.

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

1bc22652 12/19/2012 03:09 pm Andreas Färber

kvm: Pass CPUState to kvm_vcpu_ioctl()

Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.

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

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

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

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

f6c98f92 10/29/2012 08:41 pm Heinz Graalfs

s390: sclp base support

This adds a more generic infrastructure for handling Service-Call
requests on s390. Currently we only support a small subset of Read
SCP Info directly in target-s390x. This patch provides the base
infrastructure for supporting more commands and moves Read SCP...

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

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

e72ca652 09/10/2012 02:38 pm Blue Swirl

target-s390x: split FPU ops

Move floating point instructions to fpu_helper.c.

While exporting some condition code helpers,
avoid duplicate identifier conflict with translate.c.

Remove unused set_cc_nz_f64() in translate.c.

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

a78b0504 09/10/2012 02:38 pm Blue Swirl

target-s390x: split condition code helpers

Move condition code helpers to cc_helper.c.

Signed-off-by: Blue Swirl <>
Signed-off-by: Alexander Graf <>

aea1e885 09/10/2012 02:38 pm Blue Swirl

target-s390x: rename op_helper.c to misc_helper.c

Now op_helper.c contains miscellaneous helpers, rename
it to misc_helper.c.

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

449c0d70 09/10/2012 02:38 pm Blue Swirl

target-s390x: avoid AREG0 for FPU helpers

Make FPU helpers take a parameter for CPUState instead
of relying on global env.

Introduce temporary wrappers for FPU load and store ops.

Signed-off-by: Blue Swirl <>
Signed-off-by: Alexander Graf <>

000a1a38 08/15/2012 06:47 pm Christian Borntraeger

s390: provide interface for service interrupt/introduce interrupt.c

This patch creates interrupt.c. The first user is a callback for hw/*
code to trigger an service interrupt for a given sccb value. Several
interrupt types for s390 are floating (can be delivered to all CPUs)....

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

45fa769b 06/11/2012 01:23 am Andreas Färber

s390-virtio: Let s390_cpu_addr2state() return S390CPU

Convert ipi_states to S390CPU**.

Needed for s390_cpu_restart() in handle_sigp().

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

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

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

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

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

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

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

e7d81004 12/14/2011 01:09 pm Stefan Weil

Fix spelling in comments, documentation and messages

accidently->accidentally
annother->another
choosen->chosen
consideres->considers
decriptor->descriptor
developement->development
paramter->parameter
preceed->precede
preceeding->preceding
priviledge->privilege...

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

854e42f3 11/14/2011 06:47 pm Christian Borntraeger

s390: Fix cpu shutdown for KVM

On s390 a shutdown is the state of all CPUs being either stopped
or disabled (for interrupts) waiting. We have to track the overall
number of running CPUs to call the shutdown sequence accordingly.
This patch implements the counting and shutdown handling for the...

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

541dc0d4 09/03/2011 01:45 pm Stefan Weil

Use new macro QEMU_PACKED for packed structures

Most changes were made using these commands:

git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...

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

f081c76c 06/26/2011 09:25 pm Blue Swirl

Move cpu_has_work and cpu_pc_from_tb to cpu.h

Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This is
needed by later patches.

Signed-off-by: Blue Swirl <>

e205c790 06/20/2011 09:16 pm Jan Kiszka

Switch build system to accompanied kernel headers

This helps reducing our build-time checks for feature support in the
available Linux kernel headers. And it helps users that do not have
sufficiently recent headers installed on their build machine.

Consequently, the patch removes and build-time checks for kvm and vhost...

1f206266 05/20/2011 06:35 pm Alexander Graf

s390x: make kvm exported functions conditional on kvm

We have some helper functions we use to directly invoke KVM
functionality from device emulation code.

This patch replaces those exported functions with static inline
stubs when not building with KVM enabled....

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

s390x: keep hint on virtio managing size

The s390x virtio bus keeps management information on virtio after the top
of the guest's RAM. We need to be able to tell the guest the size of its
RAM (without virtio stuff), but also be able to trap when the guest accesses...

4e836781 05/20/2011 06:35 pm Alexander Graf

s390x: Shift variables in CPUState for memset(0)

The default reset handler does a memset(0) until right in between CPU_COMMON.
I incorrectly changed that behavior on the s390x port, so let's move the fields
in CPUState around to reflect the correct split up to which point memset(0)...

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

s390x: remove compatibility cc field

Remove the now unused cc field that was only required to not break
bisectability.

Signed-off-by: Alexander Graf <>

bcec36ea 04/18/2011 09:51 pm Alexander Graf

s390x: Prepare cpu.h for emulation

We need to add some more logic to the CPU description to leverage emulation
of an s390x CPU. This patch adds all the required helpers, fields in CPUState
and constant definitions required for user and system emulation.
...

64b85a8f 01/23/2011 06:21 pm Blue Swirl

Delete useless 'extern' qualifiers for functions

'extern' qualifier is useless for function declarations. Delete
them.

Signed-off-by: Blue Swirl <>

a88790a1 07/03/2010 09:48 am Paolo Bonzini

remove exec-all.h inclusion from cpu.h

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

10eb0cc0 07/03/2010 09:48 am Paolo Bonzini

move cpu_pc_from_tb to target-*/exec.h

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

52705890 03/12/2010 06:28 pm Richard Henderson

Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.

Removes a set of ifdefs from exec.c.

Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other
than Alpha. This will be used for page_find_alloc, which is
supposed to be using virtual addresses in the first place....

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