Skip to content

Commit

Permalink
xive: When disabling a VP, wipe all of its settings
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Nov 29, 2017
1 parent 639ed19 commit ddc35b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions doc/xive.rst
Expand Up @@ -699,6 +699,8 @@ This call configures a VP:
* report_cl_pair: This is the real address of the reporting cache line
pair for that VP or 0 to disable.

.. note:: When disabling a VP, all other VP settings are lost.


OPAL_XIVE_ALLOCATE_IRQ
^^^^^^^^^^^^^^^^^^^^^^
Expand Down
10 changes: 5 additions & 5 deletions hw/xive.c
Expand Up @@ -4142,13 +4142,13 @@ static int64_t opal_xive_set_vp_info(uint64_t vp_id,
return OPAL_PARAMETER;

vp_new = *vp;
if (flags & OPAL_XIVE_VP_ENABLED)
if (flags & OPAL_XIVE_VP_ENABLED) {
vp_new.w0 |= VP_W0_VALID;
else
vp_new.w0 &= ~VP_W0_VALID;
vp_new.w6 = report_cl_pair >> 32;
vp_new.w7 = report_cl_pair & 0xffffffff;
} else
vp_new.w0 = vp_new.w6 = vp_new.w7 = 0;

vp_new.w7 = report_cl_pair & 0xffffffff;
vp_new.w6 = report_cl_pair >> 32;

lock(&x->lock);
rc = xive_vpc_cache_update(x, blk, idx, 0, 8, &vp_new, false, false);
Expand Down

0 comments on commit ddc35b9

Please sign in to comment.