xref: /qemu/include/hw/qdev-properties-system.h (revision 5de1aff2555275ef182197eddcadb276364ace38)
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;
10ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_losttickpolicy;
11ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_blockdev_on_error;
12ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_bios_chs_trans;
13ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_fdc_drive_type;
14ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_drive;
15ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_drive_iothread;
16ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_netdev;
17ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_pci_devfn;
18ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_blocksize;
19ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_pci_host_devaddr;
20ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_uuid;
21ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_audiodev;
22ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_off_auto_pcibar;
23ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_pcie_link_speed;
24ce35e229SEduardo Habkost extern const PropertyInfo qdev_prop_pcie_link_width;
25*5de1aff2SPierre Morel extern const PropertyInfo qdev_prop_cpus390entitlement;
26ce35e229SEduardo Habkost 
27ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d)                   \
28ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t)
29ce35e229SEduardo Habkost 
30ce35e229SEduardo Habkost #define DEFINE_PROP_CHR(_n, _s, _f)             \
31ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend)
32ce35e229SEduardo Habkost #define DEFINE_PROP_NETDEV(_n, _s, _f)             \
33ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers)
34ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE(_n, _s, _f) \
35ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *)
36ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \
37ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *)
38ce35e229SEduardo Habkost #define DEFINE_PROP_MACADDR(_n, _s, _f)         \
39ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr)
40ce35e229SEduardo Habkost #define DEFINE_PROP_RESERVED_REGION(_n, _s, _f)         \
41ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion)
42ce35e229SEduardo Habkost #define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \
43ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \
44ce35e229SEduardo Habkost                        MultiFDCompression)
45ce35e229SEduardo Habkost #define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \
46ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \
47ce35e229SEduardo Habkost                         LostTickPolicy)
48ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \
49ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \
50ce35e229SEduardo Habkost                         BlockdevOnError)
51ce35e229SEduardo Habkost #define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \
52ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int)
53ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \
54ce35e229SEduardo Habkost     DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t)
55ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \
56ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress)
57ce35e229SEduardo Habkost #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \
58ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \
59ce35e229SEduardo Habkost                         OffAutoPCIBAR)
60ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \
61ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \
62ce35e229SEduardo Habkost                         PCIExpLinkSpeed)
63ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \
64ce35e229SEduardo Habkost     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \
65ce35e229SEduardo Habkost                         PCIExpLinkWidth)
66ce35e229SEduardo Habkost 
6745efa07fSEduardo Habkost #define DEFINE_PROP_UUID(_name, _state, _field) \
6845efa07fSEduardo Habkost     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID, \
6945efa07fSEduardo Habkost                 .set_default = true)
7045efa07fSEduardo Habkost 
71ce35e229SEduardo Habkost #define DEFINE_PROP_AUDIODEV(_n, _s, _f) \
72ce35e229SEduardo Habkost     DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard)
73ce35e229SEduardo Habkost 
7445efa07fSEduardo Habkost #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \
7545efa07fSEduardo Habkost     DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)
76ce35e229SEduardo Habkost 
77*5de1aff2SPierre Morel #define DEFINE_PROP_CPUS390ENTITLEMENT(_n, _s, _f, _d) \
78*5de1aff2SPierre Morel     DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_cpus390entitlement, \
79*5de1aff2SPierre Morel                        CpuS390Entitlement)
80ce35e229SEduardo Habkost 
81ce35e229SEduardo Habkost #endif
82