base.cc (9689:a1ea7e67a9d9) base.cc (9690:8055cd04be78)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 119 unchanged lines hidden (view full) ---

128 TheISA::initCPU(tc, tc->contextId());
129
130 mmio_req.setThreadContext(tc->contextId(), 0);
131}
132
133void
134BaseKvmCPU::startup()
135{
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 119 unchanged lines hidden (view full) ---

128 TheISA::initCPU(tc, tc->contextId());
129
130 mmio_req.setThreadContext(tc->contextId(), 0);
131}
132
133void
134BaseKvmCPU::startup()
135{
136 const BaseKvmCPUParams * const p(
137 dynamic_cast<const BaseKvmCPUParams *>(params()));
138
136 Kvm &kvm(vm.kvm);
137
138 BaseCPU::startup();
139
140 assert(vcpuFD == -1);
141
142 // Tell the VM that a CPU is about to start.
143 vm.cpuStartup();

--- 10 unchanged lines hidden (view full) ---

154 vcpuFD, 0);
155 if (_kvmRun == MAP_FAILED)
156 panic("KVM: Failed to map run data structure\n");
157
158 // Setup a pointer to the MMIO ring buffer if coalesced MMIO is
159 // available. The offset into the KVM's communication page is
160 // provided by the coalesced MMIO capability.
161 int mmioOffset(kvm.capCoalescedMMIO());
139 Kvm &kvm(vm.kvm);
140
141 BaseCPU::startup();
142
143 assert(vcpuFD == -1);
144
145 // Tell the VM that a CPU is about to start.
146 vm.cpuStartup();

--- 10 unchanged lines hidden (view full) ---

157 vcpuFD, 0);
158 if (_kvmRun == MAP_FAILED)
159 panic("KVM: Failed to map run data structure\n");
160
161 // Setup a pointer to the MMIO ring buffer if coalesced MMIO is
162 // available. The offset into the KVM's communication page is
163 // provided by the coalesced MMIO capability.
164 int mmioOffset(kvm.capCoalescedMMIO());
162 if (mmioOffset) {
165 if (!p->useCoalescedMMIO) {
166 inform("KVM: Coalesced MMIO disabled by config.\n");
167 } else if (mmioOffset) {
163 inform("KVM: Coalesced IO available\n");
164 mmioRing = (struct kvm_coalesced_mmio_ring *)(
165 (char *)_kvmRun + (mmioOffset * pageSize));
166 } else {
167 inform("KVM: Coalesced not supported by host OS\n");
168 }
169}
170

--- 707 unchanged lines hidden ---
168 inform("KVM: Coalesced IO available\n");
169 mmioRing = (struct kvm_coalesced_mmio_ring *)(
170 (char *)_kvmRun + (mmioOffset * pageSize));
171 } else {
172 inform("KVM: Coalesced not supported by host OS\n");
173 }
174}
175

--- 707 unchanged lines hidden ---