History | View | Annotate | Download (37.2 kB)
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 <michael@walle.cc> (for lm32)Signed-off-by: Andreas Färber <afaerber@suse.de>
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 CPUrelated -- they are specific to the TLS ABI for a a particular OS.Move them into the linux-user/ tree where they belong....
virtio-ccw: fix build breakage on windows
event_notifier_get_fd() is not available on windows hosts. Fix this bymoving the calls to event_notifier_get_fd() to the kvm code.
Reported-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>...
virtio-ccw: Wire up ioeventfd.
On hosts that support ioeventfd, make use of it for host-to-guestnotifications via diagnose 500.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Revert "s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62"
This reverts commit 311f83ca08c011b048c063c2fd3038a8957970bc.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62
With the next patch, the memory API will complain if theTARGET_PHYS_ADDR_SPACE_BITS gets dangerously close to anoverflow. s390x can handle up to 64 bit of physical addressspace from its page tables, but we never use that much. Just...
Allow selective runtime register synchronization
We want to avoid expensive register synchronization IOCTL's on the hot path soa new kvm_s390_get_registers_partial() is introduced as a compliment tokvm_arch_get_registers(). The new function is called on the hot path, and...
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().
Signed-off-by: Andreas Färber <afaerber@suse.de>
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...
s390/css: Fix subchannel detection
We have to consider the m bit to find the real channel subsystem whendetermining the last subchannel.
If we fail to take this into account, removal of a subchannel inthe middle of a big list of devices will stop device detection after...
target-s390x: Drop unused cpu_s390x_close() prototype
It was never implemented.
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...
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: Use s390_cpu_physical_memory_map for tpi.
Map the I/O interruption code before calling into css.
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: Channel I/O basic definitions.
Basic channel I/O structures and helper function.
s390: I/O interrupt and machine check injection.
I/O interrupts are queued per isc. Only crw pending machine checksare supported.
s390: Add channel I/O instructions.
Provide handlers for (most) channel I/O instructions.
s390: Virtual channel subsystem support.
Provide a mechanism for qemu to provide fully virtual subchannels tothe guest.
s390: Wire up channel I/O in kvm.
Trigger the code for our virtual css in case of instructionintercepts for I/O instructions.
Handle the tsch exit for the subchannel-related part of tsch.
s390: new contributions GPLv2 or later
IBMs s390 contributions were meant to to be gplv2 or later (sincewe were contributing to qemu). Several of the s390 specific fileslink to gpl code anyway, so lets clarify the licence statement fornew contributions for those files that we have touched multiple...
S390: Enable -cpu help and QMP query-cpu-definitions
This enables qemu -cpu help to return a list of supported CPU modelson s390 and also to query for cpu definitions in the monitor.Initially only cpu model = host is returned. This needs to be reworked...
s390x: Remove inline function ebcdic_put and related data from cpu.h
The function is only used in misc_helper.c, so move it to that file.
This reduces the size of debug executables (compiled without optimization)because they get unused code and data for each compilation which includes...
s390: Add a hypercall registration interface.
Allow virtio machines to register for different diag500 functioncodes and convert s390-virtio to use it.
target-s390: Fix cpu_clone_regs
R2 is the syscall return register, not R0.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-s390: Convert FLOGR
target-s390: Convert FP ADD, COMPARE, LOAD TEST/ROUND/LENGTHENED
target-s390: Convert SHIFT, ROTATE SINGLE
Note that we were missing the 32-bit SLA.
target-s390: Send signals for divide
target-s390: Convert ADD LOGICAL CARRY and SUBTRACT LOGICAL BORROW
I'm resonably certain that the carry/borrow-out condition for bothhelpers was incorrect, failing to take into account the carry-in.Adding the new CC_OP codes also allows removing the awkward interface...
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: Convert 64-bit MULTIPLY LOGICAL
Use a new "retxl" member of CPUS290XState to return the "eXtra Low" partof a 128-bit value. That said, this will get used when two independentvalues need returning (e.g. quotient+remainder) as well.
At the same time, shuffle the elements of CPUS390XState to get this new...
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'tmodify env->cc_op during read -- that way lies heisenbugs.
Fill in the XXX for the fp registers....
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.
kvm: Pass CPUState to kvm_vcpu_ioctl()
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.
fpu: move public header file to include/fpu
exec: move include files to include/exec/
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 <afaerber@suse.de>[AF: Updated new target-openrisc function accordingly]...
s390: sclp base support
This adds a more generic infrastructure for handling Service-Callrequests on s390. Currently we only support a small subset of ReadSCP Info directly in target-s390x. This patch provides the baseinfrastructure for supporting more commands and moves Read SCP...
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: 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: 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 <blauwirbel@gmail.com>...
target-s390x: split condition code helpers
Move condition code helpers to cc_helper.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x: rename op_helper.c to misc_helper.c
Now op_helper.c contains miscellaneous helpers, renameit to misc_helper.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>[agraf: fix conflict]Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x: avoid AREG0 for FPU helpers
Make FPU helpers take a parameter for CPUState insteadof relying on global env.
Introduce temporary wrappers for FPU load and store ops.
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. Severalinterrupt types for s390 are floating (can be delivered to all CPUs)....
target-s390x: Let cpu_s390x_init() return S390CPU
Let cpu_init() return CPUS390XState for backwards compatibility.
s390-virtio: Let s390_cpu_addr2state() return S390CPU
Convert ipi_states to S390CPU**.
Needed for s390_cpu_restart() in handle_sigp().
target-s390x: QOM'ify CPU init
Move code from cpu_s390x_init() into an initfn.
Signed-off-by: Andreas Färber <afaerber@suse.de>Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
target-s390x: QOM'ify CPU
Embed CPUS390XState as first member of S390CPU.Since -cpu is being ignored, make TYPE_S390_CPU non-abstract.
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...
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>
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>
Fix spelling in comments, documentation and messages
accidently->accidentallyannother->anotherchoosen->chosenconsideres->considersdecriptor->descriptordevelopement->developmentparamter->parameterpreceed->precedepreceeding->precedingpriviledge->privilege...
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....
s390: Fix cpu shutdown for KVM
On s390 a shutdown is the state of all CPUs being either stoppedor disabled (for interrupts) waiting. We have to track the overallnumber of running CPUs to call the shutdown sequence accordingly.This patch implements the counting and shutdown handling for the...
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 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/'...
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>...
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 isneeded by later patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Switch build system to accompanied kernel headers
This helps reducing our build-time checks for feature support in theavailable Linux kernel headers. And it helps users that do not havesufficiently recent headers installed on their build machine.
Consequently, the patch removes and build-time checks for kvm and vhost...
s390x: make kvm exported functions conditional on kvm
We have some helper functions we use to directly invoke KVMfunctionality from device emulation code.
This patch replaces those exported functions with static inlinestubs when not building with KVM enabled....
s390x: keep hint on virtio managing size
The s390x virtio bus keeps management information on virtio after the topof the guest's RAM. We need to be able to tell the guest the size of itsRAM (without virtio stuff), but also be able to trap when the guest accesses...
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 fieldsin CPUState around to reflect the correct split up to which point memset(0)...
s390x: remove compatibility cc field
Remove the now unused cc field that was only required to not breakbisectability.
s390x: Prepare cpu.h for emulation
We need to add some more logic to the CPU description to leverage emulationof an s390x CPU. This patch adds all the required helpers, fields in CPUStateand constant definitions required for user and system emulation....
Delete useless 'extern' qualifiers for functions
'extern' qualifier is useless for function declarations. Deletethem.
remove exec-all.h inclusion from cpu.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
move cpu_pc_from_tb to target-*/exec.h
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 otherthan Alpha. This will be used for page_find_alloc, which issupposed to be using virtual addresses in the first place....
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!
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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...