aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-12-22 14:16:55 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-05 15:41:02 +1100
commitacb4ce7ed80b2df2eb86390285cb5496614fa37f (patch)
tree3867d998970e9e2cbdba0b88c14d2a1433b7715b
parent21be2a908c5c9cb39b797f13b17616744438f733 (diff)
downloadskiboot-acb4ce7ed80b2df2eb86390285cb5496614fa37f.zip
skiboot-acb4ce7ed80b2df2eb86390285cb5496614fa37f.tar.gz
skiboot-acb4ce7ed80b2df2eb86390285cb5496614fa37f.tar.bz2
xive: Add chip_id to get_vp_info
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--doc/xive.rst5
-rw-r--r--hw/xive.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/xive.rst b/doc/xive.rst
index 032c338..e824f8e 100644
--- a/doc/xive.rst
+++ b/doc/xive.rst
@@ -621,7 +621,8 @@ OPAL_XIVE_GET_VP_INFO
int64_t opal_xive_get_vp_info(uint64_t vp,
uint64_t *flags,
uint64_t *cam_value,
- uint64_t *report_cl_pair);
+ uint64_t *report_cl_pair,
+ uint32_t *chip_id);
This call returns information about an allocated VP:
@@ -637,6 +638,8 @@ This call returns information about an allocated VP:
* report_cl_pair: This is the real address of the reporting cache line
pair for that VP (defaults to 0)
+* chip_id : The chip that VCPU was allocated on
+
OPAL_XIVE_SET_VP_INFO
^^^^^^^^^^^^^^^^^^^^^
.. code-block:: c
diff --git a/hw/xive.c b/hw/xive.c
index ccab081..7c34809 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -3398,7 +3398,8 @@ static int64_t opal_xive_donate_page(uint32_t chip_id, uint64_t addr)
static int64_t opal_xive_get_vp_info(uint64_t vp_id,
uint64_t *out_flags,
uint64_t *out_cam_value,
- uint64_t *out_report_cl_pair)
+ uint64_t *out_report_cl_pair,
+ uint32_t *out_chip_id)
{
struct xive *x;
struct xive_vp *vp;
@@ -3430,6 +3431,10 @@ static int64_t opal_xive_get_vp_info(uint64_t vp_id,
*out_report_cl_pair = ((uint64_t)(vp->w6 & 0x0fffffff)) << 32;
*out_report_cl_pair |= vp->w7 & 0xffffff00;
}
+
+ if (out_chip_id)
+ *out_chip_id = xive_block_to_chip[blk];
+
return OPAL_SUCCESS;
}
@@ -3938,7 +3943,7 @@ void init_xive(void)
opal_register(OPAL_XIVE_FREE_IRQ, opal_xive_free_irq, 1);
opal_register(OPAL_XIVE_ALLOCATE_VP_BLOCK, opal_xive_alloc_vp_block, 1);
opal_register(OPAL_XIVE_FREE_VP_BLOCK, opal_xive_free_vp_block, 1);
- opal_register(OPAL_XIVE_GET_VP_INFO, opal_xive_get_vp_info, 4);
+ opal_register(OPAL_XIVE_GET_VP_INFO, opal_xive_get_vp_info, 5);
opal_register(OPAL_XIVE_SET_VP_INFO, opal_xive_set_vp_info, 3);
}