]> git.proxmox.com Git - mirror_qemu.git/commit
spapr: Add ibm, client-architecture-support call
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 23 May 2014 02:26:54 +0000 (12:26 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:37 +0000 (13:24 +0200)
commit2a6593cb6a2d72c8c29e14f89413089fa5d38501
tree75adfca2dc85618d35328708224f9f7593d3ed69
parent1a68b71419406235bbde205463f2bd7e4ffe5b26
spapr: Add ibm, client-architecture-support call

The PAPR+ specification defines a ibm,client-architecture-support (CAS)
RTAS call which purpose is to provide a negotiation mechanism for
the guest and the hypervisor to work out the best compatibility parameters.
During the negotiation process, the guest provides an array of various
options and capabilities which it supports, the hypervisor adjusts
the device tree and (optionally) reboots the guest.

At the moment the Linux guest calls CAS method at early boot so SLOF
gets called. SLOF allocates a memory buffer for the device tree changes
and calls a custom KVMPPC_H_CAS hypercall. QEMU parses the options,
composes a diff for the device tree, copies it to the buffer provided
by SLOF and returns to SLOF. SLOF updates the device tree and returns
control to the guest kernel. Only then the Linux guest parses the device
tree so it is possible to avoid unnecessary reboot in most cases.

The device tree diff is a header with an update format version
(defined as 1 in this patch) followed by a device tree with the properties
which require update.

If QEMU detects that it has to reboot the guest, it silently does so
as the guest expects reboot to happen because this is usual pHyp firmware
behavior.

This defines custom KVMPPC_H_CAS hypercall. The current SLOF already
has support for it.

This implements stub which returns very basic tree (root node,
no properties) to the guest.

As the return buffer does not contain any change, no change in behavior is
expected.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h
trace-events