case MISCREG_ICC_PMR_EL1: // Priority Mask Register
if ((currEL() == EL1) && !inSecureState() &&
(hcr_imo || hcr_fmo)) {
- return isa->readMiscRegNoEffect(MISCREG_ICV_PMR_EL1);
+ return readMiscReg(MISCREG_ICV_PMR_EL1);
}
if (haveEL(EL3) && !inSecureState() &&
break;
+ case MISCREG_ICV_PMR_EL1: { // Priority Mask Register
+ RegVal ich_vmcr_el2 =
+ isa->readMiscRegNoEffect(MISCREG_ICH_VMCR_EL2);
+
+ value = ich_vmcr_el2 >> ICH_VMCR_EL2_VPMR_SHIFT;
+ break;
+ }
+
case MISCREG_ICC_IAR0:
case MISCREG_ICC_IAR0_EL1: { // Interrupt Acknowledge Register 0
if ((currEL() == EL1) && !inSecureState() && hcr_fmo) {
case MISCREG_ICC_PMR_EL1: { // Priority Mask Register
if ((currEL() == EL1) && !inSecureState() &&
(hcr_imo || hcr_fmo)) {
- return isa->setMiscRegNoEffect(MISCREG_ICV_PMR_EL1, val);
+ return setMiscReg(MISCREG_ICV_PMR_EL1, val);
}
val &= 0xff;
break;
}
+ case MISCREG_ICV_PMR_EL1: { // Priority Mask Register
+ RegVal ich_vmcr_el2 =
+ isa->readMiscRegNoEffect(MISCREG_ICH_VMCR_EL2);
+ ich_vmcr_el2 = insertBits(
+ ich_vmcr_el2,
+ ICH_VMCR_EL2_VPMR_SHIFT + ICH_VMCR_EL2_VPMR_LENGTH - 1,
+ ICH_VMCR_EL2_VPMR_SHIFT, val);
+
+ isa->setMiscRegNoEffect(MISCREG_ICH_VMCR_EL2, ich_vmcr_el2);
+ virtualUpdate();
+ return;
+ }
+
case MISCREG_ICC_IGRPEN0:
case MISCREG_ICC_IGRPEN0_EL1: { // Interrupt Group 0 Enable Register
if ((currEL() == EL1) && !inSecureState() && hcr_fmo) {