mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-12 05:12:37 +00:00
vendor: update govmm
bring `pmem` option to pmem/nvdimm devices shortlog: qemu: add pmem flag to memory-backend-file Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
aa0d4ee0e8
commit
2c7f27ec4f
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -412,11 +412,11 @@
|
|||||||
revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675"
|
revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:0044fb81f517f480ca3c33675a3af6b4ada77a6faf699a302bc2388c98cacba9"
|
digest = "1:fafdb4aa5b6207f51ec7557818d5f7a534ed44ea4fb31c6f2e8abb01d1627b74"
|
||||||
name = "github.com/intel/govmm"
|
name = "github.com/intel/govmm"
|
||||||
packages = ["qemu"]
|
packages = ["qemu"]
|
||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "3700c55dd766d37e17af354fb9975dc801619d62"
|
revision = "e969afbec52cf687bbe97b76654c664128cdb04b"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:d6e9b99fe0150d4c26d81612676e8d59ad045642e4cbc8646e494b50d4f245ef"
|
digest = "1:d6e9b99fe0150d4c26d81612676e8d59ad045642e4cbc8646e494b50d4f245ef"
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/intel/govmm"
|
name = "github.com/intel/govmm"
|
||||||
revision = "3700c55dd766d37e17af354fb9975dc801619d62"
|
revision = "e969afbec52cf687bbe97b76654c664128cdb04b"
|
||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/kata-containers/agent"
|
name = "github.com/kata-containers/agent"
|
||||||
|
13
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
13
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
@ -1428,8 +1428,9 @@ func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string
|
|||||||
// a NVDIMM driver with the device_add command.
|
// a NVDIMM driver with the device_add command.
|
||||||
// id is the id of the device to add. It must be a valid QMP identifier.
|
// id is the id of the device to add. It must be a valid QMP identifier.
|
||||||
// mempath is the path of the device to add, e.g., /dev/rdb0. size is
|
// mempath is the path of the device to add, e.g., /dev/rdb0. size is
|
||||||
// the data size of the device.
|
// the data size of the device. pmem is to guarantee the persistence of QEMU writes
|
||||||
func (q *QMP) ExecuteNVDIMMDeviceAdd(ctx context.Context, id, mempath string, size int64) error {
|
// to the vNVDIMM backend.
|
||||||
|
func (q *QMP) ExecuteNVDIMMDeviceAdd(ctx context.Context, id, mempath string, size int64, pmem *bool) error {
|
||||||
args := map[string]interface{}{
|
args := map[string]interface{}{
|
||||||
"qom-type": "memory-backend-file",
|
"qom-type": "memory-backend-file",
|
||||||
"id": "nvdimmbackmem" + id,
|
"id": "nvdimmbackmem" + id,
|
||||||
@ -1439,6 +1440,14 @@ func (q *QMP) ExecuteNVDIMMDeviceAdd(ctx context.Context, id, mempath string, si
|
|||||||
"share": true,
|
"share": true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if q.version.Major > 4 || (q.version.Major == 4 && q.version.Minor >= 1) {
|
||||||
|
if pmem != nil {
|
||||||
|
props := args["props"].(map[string]interface{})
|
||||||
|
props["pmem"] = *pmem
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err := q.executeCommand(ctx, "object-add", args, nil)
|
err := q.executeCommand(ctx, "object-add", args, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user