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