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