changeset 8055cd04be78 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8055cd04be78
description:
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:
src/cpu/kvm/BaseKvmCPU.py | 1 +
src/cpu/kvm/base.cc | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r a1ea7e67a9d9 -r 8055cd04be78 src/cpu/kvm/BaseKvmCPU.py
--- a/src/cpu/kvm/BaseKvmCPU.py Tue May 14 15:59:43 2013 +0200
+++ b/src/cpu/kvm/BaseKvmCPU.py Tue May 14 16:02:45 2013 +0200
@@ -69,5 +69,6 @@
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 -r a1ea7e67a9d9 -r 8055cd04be78 src/cpu/kvm/base.cc
--- a/src/cpu/kvm/base.cc Tue May 14 15:59:43 2013 +0200
+++ b/src/cpu/kvm/base.cc Tue May 14 16:02:45 2013 +0200
@@ -133,6 +133,9 @@
void
BaseKvmCPU::startup()
{
+ const BaseKvmCPUParams * const p(
+ dynamic_cast<const BaseKvmCPUParams *>(params()));
+
Kvm &kvm(vm.kvm);
BaseCPU::startup();
@@ -159,7 +162,9 @@
// 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));
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev