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