summaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_rtas.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-05target-ppc: spapr: e500: fix to use cpu_dt_idAlexey Kardashevskiy1-7/+7
This makes use of @cpu_dt_id and related API in: 1. emulated XICS hypercall handlers as they receive fixed CPU indexes; 2. XICS-KVM to enable in-kernel XICS on right CPU; 3. device-tree renderer. This removes @cpu_index fixup as @cpu_dt_id is used instead so QEMU monitor can accept command-line CPU indexes again. This changes kvm_arch_vcpu_id() to use ppc_get_vcpu_dt_id() as at the moment KVM CPU id and device tree ID are calculated using the same algorithm. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-12-20device_tree: s/qemu_devtree/qemu_fdt globallyPeter Crosthwaite1-8/+8
The qemu_devtree API is a wrapper around the fdt_ set of APIs. Rename accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [agraf: also convert hw/arm/virt.c] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-12-20spapr-rtas: add ibm, (get|set)-system-parameterAlexey Kardashevskiy1-0/+47
This adds very basic handlers for ibm,get-system-parameter and ibm,set-system-parameter RTAS calls. The only parameter handled at the moment is "platform-processor-diagnostics-run-mode" which is always disabled and does not support changing. This is expected to make "ppc64_cpu --run-mode=1" happy. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> [agraf: s/papameter/parameter/g] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-12-20spapr-rtas: replace return code constants with macrosAlexey Kardashevskiy1-17/+17
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02spapr: add "stop-self" RTAS call required to support hot CPU unplugAlexey Kardashevskiy1-0/+23
PAPR+ requires two RTAS calls to be supported by the hypervisor in order to allow hotplugging VCPUs from the guest. The "start-cpu" RTAS call was already there but "stop-self" was not. This adds the "stop-self" RTAS call. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-01spapr-rtas: add CPU argument to RTAS callsAnthony Liguori1-10/+11
RTAS is a hypervisor provided binary blob that a guest loads and calls into to execute certain functions. It's similar to the vsyscall page in Linux or the short lived VMCI paravirt interface from VMware. The QEMU implementation of the RTAS blob is simply a passthrough that proxies all RTAS calls to the hypervisor via an hypercall. While we pass a CPU argument for hypercall handling in QEMU, we don't pass it for RTAS calls. Since some RTAs calls require making hypercalls (normally RTAS is implemented as guest code) we have nasty hacks to allow that. Add a CPU argument to RTAS call handling so we can more easily invoke hypercalls just as guest code would. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-06-28kvm: Change kvm_cpu_synchronize_state() argument to CPUStateAndreas Färber1-1/+1
It no longer relies on CPUArchState since 20d695a. Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-13spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu()Andreas Färber1-11/+8
Instead of looping over all CPUArchState, use a helper to obtain the desired CPUState. Free the "cpu" variable for PowerPCCPU, to access its CPUPPCState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-12spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu()Andreas Färber1-7/+2
Instead of looping over all CPUArchState, use a helper to obtain the desired CPUState directly. Saves a CPUPPCState variable and QOM cast. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-15sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move headers to include/Paolo Bonzini1-2/+2
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-12cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber1-3/+3
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 <afaerber@suse.de>
2013-03-01ppc: move more files to hw/ppcPaolo Bonzini1-0/+334
These sPAPR files do not implement devices, move them over. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>