Signed-off-by: Lukas Doktor <[email protected]>
---
client/tests/kvm/tests/virtio_console.py | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/client/tests/kvm/tests/virtio_console.py
b/client/tests/kvm/tests/virtio_console.py
index 3edd051..2f1d5eb 100644
--- a/client/tests/kvm/tests/virtio_console.py
+++ b/client/tests/kvm/tests/virtio_console.py
@@ -544,19 +544,32 @@ def run_virtio_console(test, params, env):
tmp_dir = tempfile.mkdtemp(prefix="virtio-console-", dir="/tmp/")
if not params.get('extra_params'):
params['extra_params'] = ''
- params['extra_params'] += " -device virtio-serial"
- for i in range(0, no_console):
+ for i in range(0, no_console):
+ # Spread consoles between multiple PCI devices (2 per a dev)
+ if not i % 2:
+ pci = "virtio-serial-pci%d" % (i / 2)
+ params['extra_params'] += (" -device virtio-serial-pci,id="
+ + pci)
+ pci += ".0"
params['extra_params'] += (" -chardev socket,path=%s/%d,id=vc%d,"
"server,nowait" % (tmp_dir, i, i))
params['extra_params'] += (" -device virtconsole,chardev=vc%d,"
- "name=console-%d,id=c%d" % (i, i, i))
+ "name=console-%d,id=c%d,bus=%s"
+ % (i, i, i, pci))
for i in range(no_console, no_console + no_serialport):
+ # Spread seroal ports between multiple PCI devices (2 per a dev)
+ if not i % 2:
+ pci = "virtio-serial-pci%d" % (i / 2)
+ params['extra_params'] += (" -device virtio-serial-pci,id="
+ + pci)
+ pci += ".0"
params['extra_params'] += (" -chardev socket,path=%s/%d,id=vs%d,"
"server,nowait" % (tmp_dir, i, i))
params['extra_params'] += (" -device virtserialport,chardev=vs%d,"
- "name=serialport-%d,id=p%d" % (i, i, i))
+ "name=serialport-%d,id=p%d,bus=%s"
+ % (i, i, i, pci))
logging.debug("Booting first guest %s", params.get("main_vm"))
kvm_preprocessing.preprocess_vm(test, params, env,
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html