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 --- 71 unchanged lines hidden (view full) --- 80 hostFactor(params->hostFactor), 81 drainManager(NULL), 82 ctrInsts(0) 83{ 84 if (pageSize == -1) 85 panic("KVM: Failed to determine host page size (%i)\n", 86 errno); 87 |
88 if (FullSystem) 89 thread = new SimpleThread(this, 0, params->system, params->itb, params->dtb, 90 params->isa[0]); 91 else 92 thread = new SimpleThread(this, /* thread_num */ 0, params->system, 93 params->workload[0], params->itb, 94 params->dtb, params->isa[0]); 95 |
96 thread->setStatus(ThreadContext::Halted); 97 tc = thread->getTC(); 98 threadContexts.push_back(tc); 99} 100 101BaseKvmCPU::~BaseKvmCPU() 102{ 103 if (_kvmRun) --- 355 unchanged lines hidden (view full) --- 459 DPRINTF(Kvm, "SuspendContext %d\n", thread_num); 460 461 assert(thread_num == 0); 462 assert(thread); 463 464 if (_status == Idle) 465 return; 466 |
467 assert(_status == Running || _status == RunningServiceCompletion); |
468 469 // The tick event may no be scheduled if the quest has requested 470 // the monitor to wait for interrupts. The normal CPU models can 471 // get their tick events descheduled by quiesce instructions, but 472 // that can't happen here. 473 if (tickEvent.scheduled()) 474 deschedule(tickEvent); 475 --- 536 unchanged lines hidden (view full) --- 1012 1013 if (mmio_req.isMmappedIpr()) { 1014 // We currently assume that there is no need to migrate to a 1015 // different event queue when doing IPRs. Currently, IPRs are 1016 // only used for m5ops, so it should be a valid assumption. 1017 const Cycles ipr_delay(write ? 1018 TheISA::handleIprWrite(tc, &pkt) : 1019 TheISA::handleIprRead(tc, &pkt)); |
1020 threadContextDirty = true; |
1021 return clockPeriod() * ipr_delay; 1022 } else { 1023 // Temporarily lock and migrate to the event queue of the 1024 // VM. This queue is assumed to "own" all devices we need to 1025 // access if running in multi-core mode. 1026 EventQueue::ScopedMigration migrate(vm.eventQueue()); 1027 1028 return dataPort.sendAtomic(&pkt); --- 246 unchanged lines hidden --- |