From: Yi Min Zhao Date: Thu, 8 Nov 2018 11:00:19 +0000 (+0800) Subject: conf: Add definitions for 'uid' and 'fid' PCI address attributes X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=30522c78c11d9ff6c6c177dfca4a0da8057095fe;p=libvirt.git conf: Add definitions for 'uid' and 'fid' PCI address attributes 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 --- diff --git a/cfg.mk b/cfg.mk index d0183c02ff..b108553ca8 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 16c2eded5e..4fd1828e9c 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -37,6 +37,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;