From nobody Sun Feb 8 11:25:54 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1561577963; cv=none; d=zoho.com; s=zohoarc; b=NVCjfuMLTkBrjmh7owZSSJoKZuqNL5VMbYwhmW+wgILSkO/5YXy1C2kwudanPrFewWEnceAYG0QlLDLrD0rFxEVluFHDSHdcVK48IfLar/yWMq/gyk4c8TpO0JPBxL800WFnY8tt6Gt+Rq1PEq5+wlrIvYOZMEWzsRlHOMVOnUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561577963; 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:ARC-Authentication-Results; bh=gQLjkTYVTzrH/Ab7IIwrm0ZGB+D4qRavJeS+1dNsFI4=; b=HOWHodguyXs8zgxZdN6zZf5KWw73yZnG4MASJ/7UmEFLqccii0qhw02FN+PWoUPV09IlRL9ErEgRvdfBn6y6r11/c8ahoj0e3Cg0rgSJwAQtIgtEr2Ziy2A0vMiX2QSEWykvbvApWERIzp6i3HcsXR9EPmR+3q6kiTBjgIcP++0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1561577963725662.3729523813176; Wed, 26 Jun 2019 12:39:23 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8964930860A3; Wed, 26 Jun 2019 19:39:16 +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 617315D9D6; Wed, 26 Jun 2019 19:39:16 +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 224EF206D6; Wed, 26 Jun 2019 19:39:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5QJaawu013160 for ; Wed, 26 Jun 2019 15:36:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5558B5C226; Wed, 26 Jun 2019 19:36:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DDC25C1B4; Wed, 26 Jun 2019 19:36:36 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 435E781F35; Wed, 26 Jun 2019 19:36:27 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id x18so2660732qkn.13; Wed, 26 Jun 2019 12:36:27 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:18:805:41b2:608e:c97b:9c84:d48f]) by smtp.gmail.com with ESMTPSA id k40sm10706658qta.50.2019.06.26.12.36.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 12:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eFZXi6mMgiYCXtgFxGmeqzKVFPOcBYc6L1P8XMBYRDY=; b=GjPcWfZRF6NpAbyv+UbEqtwN+RFG5HMDwH41ytic1yu3AtnkXJGy/DzBY8eX0eO9qC T5uEpsde8GVmYwLjxPGlg1maAiOawg7IugPTK4KKIqh9VcIwwGwdsK4+MN3MzNv/+TS4 PhzNPZn+wiljzcftNsdlHHODfY1iN0wm5PdRZdRAN63l2TSSiWMesE0FLR3YcRksBVJh wgxbeW75ZRZUwW8XieFndNMG6XlkjXUCSsN1cjAGPEjfoCLOXJ+X6vzLs4YLV9/VB5YE 3reX8tjGNR6FNUPd/rMt/H66C/Geehk5fghLQP2STit4sutwAVyVrtQmFY1zptRLM8fg MLvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eFZXi6mMgiYCXtgFxGmeqzKVFPOcBYc6L1P8XMBYRDY=; b=mxzGoCum/7ER0vl9C+PrM34OJZmKv+fyB1ahWMJ+6K1TUUlzwl72zO+gam8w4tukNG lNKgoiUAtdAPp9gVb7feX5M9q1U0I9vTAJY03xxjwS9Eo4c5sin2Fmaw5Ep//REonp/6 zzPboOdVOmv8x4lW4Vyticauv5biprxnLI9s7wzvhbkCOKaj+KIWb4ksyzBH6MjnIQY/ 1Ckzrd07hBzEFMmvCaA6rBZj2pgmCgytVkpnC41XmXtQgs8BI8W0jZqbCtJgvlQcie4+ ZvQLbp/vT60c0ErbJSJP8xOowVwUdVuEqkq1TB4wAcHR9R7bj/PzdpH5hwggFZp+Wbpy CH9Q== X-Gm-Message-State: APjAAAXFojI3cClaAWznDT31TqOybRQk9F2VuvXYRYiWn7raTMW0wZ+C mMXzFwoiCuxM8EHwdIpZDIuop0kbM6I= X-Google-Smtp-Source: APXvYqyYFTHn/UZN2PvS0ET1Hsh696X2KklfZsHt0EB3MMAGD6XATPkGekRBZcKd0H8VXRRqDpW0PQ== X-Received: by 2002:ae9:e41a:: with SMTP id q26mr5447623qkc.361.1561577782631; Wed, 26 Jun 2019 12:36:22 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Wed, 26 Jun 2019 16:35:56 -0300 Message-Id: <20190626193559.24431-8-danielhb413@gmail.com> In-Reply-To: <20190626193559.24431-1-danielhb413@gmail.com> References: <20190626193559.24431-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 26 Jun 2019 19:36:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 26 Jun 2019 19:36:27 +0000 (UTC) for IP:'209.85.222.195' DOMAIN:'mail-qk1-f195.google.com' HELO:'mail-qk1-f195.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.14 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.195 mail-qk1-f195.google.com 209.85.222.195 mail-qk1-f195.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, Daniel Henrique Barboza , laine@laine.org Subject: [libvirt] [PATCH v1 07/10] virpcitest: Change the stub driver to vfio from pci-stub 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 26 Jun 2019 19:39:22 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Shivaprasad G Bhat The pci-stub is obsolete for a while now. Upcoming test cases try to test the VFIO hotplug/unplug cases. Change the default test driver to vfio-pci instead of pci-stub, and fail bind for pci-stub instead. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- tests/virhostdevtest.c | 4 ++-- tests/virpcimock.c | 4 ++-- tests/virpcitest.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 20eaca82e0..99ee2d44ec 100644 --- a/tests/virhostdevtest.c +++ b/tests/virhostdevtest.c @@ -93,7 +93,7 @@ myInit(void) subsys.u.pci.addr.bus =3D 0; subsys.u.pci.addr.slot =3D i + 1; subsys.u.pci.addr.function =3D 0; - subsys.u.pci.backend =3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM; + subsys.u.pci.backend =3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO; hostdevs[i]->source.subsys =3D subsys; } =20 @@ -101,7 +101,7 @@ myInit(void) if (!(dev[i] =3D virPCIDeviceNew(0, 0, i + 1, 0))) goto cleanup; =20 - virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_KVM); + virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_VFIO); } =20 if (VIR_ALLOC(mgr) < 0) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index fc8cb92ebd..f9863b2b82 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -1023,8 +1023,8 @@ init_env(void) =20 MAKE_PCI_DRIVER("iwlwifi", 0x8086, 0x0044); MAKE_PCI_DRIVER("i915", 0x8086, 0x0046, 0x8086, 0x0047); - MAKE_PCI_DRIVER("pci-stub", -1, -1); - pci_driver_new("vfio-pci", PCI_ACTION_BIND, -1, -1); + pci_driver_new("pci-stub", PCI_ACTION_BIND, -1, -1); + MAKE_PCI_DRIVER("vfio-pci", -1, -1); =20 # define MAKE_PCI_DEVICE(Id, Vendor, Device, ...) \ do { \ diff --git a/tests/virpcitest.c b/tests/virpcitest.c index 9ecd1b7d27..3319ab3d6a 100644 --- a/tests/virpcitest.c +++ b/tests/virpcitest.c @@ -106,12 +106,12 @@ testVirPCIDeviceDetach(const void *opaque ATTRIBUTE_U= NUSED) if (!(dev[i] =3D virPCIDeviceNew(0, 0, i + 1, 0))) goto cleanup; =20 - virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_KVM); + virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_VFIO); =20 if (virPCIDeviceDetach(dev[i], activeDevs, inactiveDevs) < 0) goto cleanup; =20 - if (testVirPCIDeviceCheckDriver(dev[i], "pci-stub") < 0) + if (testVirPCIDeviceCheckDriver(dev[i], "vfio-pci") < 0) goto cleanup; =20 CHECK_LIST_COUNT(activeDevs, 0); @@ -245,7 +245,7 @@ testVirPCIDeviceDetachSingle(const void *opaque) if (!dev) goto cleanup; =20 - virPCIDeviceSetStubDriver(dev, VIR_PCI_STUB_DRIVER_KVM); + virPCIDeviceSetStubDriver(dev, VIR_PCI_STUB_DRIVER_VFIO); =20 if (virPCIDeviceDetach(dev, NULL, NULL) < 0) goto cleanup; @@ -405,7 +405,7 @@ mymain(void) /* Detach an unbound device */ DO_TEST_PCI_DRIVER(0, 0x0a, 2, 0, NULL); DO_TEST_PCI(testVirPCIDeviceDetachSingle, 0, 0x0a, 2, 0); - DO_TEST_PCI_DRIVER(0, 0x0a, 2, 0, "pci-stub"); + DO_TEST_PCI_DRIVER(0, 0x0a, 2, 0, "vfio-pci"); =20 /* Reattach an unknown unbound device */ DO_TEST_PCI_DRIVER(0, 0x0a, 3, 0, NULL); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list