VHE: update_vi should should not do anything for EL0 partitions
update_vi changes hcr_el2 based on whether there are interrupts pending
or not. This change skips updating hcr_el2 for EL0 partitions since it
has no effect.
Change-Id: I7dfdd1c9676af9477a67fd53f001578d028492ff
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index c5bdacd..0e6acd9 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -607,11 +607,14 @@
struct vcpu_locked vcpu_locked;
if (next == NULL) {
+ if (current()->vm->el0_partition) {
+ return;
+ }
+
/*
* Not switching vCPUs, set the bit for the current vCPU
* directly in the register.
*/
-
vcpu_locked = vcpu_lock(current());
set_virtual_irq_current(
vcpu_interrupt_irq_count_get(vcpu_locked) > 0);
@@ -619,6 +622,9 @@
vcpu_interrupt_fiq_count_get(vcpu_locked) > 0);
vcpu_unlock(&vcpu_locked);
} else if (vm_id_is_current_world(next->vm->id)) {
+ if (next->vm->el0_partition) {
+ return;
+ }
/*
* About to switch vCPUs, set the bit for the vCPU to which we
* are switching in the saved copy of the register.