Skip to content

Commit

Permalink
don't offset AP ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Freax13 committed Nov 13, 2024
1 parent c5fce39 commit 755b982
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions host/mushroom/src/insecure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use anyhow::{ensure, Context, Result};
use bit_field::BitField;
use constants::{
physical_address::{kernel, supervisor, DYNAMIC_2MIB, SUPERVISOR_SERVICES},
FIRST_AP, MAX_APS_COUNT,
MAX_APS_COUNT,
};
use loader::Input;
use nix::sys::pthread::pthread_kill;
Expand Down Expand Up @@ -154,10 +154,7 @@ pub fn main(
let cpuid_entries = Arc::<[KvmCpuidEntry2]>::from(cpuid_entries);
let done = Arc::new(AtomicBool::new(false));
let ap_threads = (0..MAX_APS_COUNT)
.map(|i| {
let id = FIRST_AP + i;
run_kernel_vcpu(id, vm.clone(), cpuid_entries.clone(), done.clone())
})
.map(|i| run_kernel_vcpu(i, vm.clone(), cpuid_entries.clone(), done.clone()))
.collect::<Vec<_>>();
ap_threads[0].thread().unpark();
start_log_collection(&memory_slots, kernel::LOG_BUFFER)?;
Expand Down

0 comments on commit 755b982

Please sign in to comment.