bool newInfoSet;
     int newIpl;
     int newSummary;
+    BaseCPU * cpu;
 
   protected:
     uint64_t interrupts[NumInterruptLevels];
         return dynamic_cast<const Params *>(_params);
     }
 
-    Interrupts(Params * p) : SimObject(p)
+    Interrupts(Params * p) : SimObject(p), cpu(NULL)
     {
         memset(interrupts, 0, sizeof(interrupts));
         intstatus = 0;
         newInfoSet = false;
     }
 
+    void
+    setCPU(BaseCPU * _cpu)
+    {
+        cpu = _cpu;
+    }
+
     void
     post(int int_num, int index)
     {
 
 
 class Interrupts : public SimObject
 {
-
   private:
+    BaseCPU * cpu;
+
     uint64_t interrupts[NumInterruptTypes];
     uint64_t intStatus;
 
   public:
+
+    void
+    setCPU(BaseCPU * _cpu)
+    {
+        cpu = _cpu;
+    }
+
     typedef SparcInterruptsParams Params;
 
     const Params *
         return dynamic_cast<const Params *>(_params);
     }
 
-    Interrupts(Params * p) : SimObject(p)
+    Interrupts(Params * p) : SimObject(p), cpu(NULL)
     {
         clearAll();
     }
 
 #include "sim/eventq.hh"
 
 class ThreadContext;
+class BaseCPU;
 
 namespace X86ISA {
 
 
     void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level);
 
+    BaseCPU *cpu;
+
   public:
     /*
      * Params stuff.
      */
     typedef X86LocalApicParams Params;
 
+    void
+    setCPU(BaseCPU * newCPU)
+    {
+        cpu = newCPU;
+    }
+
     void
     setClock(Tick newClock)
     {
 
         }
     }
 #if FULL_SYSTEM
+    interrupts->setCPU(this);
+
     profileEvent = NULL;
     if (params()->profile)
         profileEvent = new ProfileEvent(this, params()->profile);
 
 #if FULL_SYSTEM
     interrupts = oldCPU->interrupts;
+    interrupts->setCPU(this);
 
     for (int i = 0; i < threadContexts.size(); ++i)
         threadContexts[i]->profileClear();