hvmloader: limit CPUs exposed to guests
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Jun 2016 14:51:22 +0000 (16:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jun 2016 14:51:22 +0000 (16:51 +0200)
commit08754333892407f415045c05659783baeb8fc5d4
tree38b6f2095218e2291d3a2701d830c32487d47a62
parentd8ede4a09e3ea2fee0db0ebf6ab158ea5292ed98
hvmloader: limit CPUs exposed to guests

Various Linux versions allocate (partial) per-CPU data for all of them,
as there is no indication in MADT whether they're hotpluggable. That's
a little wasteful in terms of resource consumption especially for
- guests with not overly much memory assigned,
- 32-bit guests not having overly much address space available.
Therefore limit what we put into MADT to the "maxvcpus" value, and make
sure AML doesn't touch memory addresses corresponding to CPUs beyond
that value (we can't reasonably make the respective processor objects
disappear).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/firmware/hvmloader/acpi/build.c
tools/firmware/hvmloader/acpi/dsdt.asl
tools/firmware/hvmloader/acpi/mk_dsdt.c