1 #ifndef HW_QDEV_PROPERTIES_SYSTEM_H
2 #define HW_QDEV_PROPERTIES_SYSTEM_H
3 
4 #include "hw/qdev-properties.h"
5 
6 bool qdev_prop_sanitize_s390x_loadparm(uint8_t *loadparm, const char *str,
7                                        Error **errp);
8 
9 extern const PropertyInfo qdev_prop_chr;
10 extern const PropertyInfo qdev_prop_macaddr;
11 extern const PropertyInfo qdev_prop_reserved_region;
12 extern const PropertyInfo qdev_prop_multifd_compression;
13 extern const PropertyInfo qdev_prop_mig_mode;
14 extern const PropertyInfo qdev_prop_granule_mode;
15 extern const PropertyInfo qdev_prop_zero_page_detection;
16 extern const PropertyInfo qdev_prop_losttickpolicy;
17 extern const PropertyInfo qdev_prop_blockdev_on_error;
18 extern const PropertyInfo qdev_prop_bios_chs_trans;
19 extern const PropertyInfo qdev_prop_fdc_drive_type;
20 extern const PropertyInfo qdev_prop_drive;
21 extern const PropertyInfo qdev_prop_drive_iothread;
22 extern const PropertyInfo qdev_prop_netdev;
23 extern const PropertyInfo qdev_prop_pci_devfn;
24 extern const PropertyInfo qdev_prop_blocksize;
25 extern const PropertyInfo qdev_prop_pci_host_devaddr;
26 extern const PropertyInfo qdev_prop_uuid;
27 extern const PropertyInfo qdev_prop_audiodev;
28 extern const PropertyInfo qdev_prop_off_auto_pcibar;
29 extern const PropertyInfo qdev_prop_pcie_link_speed;
30 extern const PropertyInfo qdev_prop_pcie_link_width;
31 extern const PropertyInfo qdev_prop_cpus390entitlement;
32 extern const PropertyInfo qdev_prop_iothread_vq_mapping_list;
33 
34 #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d)                   \
35     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t)
36 
37 #define DEFINE_PROP_CHR(_n, _s, _f)             \
38     DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend)
39 #define DEFINE_PROP_NETDEV(_n, _s, _f)             \
40     DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers)
41 #define DEFINE_PROP_DRIVE(_n, _s, _f) \
42     DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *)
43 #define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \
44     DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *)
45 #define DEFINE_PROP_MACADDR(_n, _s, _f)         \
46     DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr)
47 #define DEFINE_PROP_RESERVED_REGION(_n, _s, _f)         \
48     DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion)
49 #define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \
50     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \
51                        MultiFDCompression)
52 #define DEFINE_PROP_MIG_MODE(_n, _s, _f, _d) \
53     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_mig_mode, \
54                        MigMode)
55 #define DEFINE_PROP_GRANULE_MODE(_n, _s, _f, _d) \
56     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_granule_mode, GranuleMode)
57 #define DEFINE_PROP_ZERO_PAGE_DETECTION(_n, _s, _f, _d) \
58     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_zero_page_detection, \
59                        ZeroPageDetection)
60 #define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \
61     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \
62                         LostTickPolicy)
63 #define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \
64     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \
65                         BlockdevOnError)
66 #define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \
67     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int)
68 #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \
69     DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t)
70 #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \
71     DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress)
72 #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \
73     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \
74                         OffAutoPCIBAR)
75 #define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \
76     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \
77                         PCIExpLinkSpeed)
78 #define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \
79     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \
80                         PCIExpLinkWidth)
81 
82 #define DEFINE_PROP_UUID(_name, _state, _field) \
83     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID, \
84                 .set_default = true)
85 
86 #define DEFINE_PROP_AUDIODEV(_n, _s, _f) \
87     DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard)
88 
89 #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \
90     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)
91 
92 #define DEFINE_PROP_CPUS390ENTITLEMENT(_n, _s, _f, _d) \
93     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_cpus390entitlement, \
94                        S390CpuEntitlement)
95 
96 #define DEFINE_PROP_IOTHREAD_VQ_MAPPING_LIST(_name, _state, _field) \
97     DEFINE_PROP(_name, _state, _field, qdev_prop_iothread_vq_mapping_list, \
98                 IOThreadVirtQueueMappingList *)
99 
100 #endif
101