Allow sharing of memory backend file

Hotplugged memory could be backed by a file on the host with sharing
turned on. This change allows qmp to pass that option to a govmm.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
This commit is contained in:
Ganesh Maharaj Mahalingam
2019-06-18 06:16:18 -07:00
parent 516e0c5b7c
commit 0c900f596e
2 changed files with 5 additions and 2 deletions

View File

@@ -1273,7 +1273,7 @@ func TestExecHotplugMemory(t *testing.T) {
cfg := QMPConfig{Logger: qmpTestLogger{}}
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
checkVersion(t, connectedCh)
err := q.ExecHotplugMemory(context.Background(), "memory-backend-ram", "mem0", "", 128)
err := q.ExecHotplugMemory(context.Background(), "memory-backend-ram", "mem0", "", 128, true)
if err != nil {
t.Fatalf("Unexpected error: %v\n", err)
}