mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-22 09:49:35 +00:00
vendor: Update govmm vendoring
Shortlog:97fc343
contributors: add my namec891f5f
qmp: Add nvdimm support Fixes #991 Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
parent
408428edf4
commit
617e5e4e25
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -238,11 +238,11 @@
|
||||
revision = "3520598351bb3500a49ae9563f5539666ae0a27c"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:40227c1b7841f35c5965b955b21cc84f3990b9b972d3224e5e31ba20a3dc1f37"
|
||||
digest = "1:15f0da05538e2445b354c620555231448849b7ece222c45578668d0dfd6bec93"
|
||||
name = "github.com/intel/govmm"
|
||||
packages = ["qemu"]
|
||||
pruneopts = "NUT"
|
||||
revision = "32f64a0630c7602d536be2a9c83bc3eee160359b"
|
||||
revision = "737f03de595e216116264cc74a58e5f2a1df789a"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:e96806ae1b041a36386249b22ef9eaf5af1788c0f86f686c6296e5a9caf53df8"
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/intel/govmm"
|
||||
revision = "32f64a0630c7602d536be2a9c83bc3eee160359b"
|
||||
revision = "737f03de595e216116264cc74a58e5f2a1df789a"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/kata-containers/agent"
|
||||
|
1
vendor/github.com/intel/govmm/CONTRIBUTORS.md
generated
vendored
1
vendor/github.com/intel/govmm/CONTRIBUTORS.md
generated
vendored
@ -18,4 +18,5 @@ themselves (or their employer, as appropriate).
|
||||
- robert.bradford@intel.com
|
||||
- sameo@linux.intel.com
|
||||
- sebastien.boeuf@intel.com
|
||||
- teawater@hyper.sh
|
||||
- xinda.zhao@intel.com
|
||||
|
36
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
36
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
@ -1307,6 +1307,42 @@ func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecuteNVDIMMDeviceAdd adds a block device to a QEMU instance using
|
||||
// a NVDIMM driver with the device_add command.
|
||||
// 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
|
||||
// the data size of the device.
|
||||
func (q *QMP) ExecuteNVDIMMDeviceAdd(ctx context.Context, id, mempath string, size int64) error {
|
||||
args := map[string]interface{}{
|
||||
"qom-type": "memory-backend-file",
|
||||
"id": "nvdimmbackmem" + id,
|
||||
"props": map[string]interface{}{
|
||||
"mem-path": mempath,
|
||||
"size": size,
|
||||
"share": true,
|
||||
},
|
||||
}
|
||||
err := q.executeCommand(ctx, "object-add", args, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
args = map[string]interface{}{
|
||||
"driver": "nvdimm",
|
||||
"id": "nvdimm" + id,
|
||||
"memdev": "nvdimmbackmem" + id,
|
||||
}
|
||||
if err = q.executeCommand(ctx, "device_add", args, nil); err != nil {
|
||||
q.cfg.Logger.Errorf("Unable to hotplug NVDIMM device: %v", err)
|
||||
err2 := q.executeCommand(ctx, "object-del", map[string]interface{}{"id": "nvdimmbackmem" + id}, nil)
|
||||
if err2 != nil {
|
||||
q.cfg.Logger.Warningf("Unable to clean up memory object: %v", err2)
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecuteBalloon sets the size of the balloon, hence updates the memory
|
||||
// allocated for the VM.
|
||||
func (q *QMP) ExecuteBalloon(ctx context.Context, bytes uint64) error {
|
||||
|
Loading…
Reference in New Issue
Block a user