aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-02-25 11:09:51 +0100
committerStewart Smith <stewart@linux.ibm.com>2019-03-28 15:24:12 +1100
commitbbcbbd3e071ffe654596ce19ddf8d99b4176bbc3 (patch)
tree613067df22ff1fee86846187b04e224bef609fd0 /doc
parent84aa25921a09c7c6b703cf56a9396e2d55d49223 (diff)
downloadskiboot-bbcbbd3e071ffe654596ce19ddf8d99b4176bbc3.zip
skiboot-bbcbbd3e071ffe654596ce19ddf8d99b4176bbc3.tar.gz
skiboot-bbcbbd3e071ffe654596ce19ddf8d99b4176bbc3.tar.bz2
xive: Add calls to save/restore the queues and VPs HW state
To be able to support migration of guests using the XIVE native exploitation mode, (where the queue is effectively owned by the guest), KVM needs to be able to save and restore the HW-modified fields of the queue, such as the current queue producer pointer and generation bit, and to retrieve the modified thread context registers of the VP from the NVT structure : the VP interrupt pending bits. However, there is no need to set back the NVT structure on P9. P10 should be the same. Based on previous work from BenH. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/xive.rst51
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/xive.rst b/doc/xive.rst
index 0997c72..42a6090 100644
--- a/doc/xive.rst
+++ b/doc/xive.rst
@@ -790,3 +790,54 @@ state information about the XIVE.
- XIVE_DUMP_EMU: Dump the state of the XICS emulation for a thread
"id" is the PIR value of the thread
+
+OPAL_XIVE_GET_QUEUE_STATE
+^^^^^^^^^^^^^^^^^^^^^^^^^
+.. code-block:: c
+
+ int64_t opal_xive_get_queue_state(uint64_t vp, uint32_t prio,
+ uint32_t *out_qtoggle,
+ uint32_t *out_qindex);
+
+This call saves the queue toggle bit and index. This must be called on
+an enabled queue.
+
+* vp, prio: The target queue
+
+* out_qtoggle: toggle bit of the queue
+
+* out_qindex: index of the queue
+
+
+OPAL_XIVE_SET_QUEUE_STATE
+^^^^^^^^^^^^^^^^^^^^^^^^^
+.. code-block:: c
+
+ int64_t opal_xive_set_queue_state(uint64_t vp, uint32_t prio,
+ uint32_t qtoggle,
+ uint32_t qindex);
+
+This call restores the queue toggle bit and index that was previously
+saved by a call to opal_xive_get_queue_state(). This must be called on
+an enabled queue.
+
+* vp, prio: The target queue
+
+* qtoggle: toggle bit of the queue
+
+* qindex: index of the queue
+
+
+OPAL_XIVE_GET_VP_STATE
+^^^^^^^^^^^^^^^^^^^^^^
+.. code-block:: c
+
+ int64_t opal_xive_get_vp_state(uint64_t vp_id,
+ uint64_t *out_state);
+
+This call saves the VP HW state in "out_state". The format matches the
+XIVE NVT word 4 and word 5. This must be called on an enabled VP.
+
+* vp_id: The target VP
+
+* out_state: Location where the state is to be stored