Delete cpu affinity config
Bug: 245746308
Test: TH
Change-Id: I0d74f55b7b41e5d6c38be0705582bf12fc9169d9
diff --git a/vm/src/main.rs b/vm/src/main.rs
index ee0e2e6..b35bd4b 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -92,10 +92,6 @@
#[structopt(long)]
cpus: Option<u32>,
- /// Host CPUs where vCPUs are run on. If unspecified, vCPU runs on any host CPU.
- #[structopt(long)]
- cpu_affinity: Option<String>,
-
/// Comma separated list of task profile names to apply to the VM
#[structopt(long)]
task_profiles: Vec<String>,
@@ -122,14 +118,6 @@
#[structopt(long)]
cpus: Option<u32>,
- /// Host CPUs where vCPUs are run on. If unspecified, vCPU runs on any host CPU. The format
- /// can be either a comma-separated list of CPUs or CPU ranges to run vCPUs on (e.g.
- /// "0,1-3,5" to choose host CPUs 0, 1, 2, 3, and 5, or a colon-separated list of
- /// assignments of vCPU-to-host-CPU assignments e.g. "0=0:1=1:2=2" to map vCPU 0 to host
- /// CPU 0 and so on.
- #[structopt(long)]
- cpu_affinity: Option<String>,
-
/// Comma separated list of task profile names to apply to the VM
#[structopt(long)]
task_profiles: Vec<String>,
@@ -216,7 +204,6 @@
protected,
mem,
cpus,
- cpu_affinity,
task_profiles,
extra_idsigs,
} => command_run_app(
@@ -234,11 +221,10 @@
protected,
mem,
cpus,
- cpu_affinity,
task_profiles,
&extra_idsigs,
),
- Opt::Run { name, config, daemonize, cpus, cpu_affinity, task_profiles, console, log } => {
+ Opt::Run { name, config, daemonize, cpus, task_profiles, console, log } => {
command_run(
name,
service.as_ref(),
@@ -248,7 +234,6 @@
log.as_deref(),
/* mem */ None,
cpus,
- cpu_affinity,
task_profiles,
)
}
diff --git a/vm/src/run.rs b/vm/src/run.rs
index aaa3988..44e15f9 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -49,7 +49,6 @@
protected: bool,
mem: Option<u32>,
cpus: Option<u32>,
- cpu_affinity: Option<String>,
task_profiles: Vec<String>,
extra_idsigs: &[PathBuf],
) -> Result<(), Error> {
@@ -102,7 +101,6 @@
protectedVm: protected,
memoryMib: mem.unwrap_or(0) as i32, // 0 means use the VM default
numCpus: cpus.unwrap_or(1) as i32,
- cpuAffinity: cpu_affinity,
taskProfiles: task_profiles,
});
run(
@@ -127,7 +125,6 @@
log_path: Option<&Path>,
mem: Option<u32>,
cpus: Option<u32>,
- cpu_affinity: Option<String>,
task_profiles: Vec<String>,
) -> Result<(), Error> {
let config_file = File::open(config_path).context("Failed to open config file")?;
@@ -144,7 +141,6 @@
} else {
config.name = String::from("VmRun");
}
- config.cpuAffinity = cpu_affinity;
config.taskProfiles = task_profiles;
run(
service,