From nobody Sun Feb 8 22:07:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1566311453; cv=none; d=zoho.com; s=zohoarc; b=ocERX0WMsm7YVCb59/R8BwQwSOTWRMAqSFtKpyTBM7len5jgErb2jAdlxFWWM6tl4RVJbtWEqcB0+2eeWDvXWoCX0oPBaRzdU+1yn1x62AEpTnyaJAvS3DvaDzZ93HpRKg13/8zmfR0kmNl8crSmF1dYHftu3iMPKfxAyG9Bleg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566311453; 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:ARC-Authentication-Results; bh=mb3ViuRzIXV9IUrOrWe3ex7arRwQkn7U/GdZiQ+Xc5s=; b=VzEASAiR2c3U1aHX4MxISjS+4gEGtc0iWuSt4bkXwj7Mdvb2rHsdIxFkyuX/vxgG2kMlsFzPHhf1q/2xOGsrmWSr0jd4G/3yXUHXYGYl0foq0qrP4PgjJAyywOMN9TTIJ/6jACnIL1iASEwHHHhtQpIlMaCytusMNMGvpM2moRg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566311453238640.6314605542357; Tue, 20 Aug 2019 07:30:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D644F3001A9A; Tue, 20 Aug 2019 14:30:51 +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 AED6410016EA; Tue, 20 Aug 2019 14:30:51 +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 73773180B536; Tue, 20 Aug 2019 14:30:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KEUnVT028803 for ; Tue, 20 Aug 2019 10:30:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E0B11F0; Tue, 20 Aug 2019 14:30:49 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BBB717AB5 for ; Tue, 20 Aug 2019 14:30:48 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 16:30:25 +0200 Message-Id: <65a4c7140f130cac3e3fe75cbc3d7911728d74b0.1566311075.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/12] virhostdev: Disable legacy kvm assignment 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 20 Aug 2019 14:30:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The KVM assignment is going to be removed shortly. Don't let the hostdev module configure it. Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko Tested-by: Daniel Henrique Barboza --- src/util/virhostdev.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index e3f48a9a2e..29e75ffc84 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -246,12 +246,16 @@ virHostdevGetPCIHostDevice(const virDomainHostdevDef = *hostdev, =20 virPCIDeviceSetManaged(actual, hostdev->managed); =20 - if (pcisrc->backend =3D=3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) + if (pcisrc->backend =3D=3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_VFIO); - else if (pcisrc->backend =3D=3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN) + } else if (pcisrc->backend =3D=3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN) { virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_XEN); - else - virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_KVM); + } else { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("pci backend driver '%s' is not supported"), + virDomainHostdevSubsysPCIBackendTypeToString(pcisrc= ->backend)); + return -1; + } =20 VIR_STEAL_PTR(*pci, actual); return 0; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list