From nobody Thu Mar 28 12:48:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1593116330; cv=none; d=zohomail.com; s=zohoarc; b=h3jNiKxLjOvmthdh9aPo+U/SpJm5joT7eqCLDzm91xNvleXm8wqSCrsh3ssuqHE1gof5KxPb56OTxrhBm0/F6C4gkI/0hx3sOgyzAJYokOp7T2H1/cPTv8AyuAbHicNAJ7rg9UBLSP9NYAMk/Ws7VzL2L7hjkyIA/mkbkRWCox0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593116330; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rp1nubuz5S/pNoMhjcYNukRie1a6SAnYZZhfQ+8BFuM=; b=QHnhHRxj6bBbBX22ZBOfjGQCe+InwRAVBM6wzQmCAT8qE1Yij1RYJPlezXvOyFWZJiHrLizG27jIKpLacxphQPlEjn0iVWD5NiA+2xSsjv8A1PeIpY25V//6Gfy6jc4zahCDV5M48HkX2D+1CxRoNMrRZ8eIUAms7/FdgRyuC6E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1593116330702358.8701814876533; Thu, 25 Jun 2020 13:18:50 -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-477-G22JIUU4MY6XnrXyMSfdkQ-1; Thu, 25 Jun 2020 16:18:47 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6D5718FE861; Thu, 25 Jun 2020 20:18:41 +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 8829C5C1BB; Thu, 25 Jun 2020 20:18:41 +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 A58401809557; Thu, 25 Jun 2020 20:18:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05PKIcmE012001 for ; Thu, 25 Jun 2020 16:18:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id DE4AB8504; Thu, 25 Jun 2020 20:18:38 +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 00C2360C80; Thu, 25 Jun 2020 20:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593116329; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rp1nubuz5S/pNoMhjcYNukRie1a6SAnYZZhfQ+8BFuM=; b=OVV+yLAO6SyzFRBkMsgHs+3NijE9uO2QIdWqGbPmmocEStIJ6YG7c4xaiaQQgKICGDSvFP CG36TCp96uIenwdOWvxgOeIdN90PWf1hbKKJVWXvWmvQjyZd2eRg6KKFs4wJyAPvWD7QcP XG+MQj3DvbMzu2yyzUmlH5VxEn9e50w= X-MC-Unique: G22JIUU4MY6XnrXyMSfdkQ-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v3 1/2] qemu: ramfb video device doesn't support PCI address Date: Thu, 25 Jun 2020 15:18:22 -0500 Message-Id: <20200625201823.17424-2-jjongsma@redhat.com> In-Reply-To: <20200625201823.17424-1-jjongsma@redhat.com> References: <20200625201823.17424-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: laine@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.16 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: Laine Stump --- src/qemu/qemu_validate.c | 8 +++++ ...video-ramfb-display-device-pci-address.xml | 30 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 39 insertions(+) create mode 100644 tests/qemuxml2argvdata/video-ramfb-display-device-pci-a= ddress.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 5082a29dc7..b13c03759e 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1925,6 +1925,14 @@ qemuValidateDomainDeviceDefVideo(const virDomainVide= oDef *video, if (qemuValidateDomainVirtioOptions(video->virtio, qemuCaps) < 0) 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; + } + + return 0; } =20 diff --git a/tests/qemuxml2argvdata/video-ramfb-display-device-pci-address.= xml b/tests/qemuxml2argvdata/video-ramfb-display-device-pci-address.xml new file mode 100644 index 0000000000..db110560ac --- /dev/null +++ b/tests/qemuxml2argvdata/video-ramfb-display-device-pci-address.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i386 + + + + +
+ + +