[PATCH 1/3] bhyve: add support for wiring memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux