base.cc (11363:f3f72c0ab03e) | base.cc (11399:3f805b5c48ae) |
---|---|
1/* 2 * Copyright (c) 2012, 2015 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 --- 55 unchanged lines hidden (view full) --- 64#define PAGE_SIZE pageSize 65 66BaseKvmCPU::BaseKvmCPU(BaseKvmCPUParams *params) 67 : BaseCPU(params), 68 vm(*params->kvmVM), 69 _status(Idle), 70 dataPort(name() + ".dcache_port", this), 71 instPort(name() + ".icache_port", this), | 1/* 2 * Copyright (c) 2012, 2015 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 --- 55 unchanged lines hidden (view full) --- 64#define PAGE_SIZE pageSize 65 66BaseKvmCPU::BaseKvmCPU(BaseKvmCPUParams *params) 67 : BaseCPU(params), 68 vm(*params->kvmVM), 69 _status(Idle), 70 dataPort(name() + ".dcache_port", this), 71 instPort(name() + ".icache_port", this), |
72 alwaysSyncTC(params->alwaysSyncTC), |
|
72 threadContextDirty(true), 73 kvmStateDirty(false), 74 vcpuID(vm.allocVCPUID()), vcpuFD(-1), vcpuMMapSize(0), 75 _kvmRun(NULL), mmioRing(NULL), 76 pageSize(sysconf(_SC_PAGE_SIZE)), 77 tickEvent(*this), 78 activeInstPeriod(0), 79 perfControlledByTimer(params->usePerfOverflow), --- 472 unchanged lines hidden (view full) --- 552 !comInstEventQueue[0]->empty() ? 553 comInstEventQueue[0]->nextTick() : UINT64_MAX); 554 // Enter into KVM and complete pending IO instructions if we 555 // have an instruction event pending. 556 const Tick ticksToExecute( 557 nextInstEvent > ctrInsts ? 558 curEventQueue()->nextTick() - curTick() : 0); 559 | 73 threadContextDirty(true), 74 kvmStateDirty(false), 75 vcpuID(vm.allocVCPUID()), vcpuFD(-1), vcpuMMapSize(0), 76 _kvmRun(NULL), mmioRing(NULL), 77 pageSize(sysconf(_SC_PAGE_SIZE)), 78 tickEvent(*this), 79 activeInstPeriod(0), 80 perfControlledByTimer(params->usePerfOverflow), --- 472 unchanged lines hidden (view full) --- 553 !comInstEventQueue[0]->empty() ? 554 comInstEventQueue[0]->nextTick() : UINT64_MAX); 555 // Enter into KVM and complete pending IO instructions if we 556 // have an instruction event pending. 557 const Tick ticksToExecute( 558 nextInstEvent > ctrInsts ? 559 curEventQueue()->nextTick() - curTick() : 0); 560 |
561 if (alwaysSyncTC) 562 threadContextDirty = true; 563 |
|
560 // We might need to update the KVM state. 561 syncKvmState(); 562 563 // Setup any pending instruction count breakpoints using 564 // PerfEvent if we are going to execute more than just an IO 565 // completion. 566 if (ticksToExecute > 0) 567 setupInstStop(); --- 15 unchanged lines hidden (view full) --- 583 if (_status == Idle) 584 break; 585 586 // Entering into KVM implies that we'll have to reload the thread 587 // context from KVM if we want to access it. Flag the KVM state as 588 // dirty with respect to the cached thread context. 589 kvmStateDirty = true; 590 | 564 // We might need to update the KVM state. 565 syncKvmState(); 566 567 // Setup any pending instruction count breakpoints using 568 // PerfEvent if we are going to execute more than just an IO 569 // completion. 570 if (ticksToExecute > 0) 571 setupInstStop(); --- 15 unchanged lines hidden (view full) --- 587 if (_status == Idle) 588 break; 589 590 // Entering into KVM implies that we'll have to reload the thread 591 // context from KVM if we want to access it. Flag the KVM state as 592 // dirty with respect to the cached thread context. 593 kvmStateDirty = true; 594 |
595 if (alwaysSyncTC) 596 syncThreadContext(); 597 |
|
591 // Enter into the RunningService state unless the 592 // simulation was stopped by a timer. 593 if (_kvmRun->exit_reason != KVM_EXIT_INTR) { 594 _status = RunningService; 595 } else { 596 ++numExitSignal; 597 _status = Running; 598 } --- 700 unchanged lines hidden --- | 598 // Enter into the RunningService state unless the 599 // simulation was stopped by a timer. 600 if (_kvmRun->exit_reason != KVM_EXIT_INTR) { 601 _status = RunningService; 602 } else { 603 ++numExitSignal; 604 _status = Running; 605 } --- 700 unchanged lines hidden --- |