From patchwork Fri Nov 26 10:51:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?THVrw6HFoSBEb2t0b3I=?= X-Patchwork-Id: 358292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAQAqG6f018117 for ; Fri, 26 Nov 2010 10:52:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754992Ab0KZKva (ORCPT ); Fri, 26 Nov 2010 05:51:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59917 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754856Ab0KZKvR (ORCPT ); Fri, 26 Nov 2010 05:51:17 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAQApGkE006470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Nov 2010 05:51:16 -0500 Received: from dhcp-27-189.brq.redhat.com (dhcp-27-189.brq.redhat.com [10.34.27.189]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAQApCis025236; Fri, 26 Nov 2010 05:51:14 -0500 From: Lukas Doktor To: autotest@test.kernel.org, kvm@vger.kernel.org, kvm-autotest@redhat.com, akong@redhat.com, lmr@redhat.com, ldoktor@redhat.com, jzupka@redhat.com Subject: [PATCH] Spread virtio_consoles across multiple PCIs Date: Fri, 26 Nov 2010 11:51:08 +0100 Message-Id: <1290768668-6125-2-git-send-email-ldoktor@redhat.com> In-Reply-To: <1290768668-6125-1-git-send-email-ldoktor@redhat.com> References: <1290768668-6125-1-git-send-email-ldoktor@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 26 Nov 2010 10:52:16 +0000 (UTC) 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,