Add cpu-max to capabilities XML output for newer QEMU and implement checks
whether the number of vCPUs/maximum vCPUS doesn't exceed machine limit.
For older versions of QEMU cpu-max field is not present so the cpu-max is
set to 0 to disable checking and act the same as without this patch.
Signed-off-by: Michal Novotny <minovotn(a)redhat.com>
Michal Novotny (2):
cpu-max: Implement cpu-max attribute into capabilities XML output
qemu: Implement validation for max-cpu in XML
docs/schemas/capability.rng | 5 +++++
src/conf/capabilities.c | 4 ++++
src/conf/capabilities.h | 1 +
src/qemu/qemu_capabilities.c | 40 +++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_capabilities.h | 3 ++-
src/qemu/qemu_driver.c | 30 ++++++++++++++++++++++++++++++
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 7 +++++++
8 files changed, 89 insertions(+), 2 deletions(-)
--
1.7.11.7