bhyve: add support for wiring memory

The <memoryBacking><locked/></memoryBacking> element will now pass the
wired (-S) flag to the bhyve command.

Signed-off-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
This commit is contained in:
Fabian Freyer 2018-05-09 03:01:35 +02:00 committed by Roman Bogorodskiy
parent 65dd2ac92d
commit b181e44d9f
2 changed files with 6 additions and 0 deletions

View File

@ -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 */

View File

@ -721,6 +721,9 @@ bhyveParseBhyveCommandLine(virDomainDefPtr def,
goto error;
}
break;
case 'S':
def->mem.locked = true;
break;
}
}