From nobody Mon Feb 9 09:28:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1618836012; cv=none; d=zohomail.com; s=zohoarc; b=CIOfdPPHZsZBZqYu9x9oSPErSm24qfRtV8A23/ApmZb6lN3dTU7Z5y1/icVo28ncCjPozLojkoRypu87kFkl7hkzHpW6K70CkR/p1sxSQearOC+UtW1UFT68r/9FNVeayCZyb1rky4Z2zsY+GRxygGTllYZOqk/+R7ptv3BUCc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618836012; h=Content-Type:Content-Transfer-Encoding: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=CH3CdXoH1evGOaMuFiUOgZlPEWfoIVFAyNFD7Coe1O4=; b=WMIuxzQDIZKJAsPcAJH0yD70RD81GNNvRdABQ77U/Wo4MwhKDv+lz8Gi05tkNWbVMtucosZLSQiG3JGVmJIIFNB8MV/Xr9OlMiNddicixZXrV6e0Y6OOrrn4IMoVZfaStSDK+n8W5RIyIp6Dqa03yAap+54QDv9kYWldh1YwFL8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618836012243358.00589534967844; Mon, 19 Apr 2021 05:40:12 -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-591-ATgD8VOBNyKEVZ7Aod31Lw-1; Mon, 19 Apr 2021 08:39:52 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 89997107ACE6; Mon, 19 Apr 2021 12:39:45 +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 6A75F60937; Mon, 19 Apr 2021 12:39:45 +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 307D455357; Mon, 19 Apr 2021 12:39:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13JCaR8O019297 for ; Mon, 19 Apr 2021 08:36:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 07A3019C79; Mon, 19 Apr 2021 12:36:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69A4519C66 for ; Mon, 19 Apr 2021 12:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618836011; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CH3CdXoH1evGOaMuFiUOgZlPEWfoIVFAyNFD7Coe1O4=; b=VHnm1aZ+fZ8cHIyYvBLusFU1LEb0WDkh+0lTP2FFDExtMg/4TYIPJlDQLGPXEqgJIJgynD g87LhjoAmh6somYcc5gJplTI94Lahjl+Xmp/xr+tBXp1qd6o59D1YUcSZY0nK+3W4VXPSX lJz3D1ar9yH2gTfpXYUtyFdrLH+2mIM= X-MC-Unique: ATgD8VOBNyKEVZ7Aod31Lw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 24/38] qemu_domain_address: Drop compatibility with pre-device vga specification for q35 Date: Mon, 19 Apr 2021 14:35:28 +0200 Message-Id: <4ac9a3c964339cb9777833ac82b752c87f5021e2.1618834490.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.13 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" Remove the slot reservation for the vga card which doesn't make sense with supported qemus any more for the q35 machine type. Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina Reviewed-by: Neal Gompa --- src/qemu/qemu_domain_address.c | 40 ++++------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index ca7d4a0938..8a2494947b 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1841,12 +1841,10 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDef = *def, static int qemuDomainValidateDevicePCISlotsQ35(virDomainDef *def, - virQEMUCaps *qemuCaps, virDomainPCIAddressSet *addrs) { size_t i; virPCIDeviceAddress tmp_addr; - bool qemuDeviceVideoUsable =3D virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVI= CE_VIDEO_PRIMARY); g_autofree char *addrStr =3D NULL; virDomainPCIConnectFlags flags =3D VIR_PCI_CONNECT_TYPE_PCIE_DEVICE; @@ -1979,45 +1977,15 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDef *d= ef, return -1; if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { - if (qemuDeviceVideoUsable) { - if (qemuDomainPCIAddressReserveNextAddr(addrs, - &primaryVideo-= >info) < 0) - return -1; - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("PCI address 0:0:1.0 is in use, " - "QEMU needs it for primary video")); + if (qemuDomainPCIAddressReserveNextAddr(addrs, + &primaryVideo->inf= o) < 0) return -1; - } } else { if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags= , 0) < 0) return -1; primaryVideo->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE= _PCI; primaryVideo->info.addr.pci =3D tmp_addr; } - } else if (!qemuDeviceVideoUsable) { - if (primaryVideo->info.addr.pci.domain !=3D 0 || - primaryVideo->info.addr.pci.bus !=3D 0 || - primaryVideo->info.addr.pci.slot !=3D 1 || - primaryVideo->info.addr.pci.function !=3D 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Primary video card must have PCI address= 0:0:1.0")); - return -1; - } - /* If TYPE =3D=3D PCI, then qemuDomainCollectPCIAddress() func= tion - * has already reserved the address, so we must skip */ - } - } else if (addrs->nbuses && !qemuDeviceVideoUsable) { - memset(&tmp_addr, 0, sizeof(tmp_addr)); - tmp_addr.slot =3D 1; - - if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { - VIR_DEBUG("PCI address 0:0:1.0 in use, future addition of a vi= deo" - " device will not be possible without manual" - " intervention"); - virResetLastError(); - } else if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags,= 0) < 0) { - return -1; } } @@ -2052,7 +2020,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDef *def, static int qemuDomainValidateDevicePCISlotsChipsets(virDomainDef *def, - virQEMUCaps *qemuCaps, + virQEMUCaps *qemuCaps G_GNUC_UNUS= ED, virDomainPCIAddressSet *addrs) { if (qemuDomainIsI440FX(def) && @@ -2061,7 +2029,7 @@ qemuDomainValidateDevicePCISlotsChipsets(virDomainDef= *def, } if (qemuDomainIsQ35(def) && - qemuDomainValidateDevicePCISlotsQ35(def, qemuCaps, addrs) < 0) { + qemuDomainValidateDevicePCISlotsQ35(def, addrs) < 0) { return -1; } --=20 2.30.2