BaseKvmCPU.py revision 11399
12889Sbinkertn@umich.edu# Copyright (c) 2012 ARM Limited 22889Sbinkertn@umich.edu# All rights reserved. 32889Sbinkertn@umich.edu# 42889Sbinkertn@umich.edu# The license below extends only to copyright in the software and shall 52889Sbinkertn@umich.edu# not be construed as granting a license to any other intellectual 62889Sbinkertn@umich.edu# property including but not limited to intellectual property relating 72889Sbinkertn@umich.edu# to a hardware implementation of the functionality of the software 82889Sbinkertn@umich.edu# licensed hereunder. You may use the software subject to the license 92889Sbinkertn@umich.edu# terms below provided that you ensure that this notice is replicated 102889Sbinkertn@umich.edu# unmodified and in its entirety in all distributions of the software, 112889Sbinkertn@umich.edu# modified or unmodified, in source code or in binary form. 122889Sbinkertn@umich.edu# 132889Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 142889Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 152889Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 162889Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 172889Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 182889Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 192889Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 202889Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 212889Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 222889Sbinkertn@umich.edu# this software without specific prior written permission. 232889Sbinkertn@umich.edu# 242889Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 252889Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 262889Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 272889Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 282889Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 294850Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 304850Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 314850Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 324850Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 334850Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 344850Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 354850Snate@binkert.org# 362889Sbinkertn@umich.edu# Authors: Andreas Sandberg 374850Snate@binkert.org 384053Sbinkertn@umich.edufrom m5.params import * 392889Sbinkertn@umich.edufrom m5.proxy import * 402889Sbinkertn@umich.edu 412889Sbinkertn@umich.edufrom BaseCPU import BaseCPU 422889Sbinkertn@umich.edufrom KvmVM import KvmVM 432889Sbinkertn@umich.edu 442889Sbinkertn@umich.educlass BaseKvmCPU(BaseCPU): 455346Ssaidi@eecs.umich.edu type = 'BaseKvmCPU' 462889Sbinkertn@umich.edu cxx_header = "cpu/kvm/base.hh" 472889Sbinkertn@umich.edu abstract = True 482889Sbinkertn@umich.edu 492889Sbinkertn@umich.edu @classmethod 504053Sbinkertn@umich.edu def export_method_cxx_predecls(cls, code): 514053Sbinkertn@umich.edu code('#include "cpu/kvm/base.hh"') 524053Sbinkertn@umich.edu 534053Sbinkertn@umich.edu @classmethod 544053Sbinkertn@umich.edu def export_methods(cls, code): 554053Sbinkertn@umich.edu code(''' 564053Sbinkertn@umich.edu void dump() const; 574053Sbinkertn@umich.edu''') 584053Sbinkertn@umich.edu 594053Sbinkertn@umich.edu @classmethod 604053Sbinkertn@umich.edu def memory_mode(cls): 614053Sbinkertn@umich.edu return 'atomic_noncaching' 624053Sbinkertn@umich.edu 632889Sbinkertn@umich.edu @classmethod 642889Sbinkertn@umich.edu def require_caches(cls): 652889Sbinkertn@umich.edu return False 662889Sbinkertn@umich.edu 672889Sbinkertn@umich.edu @classmethod 682890Sbinkertn@umich.edu def support_take_over(cls): 692889Sbinkertn@umich.edu return True 702889Sbinkertn@umich.edu 712889Sbinkertn@umich.edu kvmVM = Param.KvmVM(Parent.any, 'KVM VM (i.e., shared memory domain)') 722889Sbinkertn@umich.edu useCoalescedMMIO = Param.Bool(False, "Use coalesced MMIO (EXPERIMENTAL)") 732889Sbinkertn@umich.edu usePerfOverflow = Param.Bool(False, "Use perf event overflow counters (EXPERIMENTAL)") 742889Sbinkertn@umich.edu alwaysSyncTC = Param.Bool(False, 752889Sbinkertn@umich.edu "Always sync thread contexts on entry/exit") 762889Sbinkertn@umich.edu 772889Sbinkertn@umich.edu hostFreq = Param.Clock("2GHz", "Host clock frequency") 782889Sbinkertn@umich.edu hostFactor = Param.Float(1.0, "Cycle scale factor") 792889Sbinkertn@umich.edu