diff options
author | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-05-14 16:02:45 +0200 |
---|---|---|
committer | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-05-14 16:02:45 +0200 |
commit | 4e52789c6db91cd292e2de933c7c797e24fa870f (patch) | |
tree | 137cdcac6264cb1104fe2d1adb6330f7eff31873 /src | |
parent | 3ba93822ccae1dcc5e47c6909d7e690d784ec0e1 (diff) | |
download | gem5-4e52789c6db91cd292e2de933c7c797e24fa870f.tar.xz |
kvm: Add support for disabling coalesced MMIO
Add the option useCoalescedMMIO to the BaseKvmCPU. The default
behavior is to disable coalesced MMIO since this hasn't been heavily
tested.
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/kvm/BaseKvmCPU.py | 1 | ||||
-rw-r--r-- | src/cpu/kvm/base.cc | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/cpu/kvm/BaseKvmCPU.py b/src/cpu/kvm/BaseKvmCPU.py index a8356ac5b..796a7794b 100644 --- a/src/cpu/kvm/BaseKvmCPU.py +++ b/src/cpu/kvm/BaseKvmCPU.py @@ -69,5 +69,6 @@ class BaseKvmCPU(BaseCPU): return True kvmVM = Param.KvmVM(Parent.any, 'KVM VM (i.e., shared memory domain)') + useCoalescedMMIO = Param.Bool(False, "Use coalesced MMIO (EXPERIMENTAL)") usePerfOverflow = Param.Bool(False, "Use perf event overflow counters (EXPERIMENTAL)") hostFactor = Param.Float(1.0, "Cycle scale factor") diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index 7435d4364..bc650aee9 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -133,6 +133,9 @@ BaseKvmCPU::init() void BaseKvmCPU::startup() { + const BaseKvmCPUParams * const p( + dynamic_cast<const BaseKvmCPUParams *>(params())); + Kvm &kvm(vm.kvm); BaseCPU::startup(); @@ -159,7 +162,9 @@ BaseKvmCPU::startup() // available. The offset into the KVM's communication page is // provided by the coalesced MMIO capability. int mmioOffset(kvm.capCoalescedMMIO()); - if (mmioOffset) { + if (!p->useCoalescedMMIO) { + inform("KVM: Coalesced MMIO disabled by config.\n"); + } else if (mmioOffset) { inform("KVM: Coalesced IO available\n"); mmioRing = (struct kvm_coalesced_mmio_ring *)( (char *)_kvmRun + (mmioOffset * pageSize)); |