From patchwork Thu Jan 17 17:52:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 155872 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2257872jaa; Thu, 17 Jan 2019 09:53:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5t2b0uNNLijf5riiE/U7RJI0JTadKMxplW1kPhmr5OCBnGSwdOLr8zvqacR6mrWLDe6jti X-Received: by 2002:a0c:81c4:: with SMTP id 4mr12727433qve.156.1547747622252; Thu, 17 Jan 2019 09:53:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547747622; cv=none; d=google.com; s=arc-20160816; b=r8oScDWf3vnSBEvA8/hCzp69+qfT9EulVlyXZOGUD6j40l1saRtV4dBEEbA1Q6R9jg 7Wk8mdITAsY/1geLRpNpcs0ZXDw1dSwvgNJaDDkJ9t2uT+1r4mcLPiKkccjUxCiHzOmX AY/CpoXOOneG49fus5TMOQgoCqH1sdWc4ZQGQp95ZBwL91WMLFBBJaE7iHvvLpXunjOl 5dLREETNJ6E4juiI5Egi9xPlGhlAXbzt7MrlRMDl7TLQeXzmUARyN77Pf1bBYlm1ETTd vEKAUJvoDPQyCRxuJMux8bEqB41ZxSP/PHSH24XkiBcjti3KyN4lBTN9os2d3zzvqa3h mdQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=zEBMTZVjoZSA63Dy2GqhxE5EYRYN0c3bRCbmMzpvgmU=; b=TnDxeOyXS3VwUxibfl9p5F6eVqEXQddMQKwYMmGL4rUmqq6cZoznAIcC3iHestZDn3 JoAVPw1UH8IVBNh+aVIxRq5MYzHz3mquhGU9DGaAeLTjmb6htP55SpLFIj5SI53yZ5FA oaH8gZwETCbLPcXpq7CARTK59TMIZhQSR47z+j2UeeYA0fTMuiPH8RP1QgE7OtEYNSbZ F2fPyyRhlyVmANjDPCHsaGknFHkZRCPKd9SNcY8hXnrVSwPnBhFeqBltI/7EPUSmNoSa KA7ZxT9t/ZtcK/Nfh7zJdHOdjip3eXKAHwSAlPn2bS9H3c511JYxhzsDK5YwI4+r3UES OOzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id d9si2493877qtp.342.2019.01.17.09.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 09:53:42 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77AA5C7C92; Thu, 17 Jan 2019 17:53:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3077A60D27; Thu, 17 Jan 2019 17:53:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D7F243F60D; Thu, 17 Jan 2019 17:53:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0HHrLr7005625 for ; Thu, 17 Jan 2019 12:53:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5CB75600CC; Thu, 17 Jan 2019 17:53:21 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-122-144.rdu2.redhat.com [10.10.122.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFF29600C6; Thu, 17 Jan 2019 17:53:20 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 17 Jan 2019 12:52:44 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 17/18] qemu: Support virtio-serial controller model=virtio-{non-}transitional X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 17 Jan 2019 17:53:41 +0000 (UTC) Add controller type='virtio-serial' model handling for virtio transitional devices. Ex: * "virtio-transitional" maps to qemu "virtio-serial-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-serial-pci-non-transitional" Signed-off-by: Cole Robinson --- docs/formatdomain.html.in | 4 +++- docs/schemas/domaincommon.rng | 9 +++++++++ src/conf/domain_conf.c | 10 ++++++++++ src/conf/domain_conf.h | 10 ++++++++++ src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 4 ++++ src/qemu/qemu_command.c | 11 +++++++++- src/qemu/qemu_domain_address.c | 2 ++ .../caps_4.0.0.x86_64.xml | 2 ++ .../virtio-non-transitional.x86_64-3.1.0.args | 15 ++++++++------ ...virtio-non-transitional.x86_64-latest.args | 15 ++++++++------ .../virtio-non-transitional.xml | 1 + .../virtio-transitional.x86_64-3.1.0.args | 13 ++++++------ .../virtio-transitional.x86_64-latest.args | 13 ++++++------ .../qemuxml2argvdata/virtio-transitional.xml | 1 + .../virtio-non-transitional.xml | 20 +++++++++++++------ .../virtio-transitional.xml | 15 ++++++++------ 17 files changed, 113 insertions(+), 38 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bdf533ba3e..1bba2ca284 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4135,7 +4135,9 @@
The virtio-serial controller has two additional optional attributes ports and vectors, which control how many devices can be connected through the - controller.
+ controller. Since 5.1.0, it + supports an optional attribute model which can + be 'virtio', 'virtio-transitional', or 'virtio-non-transitional'
scsi
A scsi controller has an optional attribute model, which is one of 'auto', 'buslogic', 'ibmvscsi', diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 242f237360..99987b4a3a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2311,6 +2311,15 @@ virtio-serial + + + + virtio + virtio-transitional + virtio-non-transitional + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 76955b6d78..46fbc0befc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -384,6 +384,12 @@ VIR_ENUM_IMPL(virDomainControllerModelIDE, VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST, "piix4", "ich6") +VIR_ENUM_IMPL(virDomainControllerModelVirtioSerial, + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST, + "virtio", + "virtio-transitional", + "virtio-non-transitional") + VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST, "mount", "block", @@ -10222,6 +10228,8 @@ virDomainControllerModelTypeFromString(const virDomainControllerDef *def, return virDomainControllerModelPCITypeFromString(model); else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE) return virDomainControllerModelIDETypeFromString(model); + else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) + return virDomainControllerModelVirtioSerialTypeFromString(model); return -1; } @@ -10239,6 +10247,8 @@ virDomainControllerModelTypeToString(virDomainControllerDefPtr def, return virDomainControllerModelPCITypeToString(model); else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE) return virDomainControllerModelIDETypeToString(model); + else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) + return virDomainControllerModelVirtioSerialTypeToString(model); return NULL; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 9771b0b3d7..0d801b0d6d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -791,6 +791,15 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST } virDomainControllerModelIDE; +typedef enum { + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_DEFAULT = -1, + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO, + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL, + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL, + + VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST +} virDomainControllerModelVirtioSerial; + # define IS_USB2_CONTROLLER(ctrl) \ (((ctrl)->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) && \ ((ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \ @@ -3467,6 +3476,7 @@ VIR_ENUM_DECL(virDomainControllerPCIModelName) VIR_ENUM_DECL(virDomainControllerModelSCSI) VIR_ENUM_DECL(virDomainControllerModelUSB) VIR_ENUM_DECL(virDomainControllerModelIDE) +VIR_ENUM_DECL(virDomainControllerModelVirtioSerial) VIR_ENUM_DECL(virDomainFS) VIR_ENUM_DECL(virDomainFSDriver) VIR_ENUM_DECL(virDomainFSAccessMode) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0838f2a406..1ddb4317f3 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -544,6 +544,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "virtio-input-host-pci-non-transitional", "virtio-scsi-pci-transitional", "virtio-scsi-pci-non-transitional", + + /* 345 */ + "virtio-serial-pci-transitional", + "virtio-serial-pci-non-transitional", ); @@ -1150,6 +1154,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { {"virtio-input-host-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_NON_TRANSITIONAL}, {"virtio-scsi-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL}, {"virtio-scsi-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL}, + {"virtio-serial-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_SERIAL_TRANSITIONAL}, + {"virtio-serial-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_SERIAL_NON_TRANSITIONAL}, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index d23bd251f2..0bb215130b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -529,6 +529,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL, /* -device virtio-scsi-pci-transitional */ QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL, /* -device virtio-scsi-pci-non-transitional */ + /* 345 */ + QEMU_CAPS_DEVICE_VIRTIO_SERIAL_TRANSITIONAL, /* -device virtio-serial-pci-transitional */ + QEMU_CAPS_DEVICE_VIRTIO_SERIAL_NON_TRANSITIONAL, /* -device virtio-serial-pci-non-transitional */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 50042b2919..940d55b1b1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -514,6 +514,12 @@ qemuBuildVirtioTransitional(virBufferPtr buf, tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL; ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL; break; + } else if (strstr(baseName, "serial")) { + has_tmodel = model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL; + has_ntmodel = model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL; + tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_TRANSITIONAL; + ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_NON_TRANSITIONAL; + break; } return 0; @@ -3026,7 +3032,10 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, break; case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL: - if (qemuBuildVirtioDevStr(&buf, "virtio-serial", def->info.type) < 0) + if (qemuBuildVirtioTransitional(&buf, "virtio-serial", qemuCaps, + def->info.type, + def->model, NULL, + VIR_DOMAIN_DEVICE_CONTROLLER) < 0) goto error; virBufferAsprintf(&buf, ",id=%s", def->info.alias); diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 9d07fa133e..50cc47b7b3 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -670,6 +670,8 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, break; case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL: + if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL) + return pciFlags; return virtioFlags; case VIR_DOMAIN_CONTROLLER_TYPE_FDC: diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index aa9a0d2d3b..aaf7d404eb 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -230,6 +230,8 @@ + + 3001050 0 446361 diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args index 6fea53fa6e..60ef581744 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args @@ -35,9 +35,12 @@ addr=0x1 \ -device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,\ multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \ +-device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \ -device virtio-scsi-pci,disable-legacy=on,id=scsi0,bus=pci.3,addr=0x0 \ +-device virtio-serial-pci,disable-legacy=on,id=virtio-serial0,bus=pci.4,\ +addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,disable-legacy=on,scsi=off,bus=pci.4,addr=0x0,\ +-device virtio-blk-pci,disable-legacy=on,scsi=off,bus=pci.5,addr=0x0,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,disable-legacy=on,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -46,15 +49,15 @@ bus=pci.1,addr=0x0 \ -device virtio-net-pci,disable-legacy=on,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \ -device virtio-input-host-pci,disable-legacy=on,id=input0,\ -evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.9,addr=0x0 \ -device vhost-scsi-pci,disable-legacy=on,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.5,addr=0x0 \ --device virtio-balloon-pci,disable-legacy=on,id=balloon0,bus=pci.6,addr=0x0 \ +id=hostdev0,bus=pci.6,addr=0x0 \ +-device virtio-balloon-pci,disable-legacy=on,id=balloon0,bus=pci.7,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,disable-legacy=on,rng=objrng0,id=rng0,bus=pci.7,\ +-device virtio-rng-pci,disable-legacy=on,rng=objrng0,id=rng0,bus=pci.8,\ addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci,disable-legacy=on,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.9,addr=0x0 \ +bus=pci.10,addr=0x0 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args index ad644de35d..f9cc136f70 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -35,9 +35,12 @@ addr=0x1 \ -device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,\ multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \ +-device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \ -device virtio-scsi-pci-non-transitional,id=scsi0,bus=pci.3,addr=0x0 \ +-device virtio-serial-pci-non-transitional,id=virtio-serial0,bus=pci.4,\ +addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci-non-transitional,scsi=off,bus=pci.4,addr=0x0,\ +-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.5,addr=0x0,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci-non-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -46,14 +49,14 @@ bus=pci.1,addr=0x0 \ -device virtio-net-pci-non-transitional,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \ -device virtio-input-host-pci-non-transitional,id=input0,\ -evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.9,addr=0x0 \ -device vhost-scsi-pci-non-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.5,addr=0x0 \ --device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.6,addr=0x0 \ +id=hostdev0,bus=pci.6,addr=0x0 \ +-device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.7,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.7,addr=0x0 \ +-device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.8,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci-non-transitional,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.9,addr=0x0 \ +bus=pci.10,addr=0x0 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml index 03273dc2d9..a269658520 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -30,6 +30,7 @@ + diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args index e8b3712acb..e495ab3747 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args @@ -28,8 +28,9 @@ addr=0x1 \ -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \ -device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \ -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x3 \ +-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x4 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x4,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x5,drive=drive-virtio-disk0,\ id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \ @@ -37,13 +38,13 @@ id=virtio-disk0,bootindex=1 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bus=pci.2,\ addr=0x2 \ -device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234,bus=pci.2,\ -addr=0x8 \ +addr=0x9 \ -device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\ -bus=pci.2,addr=0x5 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 \ +bus=pci.2,addr=0x6 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x7 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x8 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ --device vhost-vsock-pci,id=vsock0,guest-cid=4,vhostfd=6789,bus=pci.2,addr=0x9 \ +-device vhost-vsock-pci,id=vsock0,guest-cid=4,vhostfd=6789,bus=pci.2,addr=0xa \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 95d20f8579..506cca1107 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -28,8 +28,9 @@ addr=0x1 \ -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \ -device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \ -device virtio-scsi-pci-transitional,id=scsi0,bus=pci.2,addr=0x3 \ +-device virtio-serial-pci-transitional,id=virtio-serial0,bus=pci.2,addr=0x4 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x4,\ +-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x5,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -38,14 +39,14 @@ bus=pci.2,addr=0x1 \ -device virtio-net-pci-transitional,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x2 \ -device virtio-input-host-pci-transitional,id=input0,\ -evdev=/dev/input/event1234,bus=pci.2,addr=0x8 \ +evdev=/dev/input/event1234,bus=pci.2,addr=0x9 \ -device vhost-scsi-pci-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.2,addr=0x5 \ --device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x6 \ +id=hostdev0,bus=pci.2,addr=0x6 \ +-device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x7 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ +-device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x8 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci-transitional,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.2,addr=0x9 \ +bus=pci.2,addr=0xa \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml index 1616cb137b..ac9ae43ef6 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -30,6 +30,7 @@ + diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml index 56b673d7fa..e00962d513 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -18,11 +18,14 @@ -
+
+ +
+
@@ -78,6 +81,11 @@
+ + + +
+ @@ -90,24 +98,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml index cf6c43bcb0..af02183fe2 100644 --- a/tests/qemuxml2xmloutdata/virtio-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -18,11 +18,14 @@ -
+
+ +
+
@@ -54,24 +57,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+