aboutsummaryrefslogtreecommitdiff
path: root/include/hw/pci
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2016-12-21 16:21:30 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-01-10 07:02:52 +0200
commit33848ceed79679b5c9e558b768447af2614b8db2 (patch)
treed1f85e6c26a1bd748a92429496d6d193f1f18ebe /include/hw/pci
parent02ed3e7c1665205ddae052774d6f26c71d3d9b30 (diff)
pcie_aer: Convert pcie_aer_init to Error
When user specify invalid value for property aer_log_max, device should fail to create, and report appropriate message. Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Dmitry Fleytman <dmitry@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r--include/hw/pci/pcie_aer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/pci/pcie_aer.h b/include/hw/pci/pcie_aer.h
index c2ee4e2bdb..5891b6816e 100644
--- a/include/hw/pci/pcie_aer.h
+++ b/include/hw/pci/pcie_aer.h
@@ -44,7 +44,6 @@ struct PCIEAERLog {
*/
#define PCIE_AER_LOG_MAX_DEFAULT 8
#define PCIE_AER_LOG_MAX_LIMIT 128
-#define PCIE_AER_LOG_MAX_UNSET 0xffff
uint16_t log_max;
/* Error log. log_max-sized array */
@@ -87,7 +86,8 @@ struct PCIEAERErr {
extern const VMStateDescription vmstate_pcie_aer_log;
-int pcie_aer_init(PCIDevice *dev, uint16_t offset, uint16_t size);
+int pcie_aer_init(PCIDevice *dev, uint16_t offset, uint16_t size,
+ Error **errp);
void pcie_aer_exit(PCIDevice *dev);
void pcie_aer_write_config(PCIDevice *dev,
uint32_t addr, uint32_t val, int len);