summaryrefslogtreecommitdiff
path: root/src/cpu/kvm/vm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/kvm/vm.cc')
-rw-r--r--src/cpu/kvm/vm.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/kvm/vm.cc b/src/cpu/kvm/vm.cc
index ccf739305..39bce32f4 100644
--- a/src/cpu/kvm/vm.cc
+++ b/src/cpu/kvm/vm.cc
@@ -341,13 +341,18 @@ KvmVM::cpuStartup()
void
KvmVM::delayedStartup()
{
- const std::vector<std::pair<AddrRange, uint8_t*> >&memories(
+ const std::vector<BackingStoreEntry> &memories(
system->getPhysMem().getBackingStore());
DPRINTF(Kvm, "Mapping %i memory region(s)\n", memories.size());
for (int slot(0); slot < memories.size(); ++slot) {
- const AddrRange &range(memories[slot].first);
- void *pmem(memories[slot].second);
+ if (!memories[slot].kvmMap) {
+ DPRINTF(Kvm, "Skipping region marked as not usable by KVM\n");
+ continue;
+ }
+
+ const AddrRange &range(memories[slot].range);
+ void *pmem(memories[slot].pmem);
if (pmem) {
DPRINTF(Kvm, "Mapping region: 0x%p -> 0x%llx [size: 0x%llx]\n",