The <memoryBacking><locked/></memoryBacking> element will now pass the
wired (-S) flag to the bhyve command.
---
src/bhyve/bhyve_command.c | 3 +++
src/bhyve/bhyve_parse_command.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 9413ae5c1..e3f7ded7d 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -474,6 +474,9 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn,
virCommandAddArgFormat(cmd, "%llu",
VIR_DIV_UP(virDomainDefGetMemoryInitial(def), 1024));
+ if (def->mem.locked)
+ virCommandAddArg(cmd, "-S"); /* Wire guest memory */
+
/* Options */
if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON)
virCommandAddArg(cmd, "-A"); /* Create an ACPI table */
diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c
index fcaaed275..27916c528 100644
--- a/src/bhyve/bhyve_parse_command.c
+++ b/src/bhyve/bhyve_parse_command.c
@@ -721,6 +721,9 @@ bhyveParseBhyveCommandLine(virDomainDefPtr def,
goto error;
}
break;
+ case 'S':
+ def->mem.locked = true;
+ break;
}
}
--
2.15.1