vendor: Update github.com/intel/govmm

Update github.com/intel/govmm.

shortlog:
    6667f4e qmp_test: Add TestExecMemdevAdd and TestExecQomSet
    201fd0a qmp: Add ExecMemdevAdd and ExecQomSet API
    e04be2c qmp: add ExecutePCIVhostUserDevAdd API
    13aeba0 qmp: support command 'chardev-remove'
    6d6b2d8 s390x: add s390x travis support

Fixes: #2406

Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
Hui Zhu 2020-01-22 13:50:54 +08:00
parent 73a63baab5
commit b337428947
5 changed files with 59 additions and 11 deletions

4
Gopkg.lock generated
View File

@ -412,11 +412,11 @@
revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675"
[[projects]]
digest = "1:b3ab3b3615583d7a374d4803ea2b71f173a4d8f4d594210e0fc8e9fc7c5a49c9"
digest = "1:f0e85729c00a427cef8de798b33b9a35b3117ee8760f6f00fc3cf3a5bb98f844"
name = "github.com/intel/govmm"
packages = ["qemu"]
pruneopts = "NUT"
revision = "8cba5a8e5f2816f26f9dc34b8ea968279a5a76eb"
revision = "ee21903287393441c7bb53a0b0d39b8fa4075221"
[[projects]]
digest = "1:6da9487ef0cc0cca3eeb1a24e3bb018ce2e07b7c2fc4d50975b54efdcc942118"

View File

@ -48,7 +48,7 @@
[[constraint]]
name = "github.com/intel/govmm"
revision = "8cba5a8e5f2816f26f9dc34b8ea968279a5a76eb"
revision = "ee21903287393441c7bb53a0b0d39b8fa4075221"
[[constraint]]
name = "github.com/kata-containers/agent"

View File

@ -1,4 +1,4 @@
// +build !s390x,!s390x_test
// +build !s390x
/*
// Copyright contributors to the Virtual Machine Manager for Go project

View File

@ -1,4 +1,4 @@
// +build s390x s390x_test
// +build s390x
/*
// Copyright contributors to the Virtual Machine Manager for Go project

View File

@ -946,6 +946,17 @@ func (q *QMP) ExecuteBlockdevDel(ctx context.Context, blockdevID string) error {
return q.executeCommand(ctx, "x-blockdev-del", args, nil)
}
// ExecuteChardevDel deletes a char device by sending a chardev-remove command.
// chardevID is the id of the char device to be deleted. Typically, this will
// match the id passed to ExecuteCharDevUnixSocketAdd. It must be a valid QMP id.
func (q *QMP) ExecuteChardevDel(ctx context.Context, chardevID string) error {
args := map[string]interface{}{
"id": chardevID,
}
return q.executeCommand(ctx, "chardev-remove", args, nil)
}
// ExecuteNetdevAdd adds a Net device to a QEMU instance
// using the netdev_add command. netdevID is the id of the device to add.
// Must be valid QMP identifier.
@ -1124,6 +1135,27 @@ func (q *QMP) ExecutePCIDeviceAdd(ctx context.Context, blockdevID, devID, driver
return q.executeCommand(ctx, "device_add", args, nil)
}
// ExecutePCIVhostUserDevAdd adds a vhost-user device to a QEMU instance using the device_add command.
// This function can be used to hot plug vhost-user devices on PCI(E) bridges.
// It receives the bus and the device address on its parent bus. bus is optional.
// devID is the id of the device to add.Must be valid QMP identifier. chardevID
// is the QMP identifier of character device using a unix socket as backend.
// driver is the name of vhost-user driver, like vhost-user-blk-pci.
func (q *QMP) ExecutePCIVhostUserDevAdd(ctx context.Context, driver, devID, chardevID, addr, bus string) error {
args := map[string]interface{}{
"driver": driver,
"id": devID,
"chardev": chardevID,
"addr": addr,
}
if bus != "" {
args["bus"] = bus
}
return q.executeCommand(ctx, "device_add", args, nil)
}
// ExecuteVFIODeviceAdd adds a VFIO device to a QEMU instance
// using the device_add command. devID is the id of the device to add.
// Must be valid QMP identifier. bdf is the PCI bus-device-function
@ -1347,8 +1379,8 @@ func (q *QMP) ExecQueryCpusFast(ctx context.Context) ([]CPUInfoFast, error) {
return cpuInfoFast, nil
}
// ExecHotplugMemory adds size of MiB memory to the guest
func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string, size int, share bool) error {
// ExecMemdevAdd adds size of MiB memory device to the guest
func (q *QMP) ExecMemdevAdd(ctx context.Context, qomtype, id, mempath string, size int, share bool, driver, driverID string) error {
props := map[string]interface{}{"size": uint64(size) << 20}
args := map[string]interface{}{
"qom-type": qomtype,
@ -1368,17 +1400,17 @@ func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string
defer func() {
if err != nil {
q.cfg.Logger.Errorf("Unable to hotplug memory device: %v", err)
q.cfg.Logger.Errorf("Unable to add memory device %s: %v", id, err)
err = q.executeCommand(ctx, "object-del", map[string]interface{}{"id": id}, nil)
if err != nil {
q.cfg.Logger.Warningf("Unable to clean up memory object: %v", err)
q.cfg.Logger.Warningf("Unable to clean up memory object %s: %v", id, err)
}
}
}()
args = map[string]interface{}{
"driver": "pc-dimm",
"id": "dimm" + id,
"driver": driver,
"id": driverID,
"memdev": id,
}
err = q.executeCommand(ctx, "device_add", args, nil)
@ -1386,6 +1418,11 @@ func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string
return err
}
// ExecHotplugMemory adds size of MiB memory to the guest
func (q *QMP) ExecHotplugMemory(ctx context.Context, qomtype, id, mempath string, size int, share bool) error {
return q.ExecMemdevAdd(ctx, qomtype, id, mempath, size, share, "pc-dimm", "dimm"+id)
}
// 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.
@ -1572,3 +1609,14 @@ func (q *QMP) ExecuteQueryStatus(ctx context.Context) (StatusInfo, error) {
return status, nil
}
// ExecQomSet qom-set path property value
func (q *QMP) ExecQomSet(ctx context.Context, path, property string, value uint64) error {
args := map[string]interface{}{
"path": path,
"property": property,
"value": value,
}
return q.executeCommand(ctx, "qom-set", args, nil)
}