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; 25ce35e229SEduardo Habkost 26ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d) \ 27ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t) 28ce35e229SEduardo Habkost 29ce35e229SEduardo Habkost #define DEFINE_PROP_CHR(_n, _s, _f) \ 30ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend) 31ce35e229SEduardo Habkost #define DEFINE_PROP_NETDEV(_n, _s, _f) \ 32ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers) 33ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE(_n, _s, _f) \ 34ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *) 35ce35e229SEduardo Habkost #define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \ 36ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *) 37ce35e229SEduardo Habkost #define DEFINE_PROP_MACADDR(_n, _s, _f) \ 38ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr) 39ce35e229SEduardo Habkost #define DEFINE_PROP_RESERVED_REGION(_n, _s, _f) \ 40ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion) 41ce35e229SEduardo Habkost #define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \ 42ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \ 43ce35e229SEduardo Habkost MultiFDCompression) 44ce35e229SEduardo Habkost #define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \ 45ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \ 46ce35e229SEduardo Habkost LostTickPolicy) 47ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \ 48ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \ 49ce35e229SEduardo Habkost BlockdevOnError) 50ce35e229SEduardo Habkost #define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \ 51ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int) 52ce35e229SEduardo Habkost #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \ 53ce35e229SEduardo Habkost DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t) 54ce35e229SEduardo Habkost #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \ 55ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress) 56ce35e229SEduardo Habkost #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \ 57ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \ 58ce35e229SEduardo Habkost OffAutoPCIBAR) 59ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \ 60ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \ 61ce35e229SEduardo Habkost PCIExpLinkSpeed) 62ce35e229SEduardo Habkost #define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \ 63ce35e229SEduardo Habkost DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \ 64ce35e229SEduardo Habkost PCIExpLinkWidth) 65ce35e229SEduardo Habkost 66*45efa07fSEduardo Habkost #define DEFINE_PROP_UUID(_name, _state, _field) \ 67*45efa07fSEduardo Habkost DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID, \ 68*45efa07fSEduardo Habkost .set_default = true) 69*45efa07fSEduardo Habkost 70ce35e229SEduardo Habkost #define DEFINE_PROP_AUDIODEV(_n, _s, _f) \ 71ce35e229SEduardo Habkost DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard) 72ce35e229SEduardo Habkost 73*45efa07fSEduardo Habkost #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \ 74*45efa07fSEduardo Habkost DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID) 75ce35e229SEduardo Habkost 76ce35e229SEduardo Habkost 77ce35e229SEduardo Habkost #endif 78