diff -r 00dca8a9b560 -r edf659ee7b8a src/cpu/kvm/base.hh --- a/src/cpu/kvm/base.hh Thu May 02 12:03:43 2013 +0200 +++ b/src/cpu/kvm/base.hh Thu May 02 12:04:14 2013 +0200 @@ -93,8 +93,8 @@ void verifyMemoryMode() const; - CpuPort &getDataPort() { return dataPort; } - CpuPort &getInstPort() { return instPort; } + MasterPort &getDataPort() { return dataPort; } + MasterPort &getInstPort() { return instPort; } void wakeup(); void activateContext(ThreadID thread_num, Cycles delay); @@ -403,11 +403,38 @@ } /** @} */ + + /** + * KVM memory port. Uses the default MasterPort behavior, but + * panics on timing accesses. + */ + class MemPort : public MasterPort + { + + public: + MemPort(const std::string &_name, BaseKvmCPU *_cpu) + : MasterPort(_name, _cpu) + { } + + protected: + bool recvTimingResp(PacketPtr pkt) + { + panic("The KVM CPU doesn't expect recvTimingResp!\n"); + return true; + } + + void recvRetry() + { + panic("The KVM CPU doesn't expect recvRetry!\n"); + } + + }; + /** Port for data requests */ - CpuPort dataPort; + MemPort dataPort; /** Unused dummy port for the instruction interface */ - CpuPort instPort; + MemPort instPort; /** Pre-allocated MMIO memory request */ Request mmio_req;