mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 04:25:21 +00:00
vmm: cpu: Call vcpu configure() on the vCPU thread
The function that programs the vCPUs is expected to be run from within each vCPU thread. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
13503061e6
commit
17badfbff5
@ -502,7 +502,6 @@ impl CpuManager {
|
||||
ioapic,
|
||||
creation_ts,
|
||||
)?;
|
||||
vcpu.configure(entry_addr, &self.vm_memory, self.cpuid.clone())?;
|
||||
|
||||
let vcpu_thread_barrier = vcpu_thread_barrier.clone();
|
||||
|
||||
@ -510,6 +509,9 @@ impl CpuManager {
|
||||
let vcpu_kill_signalled = self.vcpus_kill_signalled.clone();
|
||||
let vcpu_pause_signalled = self.vcpus_pause_signalled.clone();
|
||||
|
||||
let vm_memory = self.vm_memory.clone();
|
||||
let cpuid = self.cpuid.clone();
|
||||
|
||||
let handle = Some(
|
||||
thread::Builder::new()
|
||||
.name(format!("vcpu{}", vcpu.id))
|
||||
@ -527,6 +529,9 @@ impl CpuManager {
|
||||
.expect("Failed to register vcpu signal handler");
|
||||
}
|
||||
|
||||
vcpu.configure(entry_addr, &vm_memory, cpuid)
|
||||
.expect("Failed to configure vCPU");
|
||||
|
||||
// Block until all CPUs are ready.
|
||||
vcpu_thread_barrier.wait();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user