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 --- hw/core/qdev-properties.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hw/core') diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 24c17800e3..5bbc2d98b5 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1317,3 +1317,14 @@ const PropertyInfo qdev_prop_link = { .name = "link", .create = create_link_property, }; + +/* --- OffAutoPCIBAR off/auto/bar0/bar1/bar2/bar3/bar4/bar5 --- */ + +const PropertyInfo qdev_prop_off_auto_pcibar = { + .name = "OffAutoPCIBAR", + .description = "off/auto/bar0/bar1/bar2/bar3/bar4/bar5", + .enum_table = &OffAutoPCIBAR_lookup, + .get = get_enum, + .set = set_enum, + .set_default_value = set_default_value_enum, +}; -- cgit v1.2.1