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.
This commit is contained in:
parent
3ba93822cc
commit
4e52789c6d
2 changed files with 7 additions and 1 deletions
|
@ -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")
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue