Statistics
| Branch: | Revision:

root / target-s390x @ feature-archipelago

# Date Author Comment
e00ef747 03/04/2014 07:01 pm Peter Maydell

Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging

  • remotes/qmp-unstable/queue/qmp: (32 commits)
    qapi: Add missing null check to opts_start_struct()
    qapi: Clean up superfluous null check in qapi_dealloc_type_str()
    qapi: Clean up null checking in generated visitors...
4ab23a91 02/28/2014 06:52 pm qiaonuohan

Define the architecture for compressed dump format

Signed-off-by: Ekaterina Tumanova <>
Reviewed-by: Laszlo Ersek <>
Reviewed-by: Qiao Nuohan <>
Signed-off-by: Luiz Capitulino <>

49f5c9e9 02/27/2014 10:51 am Thomas Huth

s390x/cpu: Use ioctl to reset state in the kernel

Some of the state in the kernel can not be reset from QEMU yet.
For this we've got to use the KVM_S390_INITIAL_RESET ioctl to make
sure that the state in the kernel is set to the right values during
initial CPU reset, too....

f7d3e466 02/27/2014 10:51 am Thomas Huth

s390x/kvm: Rework SIGP INITIAL CPU RESET handler

The s390_cpu_initial_reset() function had two deficiencies: First, it
used an ioctl for the destination CPU, and this ioctl could block
nearly forever, as long as the destination CPU was running in the SIE...

04c2b516 02/27/2014 10:51 am Thomas Huth

s390x/kvm: Add missing SIGP CPU RESET order

The SIGP order CPU RESET was still missing in the list of our
supported handler. This patch now adds a simple implementation,
by using the cpu_reset() function that is already available in
target-s390x/cpu.c.

Signed-off-by: Thomas Huth <>...

1eecf41b 02/27/2014 10:51 am Frank Blaschka

s390x/kvm: Rework priv instruction handlers

The current implementation uses the second byte of the instruction
to identify the instruction handler. This is not sufficient to
support instructions not starting with 0xb2. This patch
adds separate handlers for 0xb2, 0xb9 and 0xeb to be able to...

819bd309 02/27/2014 10:51 am Dominik Dingel

s390x/async_pf: Check for apf extension and enable pfault

S390 can also use async page faults, to enhance guest scheduling.
In case of live migration we want to disable the feature and let
all pending request finish.

Signed-off-by: Dominik Dingel <>...

0788082a 02/27/2014 10:51 am Thomas Huth

s390x/kvm: Fixed bad SIGP SET-ARCHITECTURE handler

The SET-ARCHITECTURE handler in QEMU caused a program interruption.
This is wrong according to the "Principles of Operations" specification
(since SIGP should never cause a program interrupt) and was likely only...

77319f22 02/27/2014 10:51 am Thomas Huth

s390x/virtio-hcall: Specification exception for illegal subcodes

So far, the DIAG 500 hypervisor call was only setting -EINVAL in
R2 when a guest tried to call this function with an illegal subcode.
This patch now changes the behavior so that a specification exception...

a0fa2cb8 02/27/2014 10:51 am Thomas Huth

s390x/sclp: Fixed the size of sccb and code parameter

The pointer to the SCCB should not be limited to 32 bits only.
In contrast to this, the command word parameter is only 32 bits
(the upper 32 bits should be ignored).

Signed-off-by: Thomas Huth <>...

6e252802 02/27/2014 10:51 am Thomas Huth

s390x/sclp: Add missing checks to SCLP handler

If the 51 most significant bits of the SCCB address are zero or equal to
the prefix, we should throw an specification exception, too.
Also moved the check for privileged mode to sclp_service_call() to have
all program checks in one place now....

e8803d93 02/27/2014 10:51 am Thomas Huth

s390x/sclp: Fixed setting of condition code register

In the SCLP handler function, the condition code register must
only be set if no exception occured.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>...

db3be60d 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make stb_phys input an AddressSpace

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

5ce5944d 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make stw_*_phys input an AddressSpace

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

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

fdfba1a2 02/11/2014 02:56 pm Edgar E. Iglesias

exec: Make ldl_*_phys input an AddressSpace

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

44c68de0 01/31/2014 10:43 am Dominik Dingel

