Re: [libvirt] [PATCH v7 01/14] conf: Add definitions for 'uid' and 'fid' PCI address attributes

2018-11-05 Thread Andrea Bolognani
On Fri, 2018-10-19 at 11:40 +0800, Yi Min Zhao wrote:
>  struct _virPCIDeviceAddress {
>  unsigned int domain;
>  unsigned int bus;
>  unsigned int slot;
>  unsigned int function;
>  int multi; /* virTristateSwitch */
> +virZPCIDeviceAddress zpci;

Laine pointed out that it's weird that 'zpci' is not added in the
same patch as 'extFlags', and more specifically that the former is
introduced before the latter.

I believe I pointed out the same thing at some point, or at least
I though about doing so :) Now that it's two people noticing the
same, I guess it would be nice to address it. Shouldn't be hard at
all... Can you please take care of it?

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH v7 01/14] conf: Add definitions for 'uid' and 'fid' PCI address attributes

2018-10-18 Thread Yi Min Zhao
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 
---
 cfg.mk| 1 +
 src/util/virpci.h | 8 
 2 files changed, 9 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 4790d0b7e7..1fc6a2dabb 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..4cc9298d85 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -37,12 +37,20 @@ 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;
 unsigned int slot;
 unsigned int function;
 int multi; /* virTristateSwitch */
+virZPCIDeviceAddress zpci;
 };
 
 typedef enum {
-- 
Yi Min

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list