tklengyel / drakvuf

DRAKVUF Black-box Binary Analysis
https://drakvuf.com
Other
1.04k stars 247 forks source link

Only 1 CPU used? #1482

Open xme opened 2 years ago

xme commented 2 years ago

Hi *,

I'm wondering if this is related to the setup process (installing xen) or something else? My host has 4 CPUs and only ONE is used by Ubuntu running drakvuf:

xavier@drakvuf:~$ dmesg|grep CPU
[    1.097906] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    1.097958] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[    1.136707] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    1.148035] rcu:     RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=1.
[    1.150815] random: crng done (trusting CPU's manufacturer)
[    1.152336] installing Xen timer for CPU 0
[    1.153277] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    1.153278] TAA: Vulnerable: Clear CPU buffers attempted, no microcode
[    1.153279] MMIO Stale Data: Vulnerable: Clear CPU buffers attempted, no microcode
[    1.204939] Performance Events: unsupported p6 CPU model 158 no PMU driver, software events only.
[    1.205489] smp: Bringing up secondary CPUs ...
[    1.205490] smp: Brought up 1 node, 1 CPU
[    1.472485] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 1/0x6 ignored.
[    1.472531] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 2/0x4 ignored.
[    1.472577] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 3/0x2 ignored.
[    1.847198] intel_pstate: CPU model not supported
[    1.847208] ledtrig-cpu: registered to indicate activity on CPUs

Already seen this behavior? Kr, /x

manorit2001 commented 2 years ago

You can configure this behaviour, in /etc/default/grub/xen.cfg there will be settings to configure how many CPUs you require for your host machine and your virtual machine. Xen will give dedicated CPUs to your host and your VM, they won't be sharable with each other so you won't be able to see the cpus that are dedicated to your VM