diff options
author | Curtis Dunham <Curtis.Dunham@arm.com> | 2017-04-26 15:21:34 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-07-07 10:32:28 +0000 |
commit | 81db5ccf3c41e28966ce547e3fd783634581a077 (patch) | |
tree | e24f9301470b39d959472d6b66b360ce81361a87 /src/arch/arm/kvm | |
parent | feb91ce576f2da6e1941697100d14bc10ace6a90 (diff) | |
download | gem5-81db5ccf3c41e28966ce547e3fd783634581a077.tar.xz |
kvm, arm: don't create interrupt events while saving GIC state
If an interrupt was pending according to Kvm state during a drain,
the Pl390 model would create an interrupt event that could not be
serviced, preventing the system from draining. The proper behavior
is for the Pl390 not actively being used for simulation to just skip
the GIC state machine that delivers interrupts.
Change-Id: Icb37e7e992f1fb441a9b3a26daa1bb5a6fe19228
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3661
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/kvm')
-rw-r--r-- | src/arch/arm/kvm/gic.cc | 11 | ||||
-rw-r--r-- | src/arch/arm/kvm/gic.hh | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/arch/arm/kvm/gic.cc b/src/arch/arm/kvm/gic.cc index ce3baa558..d490265b8 100644 --- a/src/arch/arm/kvm/gic.cc +++ b/src/arch/arm/kvm/gic.cc @@ -292,6 +292,17 @@ MuxingKvmGic::clearPPInt(uint32_t num, uint32_t cpu) } void +MuxingKvmGic::updateIntState(int hint) +{ + // During Kvm->Pl390 state transfer, writes to the Pl390 will call + // updateIntState() which can post an interrupt. Since we're only + // using the Pl390 model for holding state in this circumstance, we + // short-circuit this behavior, as the Pl390 is not actually active. + if (!usingKvm) + return Pl390::updateIntState(hint); +} + +void MuxingKvmGic::copyDistRegister(BaseGicRegisters* from, BaseGicRegisters* to, ContextID ctx, Addr daddr) { diff --git a/src/arch/arm/kvm/gic.hh b/src/arch/arm/kvm/gic.hh index ee04088d3..5447e6a92 100644 --- a/src/arch/arm/kvm/gic.hh +++ b/src/arch/arm/kvm/gic.hh @@ -194,6 +194,9 @@ class MuxingKvmGic : public Pl390 void sendPPInt(uint32_t num, uint32_t cpu) override; void clearPPInt(uint32_t num, uint32_t cpu) override; + protected: // Pl390 + void updateIntState(int hint) override; + protected: /** System this interrupt controller belongs to */ System &system; |