Put peripheral registers in a separate sub-struct to lazy registers.
They are not handled by the same code in exceptions.S as the other
system registers, so separating them makes this clearer.
Change-Id: I09000c6eaaebde6356b9c161db82e8c1bb5764d8
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 9402fe5..9957a28 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -76,8 +76,8 @@
*/
void complete_saving_state(struct vcpu *vcpu)
{
- vcpu->regs.lazy.cntv_cval_el0 = read_msr(cntv_cval_el0);
- vcpu->regs.lazy.cntv_ctl_el0 = read_msr(cntv_ctl_el0);
+ vcpu->regs.peripherals.cntv_cval_el0 = read_msr(cntv_cval_el0);
+ vcpu->regs.peripherals.cntv_ctl_el0 = read_msr(cntv_ctl_el0);
api_regs_state_saved(vcpu);
@@ -111,8 +111,8 @@
* is configured as edge-triggered, as it would then be latched in.
*/
write_msr(cntv_ctl_el0, 0);
- write_msr(cntv_cval_el0, vcpu->regs.lazy.cntv_cval_el0);
- write_msr(cntv_ctl_el0, vcpu->regs.lazy.cntv_ctl_el0);
+ write_msr(cntv_cval_el0, vcpu->regs.peripherals.cntv_cval_el0);
+ write_msr(cntv_ctl_el0, vcpu->regs.peripherals.cntv_ctl_el0);
/*
* If we are switching (back) to the primary, disable the EL2 physical