From nobody Sun Feb 8 10:03:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1582467414; cv=none; d=zohomail.com; s=zohoarc; b=O/9NxN9Qx7DBMbHnZh0xGmoFdwhjKbbv711lR/3OCkpVZC1GazwJd6dr9+TK2Tfhm0kZabh91H+zaM5YQxC9FiBjaDyrtutePHwi8QkDHdzyAj8XINJy65HwSeZ8MY32B+RXVnMARqYQ4+TcGZaevg7bo8m89dGMgJYN7Y94VaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582467414; 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=qf6O2gGst/j0FiisdRgvVBB/yTcHkk+1Chc3rdZOlhA=; b=YzeQmTbKtdw5HnHK1Gy/EiazVvz7m4VuOu4FDpuAz/VRvI5W60u/jJCE1kdALmiQDScFVtcqDnazm/nBZz3ourOGa5i8TtvyVM/Xb9tkFuDtLiQySRVoNN9FeH3iuKllyFhsTvQFJKArdONUHU2xn8ap+iFvnCzSHgbm0VRreBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1582467414067318.71591867324; Sun, 23 Feb 2020 06:16:54 -0800 (PST) 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-298-Ub9xjTLRNYut-rv-iUf69g-1; Sun, 23 Feb 2020 09:16:50 -0500 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 9AF8B801E5C; Sun, 23 Feb 2020 14:16:44 +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 7497290769; Sun, 23 Feb 2020 14:16:44 +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 2FC6518089CF; Sun, 23 Feb 2020 14:16:44 +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 01NEGge5006771 for ; Sun, 23 Feb 2020 09:16:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 92B329078A; Sun, 23 Feb 2020 14:16:42 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-20.brq.redhat.com [10.40.200.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id E21BD90769 for ; Sun, 23 Feb 2020 14:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582467413; 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=qf6O2gGst/j0FiisdRgvVBB/yTcHkk+1Chc3rdZOlhA=; b=gKyLwWXjLVjXoF1Hc1E+zfWQrj+/XnnTIcmjjhwXbhkwlWyQyrIWe66flKwhnQ0NQQ3Gbt 7oleXDvgBof+X3qUYfpvLDpe4J6tf1yhuTZ0EFu1sQ1kmR1Y/uw8cxUKaoXVrN5s3r0b+r a2XDRaHIs0R+ExXSJwckEz+Frepi+xw= X-MC-Unique: Ub9xjTLRNYut-rv-iUf69g-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/4] virhostdev: move to src/hypervisor Date: Sun, 23 Feb 2020 15:16:33 +0100 Message-Id: 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 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 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" This module depends on domain_conf and is used directly by various hypervisor drivers. Move it to src/hypervisor. Signed-off-by: J=C3=A1n Tomko --- build-aux/syntax-check.mk | 2 +- po/POTFILES.in | 2 +- src/hypervisor/Makefile.inc.am | 2 + src/{util =3D> hypervisor}/virhostdev.c | 0 src/{util =3D> hypervisor}/virhostdev.h | 0 src/libvirt_private.syms | 60 +++++++++++++-------------- src/libxl/Makefile.inc.am | 1 + src/util/Makefile.inc.am | 2 - tests/Makefile.am | 1 + 9 files changed, 36 insertions(+), 34 deletions(-) rename src/{util =3D> hypervisor}/virhostdev.c (100%) rename src/{util =3D> hypervisor}/virhostdev.h (100%) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index ba1874d347..7d521c1295 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -2119,7 +2119,7 @@ exclude_file_name_regexp--sc_prohibit_readdir =3D \ ^(tests/(.*mock|virfilewrapper)\.c|tools/nss/libvirt_nss\.c)$$ =20 exclude_file_name_regexp--sc_prohibit_cross_inclusion =3D \ - ^(src/util/virclosecallbacks\.h|src/util/virhostdev\.h)$$ + ^(src/util/virclosecallbacks\.h)$$ =20 exclude_file_name_regexp--sc_prohibit_dirent_d_type =3D \ ^(src/util/vircgroup.c)$ diff --git a/po/POTFILES.in b/po/POTFILES.in index 1675c45206..975de75037 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -80,6 +80,7 @@ @SRCDIR@/src/hyperv/hyperv_wmi.c @SRCDIR@/src/hypervisor/domain_cgroup.c @SRCDIR@/src/hypervisor/domain_driver.c +@SRCDIR@/src/hypervisor/virhostdev.c @SRCDIR@/src/interface/interface_backend_netcf.c @SRCDIR@/src/interface/interface_backend_udev.c @SRCDIR@/src/internal.h @@ -250,7 +251,6 @@ @SRCDIR@/src/util/virhash.c @SRCDIR@/src/util/virhook.c @SRCDIR@/src/util/virhostcpu.c -@SRCDIR@/src/util/virhostdev.c @SRCDIR@/src/util/virhostmem.c @SRCDIR@/src/util/virhostuptime.c @SRCDIR@/src/util/viridentity.c diff --git a/src/hypervisor/Makefile.inc.am b/src/hypervisor/Makefile.inc.am index 02cf2c7cb1..3bd775a4a5 100644 --- a/src/hypervisor/Makefile.inc.am +++ b/src/hypervisor/Makefile.inc.am @@ -5,6 +5,8 @@ HYPERVISOR_SOURCES =3D \ hypervisor/domain_cgroup.c \ hypervisor/domain_driver.h \ hypervisor/domain_driver.c \ + hypervisor/virhostdev.h \ + hypervisor/virhostdev.c \ $(NULL) =20 noinst_LTLIBRARIES +=3D libvirt_hypervisor.la diff --git a/src/util/virhostdev.c b/src/hypervisor/virhostdev.c similarity index 100% rename from src/util/virhostdev.c rename to src/hypervisor/virhostdev.c diff --git a/src/util/virhostdev.h b/src/hypervisor/virhostdev.h similarity index 100% rename from src/util/virhostdev.h rename to src/hypervisor/virhostdev.h diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 05e1bc875b..85b1eca72f 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1406,6 +1406,36 @@ virDomainDriverParseBlkioDeviceStr; virDomainDriverSetupPersistentDefBlkioParams; =20 =20 +# hypervisor/virhostdev.h +virHostdevFindUSBDevice; +virHostdevManagerGetDefault; +virHostdevPCINodeDeviceDetach; +virHostdevPCINodeDeviceReAttach; +virHostdevPCINodeDeviceReset; +virHostdevPrepareDomainDevices; +virHostdevPrepareMediatedDevices; +virHostdevPrepareNVMeDevices; +virHostdevPrepareOneNVMeDevice; +virHostdevPreparePCIDevices; +virHostdevPrepareSCSIDevices; +virHostdevPrepareSCSIVHostDevices; +virHostdevPrepareUSBDevices; +virHostdevReAttachDomainDevices; +virHostdevReAttachMediatedDevices; +virHostdevReAttachNVMeDevices; +virHostdevReAttachOneNVMeDevice; +virHostdevReAttachPCIDevices; +virHostdevReAttachSCSIDevices; +virHostdevReAttachSCSIVHostDevices; +virHostdevReAttachUSBDevices; +virHostdevUpdateActiveDomainDevices; +virHostdevUpdateActiveMediatedDevices; +virHostdevUpdateActiveNVMeDevices; +virHostdevUpdateActivePCIDevices; +virHostdevUpdateActiveSCSIDevices; +virHostdevUpdateActiveUSBDevices; + + # libvirt_internal.h virConnectSupportsFeature; virDomainMigrateBegin3; @@ -2169,36 +2199,6 @@ virHostCPUHasBitmap; virHostCPUStatsAssign; =20 =20 -# util/virhostdev.h -virHostdevFindUSBDevice; -virHostdevManagerGetDefault; -virHostdevPCINodeDeviceDetach; -virHostdevPCINodeDeviceReAttach; -virHostdevPCINodeDeviceReset; -virHostdevPrepareDomainDevices; -virHostdevPrepareMediatedDevices; -virHostdevPrepareNVMeDevices; -virHostdevPrepareOneNVMeDevice; -virHostdevPreparePCIDevices; -virHostdevPrepareSCSIDevices; -virHostdevPrepareSCSIVHostDevices; -virHostdevPrepareUSBDevices; -virHostdevReAttachDomainDevices; -virHostdevReAttachMediatedDevices; -virHostdevReAttachNVMeDevices; -virHostdevReAttachOneNVMeDevice; -virHostdevReAttachPCIDevices; -virHostdevReAttachSCSIDevices; -virHostdevReAttachSCSIVHostDevices; -virHostdevReAttachUSBDevices; -virHostdevUpdateActiveDomainDevices; -virHostdevUpdateActiveMediatedDevices; -virHostdevUpdateActiveNVMeDevices; -virHostdevUpdateActivePCIDevices; -virHostdevUpdateActiveSCSIDevices; -virHostdevUpdateActiveUSBDevices; - - # util/virhostmem.h virHostMemAllocPages; virHostMemGetCellsFree; diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index 4dc1b9d039..ff6a2b0f69 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -46,6 +46,7 @@ libvirt_driver_libxl_impl_la_CFLAGS =3D \ -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/secret \ + -I$(srcdir)/hypervisor \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_libxl_impl_la_LDFLAGS =3D $(AM_LDFLAGS) diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index fbe67090d3..a340fdeffb 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -92,8 +92,6 @@ UTIL_SOURCES =3D \ util/virhostcpu.c \ util/virhostcpu.h \ util/virhostcpupriv.h \ - util/virhostdev.c \ - util/virhostdev.h \ util/virhostmem.c \ util/virhostmem.h \ util/virhostuptime.c \ diff --git a/tests/Makefile.am b/tests/Makefile.am index ed5255b62d..bfb8e34378 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -22,6 +22,7 @@ AM_CPPFLAGS =3D \ -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_srcdir)/src/util \ -I$(top_srcdir)/src/conf \ + -I$(top_srcdir)/src/hypervisor \ -I$(top_builddir)/src/rpc \ $(NULL) =20 --=20 2.24.1