Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/55609 )

Change subject: arch-arm: De-virtualize updateIntState
......................................................................

arch-arm: De-virtualize updateIntState

De-virtualize updateIntState and replace it with the new blockIntUpdate
in the MuxingKvmGic class.

The monolithic updateIntState is GicV2 specific and it is not compatible
with the more complex IRQ update logic in GicV3, which is delegating the
update to the destributor/redistributor/cpuinterface classes

Rather than stubbing the update function the MuxingKvmGic class, we
override the blockIntUpdate to return true in case a KVM gic is in use.
This is loosening the interface, not restricting any GIC implementation
to a specific update interface/design

Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Change-Id: Ib8d9c99b720c779a2255ac47ee2a655ff281581d
---
M src/arch/arm/kvm/gic.cc
M src/arch/arm/kvm/gic.hh
M src/dev/arm/gic_v2.hh
3 files changed, 30 insertions(+), 10 deletions(-)



diff --git a/src/arch/arm/kvm/gic.cc b/src/arch/arm/kvm/gic.cc
index b0c3d96..fc1ed98 100644
--- a/src/arch/arm/kvm/gic.cc
+++ b/src/arch/arm/kvm/gic.cc
@@ -273,18 +273,16 @@
     kernelGic->clearPPI(cpu, num);
 }

-void
-MuxingKvmGic::updateIntState(int hint)
+bool
+MuxingKvmGic::blockIntUpdate() const
 {
-    // During Kvm->GicV2 state transfer, writes to the GicV2 will call
+    // During Kvm->Gic state transfer, writes to the Gic will call
     // updateIntState() which can post an interrupt.  Since we're only
-    // using the GicV2 model for holding state in this circumstance, we
+    // using the Gic model for holding state in this circumstance, we
     // short-circuit this behavior, as the GicV2 is not actually active.
-    if (!usingKvm)
-        return GicV2::updateIntState(hint);
+    return usingKvm;
 }

-
 void
 MuxingKvmGic::fromGicV2ToKvm()
 {
diff --git a/src/arch/arm/kvm/gic.hh b/src/arch/arm/kvm/gic.hh
index 71ec3bc..f7ae715 100644
--- a/src/arch/arm/kvm/gic.hh
+++ b/src/arch/arm/kvm/gic.hh
@@ -189,8 +189,8 @@
     void sendPPInt(uint32_t num, uint32_t cpu) override;
     void clearPPInt(uint32_t num, uint32_t cpu) override;

-  protected: // GicV2
-    void updateIntState(int hint) override;
+  protected: // BaseGic
+    bool blockIntUpdate() const override;

   protected:
     /** System this interrupt controller belongs to */
diff --git a/src/dev/arm/gic_v2.hh b/src/dev/arm/gic_v2.hh
index 6fc5087..84694b6 100644
--- a/src/dev/arm/gic_v2.hh
+++ b/src/dev/arm/gic_v2.hh
@@ -448,7 +448,7 @@
     /** See if some processor interrupt flags need to be enabled/disabled
      * @param hint which set of interrupts needs to be checked
      */
-    virtual void updateIntState(int hint);
+    void updateIntState(int hint);

     /** Update the register that records priority of the highest priority
      *  active interrupt*/

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55609
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib8d9c99b720c779a2255ac47ee2a655ff281581d
Gerrit-Change-Number: 55609
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to