From c3bbbdbf4b0fcb116ed9b6bae35971e354ab7e42 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 6 Feb 2018 11:08:26 -0700 Subject: qapi: Create DEFINE_PROP_OFF_AUTO_PCIBAR Add an option which allows the user to specify a PCI BAR number, including an 'off' and 'auto' selection. Cc: Markus Armbruster Cc: Eric Blake Tested-by: Alexey Kardashevskiy Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- include/hw/qdev-properties.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/qdev-properties.h') diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 5bbfec634b..1d61a35108 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -34,6 +34,7 @@ extern const PropertyInfo qdev_prop_pci_host_devaddr; extern const PropertyInfo qdev_prop_uuid; extern const PropertyInfo qdev_prop_arraylen; extern const PropertyInfo qdev_prop_link; +extern const PropertyInfo qdev_prop_off_auto_pcibar; #define DEFINE_PROP(_name, _state, _field, _prop, _type) { \ .name = (_name), \ @@ -214,6 +215,9 @@ extern const PropertyInfo qdev_prop_link; DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress) #define DEFINE_PROP_MEMORY_REGION(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, qdev_prop_ptr, MemoryRegion *) +#define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \ + DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \ + OffAutoPCIBAR) #define DEFINE_PROP_UUID(_name, _state, _field) { \ .name = (_name), \ -- cgit v1.2.3