]> xenbits.xensource.com Git - xen.git/commit
xen/arm: Don't save/restore context for idle VCPU
authorJulien Grall <julien.grall@linaro.org>
Mon, 7 Jul 2014 15:29:15 +0000 (16:29 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Jul 2014 10:20:08 +0000 (11:20 +0100)
commit02004df07a497ea5a45f17ac72b22f307d79a669
tree9531787e414ae17f297795ca6d8891b8187d6ca1
parent6de560fadabb8a19887aa4320857088dba9a2b95
xen/arm: Don't save/restore context for idle VCPU

When an idle VCPU is running, Xen will never exit the hypervisor mode.
Futhermore, some part of the VCPU/domain initialization is already skipped for
them to avoid memory consumption.

Actually each save/restore functions are checking themself if the vcpu is
an idle one or not. We can safely skipped the context switch in one place
and gain a bit of time when we {,un}schedule idle VCPU. This is because
the saving part will take care of disabling anything related to guest (such
as GICv).

Also replace every check of and idle VCPU in save/restore functions by an
ASSERT, to know if someone is calling them with an idle VCPU in argument.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain.c
xen/arch/arm/gic.c
xen/arch/arm/vtimer.c