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