The -cpu flag accepts three formats as argument:
Format | Example | Meaning | all | -cpu all | Specifies all enabled cpus. |
---|---|---|
cpu-num | -cpu 2 | Specifies a single cpu cpu-num. |
cpu-range1, cpu-range2,... | -cpu 7..15 | Specifies one or more cpu ranges. |
Format | Example | Meaning |
---|---|---|
cpu-num | -cpu 5 | Specifies a single cpu cpu-num. |
cpu-num1..cpu-num2 | -cpu 7..15 | Specifies the cpus between cpu-num1 and cpu-num2 inclusive. |
cpu-num1..cpu-num2:stride | -cpu 0..31:2 | Specifies the cpus between cpu-num1 and cpu-num2 inclusive, skipping by stride. |
The different formats for a cpu range may be freely combined by separating with commas. For example, the cpu range 0..15:2,31..63,0x7f specifies all the even numbered cpus from 0 to 14, all cpus from 31 to 63, and cpu 127. Overlapping ranges accumlate without warning or error.