BaseKvmCPU.py revision 9690:8055cd04be78
17927SN/A# Copyright (c) 2012 ARM Limited 27927SN/A# All rights reserved. 37927SN/A# 48835SAli.Saidi@ARM.com# The license below extends only to copyright in the software and shall 57927SN/A# not be construed as granting a license to any other intellectual 67927SN/A# property including but not limited to intellectual property relating 77927SN/A# to a hardware implementation of the functionality of the software 87927SN/A# licensed hereunder. You may use the software subject to the license 97927SN/A# terms below provided that you ensure that this notice is replicated 107927SN/A# unmodified and in its entirety in all distributions of the software, 118835SAli.Saidi@ARM.com# modified or unmodified, in source code or in binary form. 127927SN/A# 137927SN/A# Redistribution and use in source and binary forms, with or without 147927SN/A# modification, are permitted provided that the following conditions are 157927SN/A# met: redistributions of source code must retain the above copyright 167927SN/A# notice, this list of conditions and the following disclaimer; 177927SN/A# redistributions in binary form must reproduce the above copyright 188721SN/A# notice, this list of conditions and the following disclaimer in the 197927SN/A# documentation and/or other materials provided with the distribution; 207927SN/A# neither the name of the copyright holders nor the names of its 218673SN/A# contributors may be used to endorse or promote products derived from 228673SN/A# this software without specific prior written permission. 237927SN/A# 247927SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 257927SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 267927SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 277927SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 287927SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 297927SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 307927SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 317927SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 327927SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 337927SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 348721SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 357927SN/A# 367927SN/A# Authors: Andreas Sandberg 377927SN/A 387927SN/Afrom m5.params import * 397927SN/Afrom m5.proxy import * 407927SN/A 417927SN/Afrom BaseCPU import BaseCPU 427927SN/Afrom KvmVM import KvmVM 437927SN/A 447927SN/Aclass BaseKvmCPU(BaseCPU): 457927SN/A type = 'BaseKvmCPU' 467927SN/A cxx_header = "cpu/kvm/base.hh" 477927SN/A abstract = True 487927SN/A 497927SN/A @classmethod 507927SN/A def export_method_cxx_predecls(cls, code): 517927SN/A code('#include "cpu/kvm/base.hh"') 527927SN/A 538835SAli.Saidi@ARM.com @classmethod 548835SAli.Saidi@ARM.com def export_methods(cls, code): 558835SAli.Saidi@ARM.com code(''' 568835SAli.Saidi@ARM.com void dump(); 578835SAli.Saidi@ARM.com''') 588835SAli.Saidi@ARM.com 598835SAli.Saidi@ARM.com @classmethod 608835SAli.Saidi@ARM.com def memory_mode(cls): 618835SAli.Saidi@ARM.com return 'atomic_noncaching' 628835SAli.Saidi@ARM.com 638835SAli.Saidi@ARM.com @classmethod 647927SN/A def require_caches(cls): 657927SN/A return False 667927SN/A 677927SN/A @classmethod 688721SN/A def support_take_over(cls): 698721SN/A return True 708721SN/A 717927SN/A kvmVM = Param.KvmVM(Parent.any, 'KVM VM (i.e., shared memory domain)') 728721SN/A useCoalescedMMIO = Param.Bool(False, "Use coalesced MMIO (EXPERIMENTAL)") 738721SN/A usePerfOverflow = Param.Bool(False, "Use perf event overflow counters (EXPERIMENTAL)") 747927SN/A hostFactor = Param.Float(1.0, "Cycle scale factor") 757927SN/A