kvm: Initialize signal handlers from startupThread()
Signal handlers in KVM are controlled per thread and should be initialized from the thread that is going to execute the CPU. This changeset moves the initialization call from startup() to startupThread().
This commit is contained in:
parent
5cd9dd29bd
commit
739cc0128b
1 changed files with 4 additions and 4 deletions
|
@ -138,10 +138,6 @@ BaseKvmCPU::startup()
|
|||
// point. Initialize virtual CPUs here instead.
|
||||
vcpuFD = vm.createVCPU(vcpuID);
|
||||
|
||||
// Setup signal handlers. This has to be done after the vCPU is
|
||||
// created since it manipulates the vCPU signal mask.
|
||||
setupSignalHandler();
|
||||
|
||||
// Map the KVM run structure */
|
||||
vcpuMMapSize = kvm.getVCPUMMapSize();
|
||||
_kvmRun = (struct kvm_run *)mmap(0, vcpuMMapSize,
|
||||
|
@ -182,6 +178,10 @@ BaseKvmCPU::startupThread()
|
|||
const BaseKvmCPUParams * const p(
|
||||
dynamic_cast<const BaseKvmCPUParams *>(params()));
|
||||
|
||||
// Setup signal handlers. This has to be done after the vCPU is
|
||||
// created since it manipulates the vCPU signal mask.
|
||||
setupSignalHandler();
|
||||
|
||||
setupCounters();
|
||||
|
||||
if (p->usePerfOverflow)
|
||||
|
|
Loading…
Reference in a new issue