History | View | Annotate | Download (22.2 kB)
exec: Make stq_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec: Make ldq/ldub_*_phys input an AddressSpace
cpu: Drop cpu_model_str from CPU_COMMON
Since this is only read in cpu_copy() and linux-user has a globalcpu_model, drop the field from generic code.
Signed-off-by: Andreas Färber <afaerber@suse.de>
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 helperscpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....
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 beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
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.
cpu: Replace do_interrupt() by CPUClass::do_interrupt method
This removes a global per-target function and thus takes us one stepcloser to compiling multiple targets into one executable.
It will also allow to override the interrupt handling for certain CPU...
target-s390x: Move TCG initialization to S390CPU initfn
Ensures that a QOM-created S390CPU is usable.
Acked-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>
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 <rth@twiddle.net>[AF: Invoke parent's realizefn]Signed-off-by: Andreas Färber <afaerber@suse.de>
s390: Keep I/O interrupts enabled for all iscs.
do_io_interrupt() would stop scanning further iscs if it foundan I/O interrupt it could inject. This might cause the pendinginterrupt indication for I/O interrupts to be reset although theremight be queued I/O interrupts for subsequent iscs....
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 itcontained the bitmask as well, which went unnoticed so far as...
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’:...
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....
target-s390x: Fix debug output (continued)
Since its introduction in d5a439645a5a70fed5431318c3bce9dc2caa950f(s390x: helper functions for system emulation) the variable name wasraddr. Fix this.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x: Fix debug output
Commit 71e470886fb6092504503a5fe41092ace71c096c (target-s390x: fixstyle) renamed the cpu_s390x_handle_mmu_fault() argument from _vaddr toorig_vaddr. Update the debug output code.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
target-s390x: Clean up cpu_inject_*() signatures
Despite cautioning that S390CPU is needed for upcoming CPUStaterefactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390:I/O interrupt and machine check injection.) added functionscpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument,...
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 <afaerber@suse.de>Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>...
s390: Lowcore mapping helper.
Create a lowcore mapping helper that includes a check for sufficientlength.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
s390: Add mapping helper functions.
Add s390_cpu_physical_memory_{map,unmap} with special handlingfor the lowcore.
s390: I/O interrupt and machine check injection.
I/O interrupts are queued per isc. Only crw pending machine checksare supported.
target-s390: Reorg exception handling
Make the user path more like the system path. Prepare for more kindsof runtime exceptions. Rename ILC to ILEN to make it clear that wewant to pass around a full instruction length, rather than a "code" that happens to be stored one bit left in a larger field....
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 <rth@twiddle.net>
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
exec: move include files to include/exec/
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
target-s390x: Use CPU_LOG_INT
Three places in the interrupt code did we not honor the mask.
Reviewed-by: Alexander Graf <agraf@suse.de>Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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 <blauwirbel@gmail.com>[agraf: fix conflicts]Signed-off-by: Alexander Graf <agraf@suse.de>
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 withstandard func.
Don't init static variable (cpu_s390x_init:inited) with 0.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>...
target-s390x: Let cpu_s390x_init() return S390CPU
Let cpu_init() return CPUS390XState for backwards compatibility.
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...
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 <afaerber@suse.de>Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
target-s390x: QOM'ify CPU init
Move code from cpu_s390x_init() into an initfn.
target-s390x: QOM'ify CPU reset
Move code from cpu_state_reset() to s390_cpu_reset().
target-s390x: QOM'ify CPU
Embed CPUS390XState as first member of S390CPU.Since -cpu is being ignored, make TYPE_S390_CPU non-abstract.
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 <afaerber@suse.de>Acked-by: Anthony Liguori <aliguori@us.ibm.com>
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 staticfunctions with strongly typed argument to indirect.
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 <sw@weilnetz.de>
s390x: update R and C bits in storage key
When the s390x maps a page or writes happen to a page, the R and Cbits get updated. The easiest way to implement this in qemu is tosimply update them whenever we map a TLB translation and act accordingto the permissions....
s390x: Add shutdown for TCG s390-virtio machine
Now that we have code in place to do refcounting of online CPUs, wecan 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 <agraf@suse.de>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 themand adjust callers.
Acked-by: Richard Henderson <rth@twiddle.net>...
Avoid allocating TCG resources in non-TCG mode
Do not allocate TCG-only resources like the translation buffer whenrunning over KVM or XEN. Saves a "few" bytes in the qemu address spaceand is also conceptually cleaner.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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 bothwhich also fixes the build problem for non-linux hosts.
Cc: Alexander Graf <agraf@suse.de>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
s390x: helper functions for system emulation
When running system emulation, we need to transverse through the MMU anddeliver interrupts according to the specification.
This patch implements those two pieces and in addition adjusts the CPUinitialization code to account for the new fields in CPUState....
s390x: Enable s390x-softmmu target
This patch adds some code paths for running s390x guest OSs without theneed for KVM.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
S390: Add stub for cpu_get_phys_page_debug
We don't implement any virtual memory in the S390 target so far, so let'sadd a stub for this now mandatory function.
Fixes building of S390 target.
Large page TLB flush
QEMU uses a fixed page size for the CPU TLB. If the guest uses largepages then we effectively split these into multiple smaller pages, andpopulate the corresponding TLB entries on demand.
When the guest invalidates the TLB by virtual address we must invalidate...
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 <paul@codesourcery.com>
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
Add support for S390x system emulation
Let's enable the basics for system emulation so we can run virtual machineswith KVM!
S/390 CPU fake emulation
Because Qemu currently requires a TCG target to exist and there are quite someuseful helpers here to lay the groundwork for out KVM target, let's create astub TCG emulation target for S390X CPUs.
This is required to make tcg happy. The emulation target itself won't work...