BaseKvmCPU.py revision 9655
13048SN/A# Copyright (c) 2012 ARM Limited 23048SN/A# All rights reserved. 33048SN/A# 410036SAli.Saidi@ARM.com# The license below extends only to copyright in the software and shall 58835SAli.Saidi@ARM.com# not be construed as granting a license to any other intellectual 610036SAli.Saidi@ARM.com# property including but not limited to intellectual property relating 77935SN/A# to a hardware implementation of the functionality of the software 87935SN/A# licensed hereunder. You may use the software subject to the license 97935SN/A# terms below provided that you ensure that this notice is replicated 103048SN/A# unmodified and in its entirety in all distributions of the software, 113048SN/A# modified or unmodified, in source code or in binary form. 123048SN/A# 1310315Snilay@cs.wisc.edu# Redistribution and use in source and binary forms, with or without 148835SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are 159885Sstever@gmail.com# met: redistributions of source code must retain the above copyright 169885Sstever@gmail.com# notice, this list of conditions and the following disclaimer; 1710036SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright 188835SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the 198835SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution; 2010315Snilay@cs.wisc.edu# neither the name of the copyright holders nor the names of its 218835SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from 2210315Snilay@cs.wisc.edu# this software without specific prior written permission. 233048SN/A# 249481Snilay@cs.wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 258721SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2610736Snilay@cs.wisc.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2711219Snilay@cs.wisc.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 288721SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 298835SAli.Saidi@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 308835SAli.Saidi@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 317935SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 327935SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 337935SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 347935SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 357935SN/A# 367935SN/A# Authors: Andreas Sandberg 377935SN/A 388983Snate@binkert.orgfrom m5.params import * 393048SN/Afrom m5.proxy import * 409885Sstever@gmail.com 419885Sstever@gmail.comfrom BaseCPU import BaseCPU 429885Sstever@gmail.comfrom KvmVM import KvmVM 4310315Snilay@cs.wisc.edu 4410036SAli.Saidi@ARM.comclass BaseKvmCPU(BaseCPU): 4510315Snilay@cs.wisc.edu type = 'BaseKvmCPU' 469885Sstever@gmail.com cxx_header = "cpu/kvm/base.hh" 479885Sstever@gmail.com abstract = True 483048SN/A 493048SN/A @classmethod 509481Snilay@cs.wisc.edu def export_method_cxx_predecls(cls, code): 5110315Snilay@cs.wisc.edu code('#include "cpu/kvm/base.hh"') 525876SN/A 539885Sstever@gmail.com @classmethod 543171SN/A def export_methods(cls, code): 555876SN/A code(''' 568835SAli.Saidi@ARM.com void dump(); 575876SN/A''') 585000SN/A 5910036SAli.Saidi@ARM.com @classmethod 608983Snate@binkert.org def memory_mode(cls): 613048SN/A return 'atomic_noncaching' 623048SN/A 638835SAli.Saidi@ARM.com @classmethod 649481Snilay@cs.wisc.edu def require_caches(cls): 655000SN/A return False 663048SN/A 673048SN/A @classmethod 683048SN/A def support_take_over(cls): 693048SN/A return True 705575SN/A 718835SAli.Saidi@ARM.com kvmVM = Param.KvmVM(Parent.any, 'KVM VM (i.e., shared memory domain)') 723147SN/A usePerfOverflow = Param.Bool(False, "Use perf event overflow counters (EXPERIMENTAL)") 739885Sstever@gmail.com hostFactor = Param.Float(1.0, "Cycle scale factor") 745509SN/A