mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 14:28:35 +00:00
qemu: Add s390x support
The PR adds the s390x support. It sets the CCW devices and sets to false all the devices in the mapping isVirtioPCI. It reimplements the functions QemuNetdevParam and QemuDeviceParam to print an error message if the vhost-user devices are used. It introduces a new function ExecuteNetCCWDeviceAdd for qmp for the CCW devices. Fixes: #37 Co-authored-by: Yash D Jain <ydjainopensource@gmail.com> Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
This commit is contained in:
@@ -536,6 +536,22 @@ func TestQMPNetPCIDeviceAdd(t *testing.T) {
|
||||
<-disconnectedCh
|
||||
}
|
||||
|
||||
func TestQMPNetCCWDeviceAdd(t *testing.T) {
|
||||
connectedCh := make(chan *QMPVersion)
|
||||
disconnectedCh := make(chan struct{})
|
||||
buf := newQMPTestCommandBuffer(t)
|
||||
buf.AddCommand("device_add", nil, "return", nil)
|
||||
cfg := QMPConfig{Logger: qmpTestLogger{}}
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
checkVersion(t, connectedCh)
|
||||
err := q.ExecuteNetCCWDeviceAdd(context.Background(), "br0", "virtio-0", "02:42:ac:11:00:02", "0x7", "", 8)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
q.Shutdown()
|
||||
<-disconnectedCh
|
||||
}
|
||||
|
||||
// Checks that the device_add command is correctly sent.
|
||||
//
|
||||
// We start a QMPLoop, send the device_add command and stop the loop.
|
||||
|
Reference in New Issue
Block a user