From nobody Sat Apr 27 03:53:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1593036388; cv=none; d=zohomail.com; s=zohoarc; b=As+dPg1yH0wtG9HuxgUeUGsb0PykRsUnKcy7zxHJ1aTZXsQnjWySKfvMDLt7POhC6zFKLbSb7JDkfz4zgXzCvZnO58ihSmQjxDDyC/jxhjfioAQRnP+SRYmfiprV3U2NbnTOr/osUre7J9SruittV6Jnn2DmVLinzpPWqMbV7Xs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593036388; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=3mDZv9j/vpg8Zbr8wWfDvEn+bVuT2cz1hQH+8BUF8xA=; b=UyuGZ1tbuF3jS2WmA01V4JJrWwkCTHR9VmMek3j18iUvdLLj4ERkYA1xO5H3B1l3LkKd2Z5fmHggtgXn+iVJurLMkNIoPlIpBxz3lnpxQPNYPKX7JHTZeiDKdYLx1shlGGHysn961wTPF5eBvMflOYI1GVgW1FqB01m/iMwQJlU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 159303638873419.39058782043685; Wed, 24 Jun 2020 15:06:28 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-4-bSxlhyuTMXiLP7JD97VkLQ-1; Wed, 24 Jun 2020 18:06:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88FF510059A6; Wed, 24 Jun 2020 22:06:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3001C5DAA0; Wed, 24 Jun 2020 22:06:19 +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 8F13D1809547; Wed, 24 Jun 2020 22:06:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05OM6F27006081 for ; Wed, 24 Jun 2020 18:06:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBC895DAA0; Wed, 24 Jun 2020 22:06:15 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-114-170.phx2.redhat.com [10.3.114.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF1275D9E7 for ; Wed, 24 Jun 2020 22:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593036387; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3mDZv9j/vpg8Zbr8wWfDvEn+bVuT2cz1hQH+8BUF8xA=; b=G3DpZR5F065n7rYEnuLCFvEB2ZhY3Lczv1TxkLsLFEVVibquK2zOKQlt+Krreb06f6R4Hi uo6OsBhFQj/9wIEhQT49avkmyuP492aDUwYZWwRZz8VIpvSuZwE1iXl0qstGkZT8kpCyWg 1ZbMlCTKO6U7kKMXjy9Bz2GTBBT1y8Q= X-MC-Unique: bSxlhyuTMXiLP7JD97VkLQ-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: ramfb video device doesn't support PCI address Date: Wed, 24 Jun 2020 17:06:12 -0500 Message-Id: <20200624220612.11422-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Although a ramfb video device is not a PCI device, we don't currently report an error for ramfb device definitions containing a PCI address. However, a guest configured with such a device will fail to start: # virsh start test1 error: Failed to start domain test1 error: internal error: qemu unexpectedly closed the monitor: 2020-06-16= T05:23:02.759221Z qemu-kvm: -device ramfb,id=3Dvideo0,bus=3Dpcie.0,addr=3D0= x1: Device 'ramfb' can't go on PCIE bus A better approach is to reject any device definitions that contain PCI addresses. While this is a change in behavior, any existing configurations were non-functional. https://bugzilla.redhat.com/show_bug.cgi?id=3D1847259 Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 7 +++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fc7fcfb0c6..1a06cb3f4b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6608,6 +6608,13 @@ virDomainVideoDefValidate(const virDomainVideoDef *v= ideo, return -1; } =20 + if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_RAMFB && + video->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("'address' is not supported for 'ramfb' video dev= ices")); + return -1; + } + /* it doesn't make sense to pair video device type 'none' with any oth= er * types, there can be only a single video device in such case */ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1195f9c982..f2522fa530 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2276,6 +2276,7 @@ mymain(void) QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS); DO_TEST_CAPS_LATEST("video-bochs-display-device"); DO_TEST_CAPS_LATEST("video-ramfb-display-device"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("video-ramfb-display-device-pci-addres= s"); DO_TEST("video-none-device", QEMU_CAPS_VNC); DO_TEST_PARSE_ERROR("video-invalid-multiple-devices", NONE); --=20 2.21.3