xref: /qemu/include/hw/qdev-properties-system.h (revision eea1e5c9d6fac211cf3fe2d3d7f3be2bf767d421)
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;
10*eea1e5c9SSteve 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;
27ce35e229SEduardo Habkost 
28ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d)                   \
29ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t)
30ce35e229SEduardo Habkost 
31ce35e229SEduardo Habkost #define DEFINE_PROP_CHR(_n, _s, _f)             \
32ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend)
33ce35e229SEduardo Habkost #define DEFINE_PROP_NETDEV(_n, _s, _f)             \
34ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers)
35ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE(_n, _s, _f) \
36ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *)
37ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \
38ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *)
39ce35e229SEduardo Habkost #define DEFINE_PROP_MACADDR(_n, _s, _f)         \
40ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr)
41ce35e229SEduardo Habkost #define DEFINE_PROP_RESERVED_REGION(_n, _s, _f)         \
42ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion)
43ce35e229SEduardo Habkost #define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \
44ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \
45ce35e229SEduardo Habkost                        MultiFDCompression)
46*eea1e5c9SSteve Sistare #define DEFINE_PROP_MIG_MODE(_n, _s, _f, _d) \
47*eea1e5c9SSteve Sistare     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_mig_mode, \
48*eea1e5c9SSteve Sistare                        MigMode)
49ce35e229SEduardo Habkost #define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \
50ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \
51ce35e229SEduardo Habkost                         LostTickPolicy)
52ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \
53ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \
54ce35e229SEduardo Habkost                         BlockdevOnError)
55ce35e229SEduardo Habkost #define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \
56ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int)
57ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \
58ce35e229SEduardo Habkost     DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t)
59ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \
60ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress)
61ce35e229SEduardo Habkost #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \
62ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \
63ce35e229SEduardo Habkost                         OffAutoPCIBAR)
64ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \
65ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \
66ce35e229SEduardo Habkost                         PCIExpLinkSpeed)
67ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \
68ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \
69ce35e229SEduardo Habkost                         PCIExpLinkWidth)
70ce35e229SEduardo Habkost 
7145efa07fSEduardo Habkost #define DEFINE_PROP_UUID(_name, _state, _field) \
7245efa07fSEduardo Habkost     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID, \
7345efa07fSEduardo Habkost                 .set_default = true)
7445efa07fSEduardo Habkost 
75ce35e229SEduardo Habkost #define DEFINE_PROP_AUDIODEV(_n, _s, _f) \
76ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard)
77ce35e229SEduardo Habkost 
7845efa07fSEduardo Habkost #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \
7945efa07fSEduardo Habkost     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)
80ce35e229SEduardo Habkost 
815de1aff2SPierre Morel #define DEFINE_PROP_CPUS390ENTITLEMENT(_n, _s, _f, _d) \
825de1aff2SPierre Morel     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_cpus390entitlement, \
835de1aff2SPierre Morel                        CpuS390Entitlement)
84ce35e229SEduardo Habkost 
85ce35e229SEduardo Habkost #endif
86