s390x/kvm: cleanup partial register handling

The partial register handling (introduced with commits
420840e58b85f7f4e5493dca3f273566f261090a and
3474b679486caa8f6448bae974e131370f360c13 ) aimed to improve intercept
handling performance.

It made the code more complicated though. During development for life...

10c8599a 12/18/2013 03:24 pm Thomas Huth

s390x/ioinst: CHSC has to set a condition code

I missed to set the CC in the CHSC instruction when I refactored
the CC setting in the IO instructions with the following commit:
5d9bf1c07c1369ab3506fc82cc65a10f4415d867
s390/ioinst: Moved the CC setting to the IO instruction handlers...

638129ff 12/18/2013 03:24 pm Cornelia Huck

s390x/kvm: Fix diagnose handling.

The instruction intercept handler for diagnose used only the displacement
when trying to calculate the function code. This is only correct for base
0, however; we need to perform a complete base/displacement address
calculation and use bits 48-63 as the function code....

4f91e0b5 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Removed duplicated SIGP defines

The SIGP order defines are also available in cpu.h,
so there is no need to re-define them in kvm.c.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>
Signed-off-by: Jens Freimann <>...

cd7a0f4c 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Removed s390_store_status stub

The SIGP order STORE STATUS AT ADDRESS will be handled in
kernel space, so we do not need the stub in QEMU anymore.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>...

0b9972a2 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Fix coding style in handle_sigp()

To make scripts/checkpatch.pl happy for the following patches,
the coding style in handle_sigp() has to be fixed first.

Signed-off-by: Thomas Huth <>
Acked-by: Cornelia Huck <>...

b20a461f 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Implemented SIGP START

This patch adds the missing START order to the SIGP instruction handler.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>
Signed-off-by: Jens Freimann <>...

b8031adb 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Simplified the calculation of the SIGP order code

We've already got a helper function for calculating the
base/displacement of RS formatted instructions, so we can
get rid of the manual calculation of the SIGP order code.

Signed-off-by: Thomas Huth <>...

3796f0e1 12/18/2013 03:24 pm Thomas Huth

s390x/kvm: Fixed condition code for unknown SIGP orders

If SIGP is called with an unknown order code, it has to return CC1
instead of CC3 and set the "invalid order" bit in the return status.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>...

575ddeb4 10/14/2013 06:50 pm Stefan Weil

exec: Fix prototype of phys_mem_set_alloc and related functions

phys_mem_alloc and its assigned values qemu_anon_ram_alloc and
legacy_s390_alloc must have identical argument lists.

legacy_s390_alloc uses the size parameter to call mmap, so size_t is
good enough for all of them....

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

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

40fa5264 09/20/2013 02:55 pm Heinz Graalfs

s390/ebcdic: Move conversion tables to header file

Move conversion tables to header file.
- In SCLP line mode processing EBCDIC/ASCII conversion is needed.
- An additional EBCDIC to ASCII conversion function is added.

Signed-off-by: Heinz Graalfs <>...

d8b30c83 09/20/2013 02:55 pm Christian Borntraeger

s390/kexec: Implement diag308 subcode 0

