From b66fda0a743c02e84dd70fafc48d14544903efe9 Mon Sep 17 00:00:00 2001
From: Roman Bogorodskiy
Date: Mon, 21 May 2018 18:53:36 +0400
Subject: [PATCH] bhyve: Add CPU topology support
Recently, bhyve started supporting specifying guest CPU topology.
It looks this way:
bhyve -c cpus=C,sockets=S,cores=C,threads=T ...
The old behaviour was bhyve -c C, where C is a number of vCPUs, is
still supported.
So if we have CPU topology in the domain XML, use the new syntax,
otherwise keep the old behaviour.
Also, document this feature in the bhyve driver page.
Signed-off-by: Roman Bogorodskiy
Reviewed-by: John Ferlan
---
docs/drvbhyve.html.in | 16 ++++++++++++++++
src/bhyve/bhyve_capabilities.c | 6 ++++++
src/bhyve/bhyve_capabilities.h | 1 +
src/bhyve/bhyve_command.c | 26 +++++++++++++++++++++++++-
tests/bhyvexml2argvtest.c | 8 +++++++-
5 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
index 5b5513d3df..b4d7df2edb 100644
--- a/docs/drvbhyve.html.in
+++ b/docs/drvbhyve.html.in
@@ -444,6 +444,22 @@ be wired and cannot be swapped out as follows:
</memoryBacking>
...
</domain>
+
+
+
+
+Since 4.5.0, it's possible to specify guest CPU topology, if bhyve
+supports that. Support for specifying guest CPU topology was added to bhyve in
+r332298 for -CURRENT.
+Example:
+
+<domain type="bhyve">
+ ...
+ <cpu>
+ <topology sockets='1' cores='2' threads='1'/>
+ </cpu>
+ ...
+</domain>