render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c313de
From dd083516c7057ee50e59290643634156daf0773b Mon Sep 17 00:00:00 2001
c313de
Message-Id: <dd083516c7057ee50e59290643634156daf0773b@dist-git>
c313de
From: Yi Min Zhao <zyimin@linux.ibm.com>
c313de
Date: Mon, 8 Apr 2019 10:57:18 +0200
c313de
Subject: [PATCH] conf: Add definitions for 'uid' and 'fid' PCI address
c313de
 attributes
c313de
MIME-Version: 1.0
c313de
Content-Type: text/plain; charset=UTF-8
c313de
Content-Transfer-Encoding: 8bit
c313de
c313de
Add zPCI definitions in preparation of extending the PCI address
c313de
with parameters uid (user-defined identifier) and fid (PCI function
c313de
identifier).
c313de
c313de
Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
c313de
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
c313de
Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
c313de
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
c313de
c313de
(cherry-picked from commit 30522c78c11d9ff6c6c177dfca4a0da8057095fe)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1508149
c313de
c313de
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
c313de
Message-Id: <20190408085732.28684-2-abologna@redhat.com>
c313de
Reviewed-by: Laine Stump <laine@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
---
c313de
 cfg.mk            | 1 +
c313de
 src/util/virpci.h | 7 +++++++
c313de
 2 files changed, 8 insertions(+)
c313de
c313de
diff --git a/cfg.mk b/cfg.mk
c313de
index e3e94bf6f0..7fd2b1dcb6 100644
c313de
--- a/cfg.mk
c313de
+++ b/cfg.mk
c313de
@@ -472,6 +472,7 @@ sc_prohibit_canonicalize_file_name:
c313de
 # Insist on correct types for [pug]id.
c313de
 sc_correct_id_types:
c313de
 	@prohibit='\<(int|long) *[pug]id\>' \
c313de
+	exclude='exempt from syntax-check' \
c313de
 	halt='use pid_t for pid, uid_t for uid, gid_t for gid' \
c313de
 	  $(_sc_search_regexp)
c313de
 
c313de
diff --git a/src/util/virpci.h b/src/util/virpci.h
c313de
index 794b7e59db..01df652b86 100644
c313de
--- a/src/util/virpci.h
c313de
+++ b/src/util/virpci.h
c313de
@@ -36,6 +36,13 @@ typedef virPCIDeviceAddress *virPCIDeviceAddressPtr;
c313de
 typedef struct _virPCIDeviceList virPCIDeviceList;
c313de
 typedef virPCIDeviceList *virPCIDeviceListPtr;
c313de
 
c313de
+typedef struct _virZPCIDeviceAddress virZPCIDeviceAddress;
c313de
+typedef virZPCIDeviceAddress *virZPCIDeviceAddressPtr;
c313de
+struct _virZPCIDeviceAddress {
c313de
+    unsigned int uid; /* exempt from syntax-check */
c313de
+    unsigned int fid;
c313de
+};
c313de
+
c313de
 struct _virPCIDeviceAddress {
c313de
     unsigned int domain;
c313de
     unsigned int bus;
c313de
-- 
c313de
2.22.0
c313de