xen/arm: p2m: Don't need to restore the state for an idle vCPU.

The function p2m_restore_state could be called with an idle vCPU in
arguments (when called by construct_dom0). However, we will never return
to EL0/EL1 in this case, so it is not necessary to restore the p2m
registers.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Julien Grall authored and Stefano Stabellini committed 2016-07-28 17:42:21 -07:00
1 parent 46ac564279
commit cfd7f424eb
1 file changed
+3
+3
View File
@@ -127,6 +127,9 @@ void p2m_restore_state(struct vcpu *n)
{
register_t hcr;
if ( is_idle_vcpu(n) )
return;
hcr = READ_SYSREG(HCR_EL2);
WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
isb();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.