This patch implements subcode 0 of diag 308. This is necessary for kexec
(without kdump). The main difference to subcode 1 is that all CPUs get
a full reset, instead of the architectured CPU reset (which leaves all...

abd137a1 09/20/2013 01:46 pm Christian Borntraeger

s390/dump: zero out padding bytes in notes sections

The prstatus of an s390x dump contains several padding areas. Zero out
these bytes to make reading the notes section easier with a hexdump.

Signed-off-by: Christian Borntraeger <>

3d0a615f 09/20/2013 01:46 pm Thomas Huth

s390/cpu: Make setcc() function available to other files

Moved the setcc() function to cpu.h so that it can be used by other
files, too. It now also does not modify the kvm state anymore since
this gets updated during kvm_arch_put_registers() anyway.

Signed-off-by: Thomas Huth <>...

5d9bf1c0 09/20/2013 01:46 pm Thomas Huth

s390/ioinst: Moved the CC setting to the IO instruction handlers

The IO instruction handlers now take care of setting the CC value on
their own, so that the confusing return code magic in kvm_handle_css_inst()
is not needed anymore.

Signed-off-by: Thomas Huth <>...

3ac85fb6 09/20/2013 01:46 pm Thomas Huth

s390/kvm: Add check for priviledged SCLP handler

The SCLP instruction is priviledged, so we should make sure that
we generate an exception when it is called from the problem state.

Signed-off-by: Thomas Huth <>
Signed-off-by: Christian Borntraeger <>

39228250 09/12/2013 07:45 pm Markus Armbruster

exec: Don't abort when we can't allocate guest memory

We abort() on memory allocation failure. abort() is appropriate for
programming errors. Maybe most memory allocation failures are
programming errors, maybe not. But guest memory allocation failure
isn't, and aborting when the user asks for more memory than we can...

91138037 09/12/2013 07:45 pm Markus Armbruster

exec: Simplify the guest physical memory allocation hook

Make it a generic hook rather than a KVM hook. Less code and
ifdeffery.

Since the only user of the hook is old S390 KVM, there's hope we can
get rid of it some day.

Acked-by: Christian Borntraeger <>...

bdc44640 09/03/2013 01:25 pm Andreas Färber

cpu: Use QTAILQ for CPU list

Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
macros.

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

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

f0778475 08/30/2013 03:16 pm Christian Borntraeger

s390: Implement load normal reset

kdump on s390 uses a load normal reset to bring the system in a defined
state by doing a subsystem reset. The issuing CPUs will have an initial
CPU reset, all other CPUs will have a CPU reset as defined in POP (no
register content will change)....

7f7f9752 08/30/2013 03:16 pm Eugene (jno) Dvurechenski

s390: wire up nmi command to raise a RESTART interrupt on S390

There is the 'nmi' command that is used to trigger a guest dump via kdump feature on x86.
s390 uses RESTART interrupt to trigger kdump.
So, this patch provides a mean to use 'nmi' command on s390 to raise RESTART interrupt....

f5ae2a4f 08/30/2013 03:16 pm Christian Borntraeger

s390/cpu: split CPU reset into architectured functions

s390 provides several CPU resets:
- CPU reset, clears interrupts, stop processing, clears TLB, but does
not touch registers
- initial CPU reset, like CPU reset, but also clears PSW, prefix, FPC,
timer and control registers. It does not touch gprs, fprs and acrs (!)...

4e872a3f 08/30/2013 01:49 pm Christian Borntraeger

s390: provide I/O subsystem reset

Provide a function that resets the I/O subsystem.

Signed-off-by: Christian Borntraeger <>
Acked-by: Alexander Graf <>

29c6157c 08/30/2013 01:49 pm Christian Borntraeger

s390: provide a cpu load normal function

Some code needs to perform an IPL-like bootup that mimics the
ESA (31bit) restart. Provide a cpu class method that does so.

Signed-off-by: Christian Borntraeger <>
Acked-by: Alexander Graf <>

268846ba 08/30/2013 01:48 pm Eugene (jno) Dvurechenski

s390/kvm: basic implementation of diagnose 308 subcode 6

Linux uses a check for subcode 6 to decide if other subcodes are
available. Provide a minimal implementation for subcode 6, as well
as for subcode 5.

Signed-off-by: Eugene (jno) Dvurechenski <>...

39fbc5c6 08/30/2013 12:09 pm Christian Borntraeger

s390x/kvm: Fix switch/case indentation for handle_diag

This alignes case statements to switch statements in the handle_diag
function as mandated by coding style.

Signed-off-by: Christian Borntraeger <>

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

56c4bfb3 08/08/2013 06:01 pm Laszlo Ersek

dump: rebase from host-private RAMBlock offsets to guest-physical addresses

RAMBlock.offset --> GuestPhysBlock.target_start
RAMBlock.offset + RAMBlock.length --> GuestPhysBlock.target_end
RAMBlock.length --> GuestPhysBlock.target_end -...

d2ee7746 07/30/2013 05:12 pm Thomas Huth

s390x/kvm: Remove redundant return code

Removed the redundant return code statement from handle_instruction() - it
always returned 0 and never reports any errors to its caller, since errors
from the sub-functions are already reported via program exceptions instead....

9b4f38e1 07/30/2013 05:12 pm Ekaterina Tumanova

s390: Implement dump-guest-memory support for target s390x

With this patch dump-guest-memory on s390 produces an ELF formatted,
crash-readable dump.
In order to implement this, the arch-specific part of dump-guest-memory
was added:
target-s390x/arch_dump.c contains the whole set of function for writing...

c1e8dfb5 07/30/2013 05:12 pm Thomas Huth

s390x/kvm: Reworked/fixed handling of cc3 in kvm_handle_css_inst()

Consolidated the setting of the condition code in kvm_handle_css_inst().
For the (unhandled) instructions EQBS and SQBS, we have to return
an operation exception instead of cc3. Also removed the is_ioinst()...

7ae5a7c0 07/30/2013 05:11 pm Thomas Huth

s390x/ioinst: Fixed alignment check in SCHM instruction

Register 2 only has to be aligned to a 32-byte boundary, not a
full page boundary.

Signed-off-by: Thomas Huth <>
Acked-by: Cornelia Huck <>
Signed-off-by: Christian Borntraeger <>

71ed827a 07/30/2013 05:11 pm Thomas Huth

s390x/ioinst: Fixed priority of operand exceptions

Operand exceptions have a lower priority than specification and address
exceptions. Thus the checks for operand exceptions must be done later.

Signed-off-by: Thomas Huth <>
Acked-by: Cornelia Huck <>...

61bf0dcb 07/30/2013 05:10 pm Thomas Huth

s390x/ioinst: Add missing alignment checks for IO instructions

The IO instructions MSCH, SSCH, STSCH, TSCH, STCRW and TPI require
that the second operand address must be aligned on a word boundary.

Signed-off-by: Thomas Huth <>
Reviewed-by: Cornelia Huck <>...

0056fc9e 07/30/2013 05:10 pm Thomas Huth

s390x/ioinst: Throw addressing exception when memory_map failed

So far, the IO instructions were throwing specification exceptions when
there was a problem with accessing the memory. However, the better way
is to throw an addressing exception instead.

Signed-off-by: Thomas Huth <>...

e67137c6 07/30/2013 03:33 am Peter Maydell

s390x: Rename 'dprintf' to 'DPRINTF'

'dprintf' is the name of a POSIX standard function so we should not be
stealing it for our debug macro. Rename to 'DPRINTF' (in line with
a number of other source files.)

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

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

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

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

target-s390x: 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....

9282b73a 07/27/2013 12:05 am Christian Borntraeger

target-s390x: Fix CPUState rework fallout

Commit f17ec444c3d39f76bcd8b71c2c05d5754bfe333e
exec: Change cpu_memory_rw_debug() argument to CPUState

missed to update s390x KVM code, breaking the build.

Let's fix it up.

Signed-off-by: Christian Borntraeger <>...

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

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

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

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

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

target-s390x: Change gen_intermediate_code_internal() argument to S390CPU

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

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

target-s390x: Don't overuse ENV_GET_CPU()

Commit 3474b679486caa8f6448bae974e131370f360c13 (Utilize selective
runtime reg sync for hot code paths) introduced two uses of
ENV_GET_CPU() inside target-s390x/ KVM code. In one case we can use a
direct CPU cast instead....

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

target-s390x: Change handle_{hypercall,diag}() argument to S390CPU

This allows to get rid of the last remaining ENV_GET_CPU() in
target-s390x/ by using CPU cast directly on the argument.

Cc: Jason J. Herne <>
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...

cc3ac9c4 07/01/2013 12:00 pm Cornelia Huck

virtio-ccw: fix build breakage on windows

event_notifier_get_fd() is not available on windows hosts. Fix this by
moving the calls to event_notifier_get_fd() to the kvm code.

Reported-by: Stefan Weil <>
Reviewed-by: Paolo Bonzini <>...

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

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

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
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 <>

b4436a0b 06/25/2013 06:11 pm Cornelia Huck

virtio-ccw: Wire up ioeventfd.

On hosts that support ioeventfd, make use of it for host-to-guest
notifications via diagnose 500.

Signed-off-by: Cornelia Huck <>

5b23fd03 06/20/2013 05:32 pm Paolo Bonzini

Revert "s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62"

This reverts commit 311f83ca08c011b048c063c2fd3038a8957970bc.

Signed-off-by: Paolo Bonzini <>

48475e14 06/12/2013 12:19 pm Alexey Kardashevskiy

KVM: S390: 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 <>...

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

311f83ca 05/24/2013 07:43 pm Paolo Bonzini

s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62

With the next patch, the memory API will complain if the
TARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to an
overflow. s390x can handle up to 64 bit of physical address
space from its page tables, but we never use that much. Just...

6eebf958 05/14/2013 04:53 pm Paolo Bonzini

osdep, kvm: rename low-level RAM allocation functions

This is preparatory to the introduction of a separate freeing API.

Reported-by: Amos Kong <>
Signed-off-by: Paolo Bonzini <>
Reviewed-by: Amos Kong <>...

805a2505 05/01/2013 07:55 pm Stefan Weil

Trivial grammar and spelling fixes

similiar -> similar
recieve -> receive
transfered -> transferred
preperation -> preparation

Most changes are in comments, one modifies a parameter name in a function
prototype.

The spelling fixes were made using codespell....

08eb8c85 04/30/2013 06:30 pm Christian Borntraeger

Wire up disabled wait a panicked event on s390

On s390 the disabled wait state indicates a state of attention.
For example Linux uses that state after a panic. Lets
put the system into panicked state.

An alternative implementation would be to state
disabled-wait <address> instead of pause in the action field....

3474b679 04/26/2013 09:18 pm Jason J. Herne

Utilize selective runtime reg sync for hot code paths

Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and
handle_hypercall() since they only need registers from the partial set and they
are called quite frequently.

Signed-off-by: Jason J. Herne <>...

420840e5 04/26/2013 09:18 pm Jason J. Herne

Allow selective runtime register synchronization

We want to avoid expensive register synchronization IOCTL's on the hot path so
a new kvm_s390_get_registers_partial() is introduced as a compliment to
kvm_arch_get_registers(). The new function is called on the hot path, and...

d49b8e0b 04/26/2013 12:58 pm Gabriel Kerneis

s390x: use CONFIG_INT128 to detect __uint128_t

Target s390x uses ad-hoc macro magic to guess if the compiler
supports the GCC extension __uint128_t. This patch uses the
the dedicated macro CONFIG_INT128 defined by configure instead.

This fixes compilation with the CIL source code analyzer, which...

e03ba136 04/12/2013 03:33 pm Peter Maydell

Typo, spelling and grammatical fixes

Minor fixes to documentation and code comments.

Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

5b90a866 04/05/2013 03:54 pm Richard Henderson

target-s390: Fix SRNMT

Fallthough into abort = oops.

Cc:
Cc: Alexander Graf <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Stefan Hajnoczi <>

085d8134 03/22/2013 02:25 pm Peter Maydell

Fix typos and misspellings

Fix various typos and misspellings. The bulk of these were found with
codespell.

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

225dc991 03/17/2013 10:01 pm Cornelia Huck

s390: Fix cpu refactoring fallout.

Commit 259186a7 "cpu: Move halted and interrupt_request fields to CPUState"
seems to have missed one instance in target-s390x/kvm.c:

/home/cohuck/git/qemu/target-s390x/kvm.c: In function ‘kvm_arch_process_async_events’:...

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

1c9d2a1d 03/08/2013 10:17 pm Christian Borntraeger

s390: simplify kvm cpu init

There is no special code right now and the reset ioctl is done later
on in the the reset handler anyway. Lets simplify the cpu init.

Signed-off-by: Christian Borntraeger <>
Signed-off-by: Alexander Graf <>

38dd7cc7 03/08/2013 10:17 pm Christian Borntraeger

s390/css: Fix subchannel detection

We have to consider the m bit to find the real channel subsystem when
determining the last subchannel.

If we fail to take this into account, removal of a subchannel in
the middle of a big list of devices will stop device detection after...

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

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

fadf9825 03/03/2013 04:28 pm Andreas Färber

cpu: Introduce ENV_OFFSET macros

Introduce ENV_OFFSET macros which can be used in non-target-specific
code that needs to generate TCG instructions which reference CPUState
fields given the cpu_env register that TCG targets set up with a
pointer to the CPUArchState struct....