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_losttickpolicy; 11 extern const PropertyInfo qdev_prop_blockdev_on_error; 12 extern const PropertyInfo qdev_prop_bios_chs_trans; 13 extern const PropertyInfo qdev_prop_fdc_drive_type; 14 extern const PropertyInfo qdev_prop_drive; 15 extern const PropertyInfo qdev_prop_drive_iothread; 16 extern const PropertyInfo qdev_prop_netdev; 17 extern const PropertyInfo qdev_prop_pci_devfn; 18 extern const PropertyInfo qdev_prop_blocksize; 19 extern const PropertyInfo qdev_prop_pci_host_devaddr; 20 extern const PropertyInfo qdev_prop_uuid; 21 extern const PropertyInfo qdev_prop_audiodev; 22 extern const PropertyInfo qdev_prop_off_auto_pcibar; 23 extern const PropertyInfo qdev_prop_pcie_link_speed; 24 extern const PropertyInfo qdev_prop_pcie_link_width; 25 26 #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d) \ 27 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t) 28 29 #define DEFINE_PROP_CHR(_n, _s, _f) \ 30 DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharBackend) 31 #define DEFINE_PROP_NETDEV(_n, _s, _f) \ 32 DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, NICPeers) 33 #define DEFINE_PROP_DRIVE(_n, _s, _f) \ 34 DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockBackend *) 35 #define DEFINE_PROP_DRIVE_IOTHREAD(_n, _s, _f) \ 36 DEFINE_PROP(_n, _s, _f, qdev_prop_drive_iothread, BlockBackend *) 37 #define DEFINE_PROP_MACADDR(_n, _s, _f) \ 38 DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr) 39 #define DEFINE_PROP_RESERVED_REGION(_n, _s, _f) \ 40 DEFINE_PROP(_n, _s, _f, qdev_prop_reserved_region, ReservedRegion) 41 #define DEFINE_PROP_MULTIFD_COMPRESSION(_n, _s, _f, _d) \ 42 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_multifd_compression, \ 43 MultiFDCompression) 44 #define DEFINE_PROP_LOSTTICKPOLICY(_n, _s, _f, _d) \ 45 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_losttickpolicy, \ 46 LostTickPolicy) 47 #define DEFINE_PROP_BLOCKDEV_ON_ERROR(_n, _s, _f, _d) \ 48 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_blockdev_on_error, \ 49 BlockdevOnError) 50 #define DEFINE_PROP_BIOS_CHS_TRANS(_n, _s, _f, _d) \ 51 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_bios_chs_trans, int) 52 #define DEFINE_PROP_BLOCKSIZE(_n, _s, _f) \ 53 DEFINE_PROP_UNSIGNED(_n, _s, _f, 0, qdev_prop_blocksize, uint32_t) 54 #define DEFINE_PROP_PCI_HOST_DEVADDR(_n, _s, _f) \ 55 DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress) 56 #define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \ 57 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \ 58 OffAutoPCIBAR) 59 #define DEFINE_PROP_PCIE_LINK_SPEED(_n, _s, _f, _d) \ 60 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_speed, \ 61 PCIExpLinkSpeed) 62 #define DEFINE_PROP_PCIE_LINK_WIDTH(_n, _s, _f, _d) \ 63 DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pcie_link_width, \ 64 PCIExpLinkWidth) 65 66 #define DEFINE_PROP_UUID(_name, _state, _field) { \ 67 .name = (_name), \ 68 .info = &qdev_prop_uuid, \ 69 .offset = offsetof(_state, _field) \ 70 + type_check(QemuUUID, typeof_field(_state, _field)), \ 71 .set_default = true, \ 72 } 73 #define DEFINE_PROP_AUDIODEV(_n, _s, _f) \ 74 DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard) 75 76 #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) { \ 77 .name = (_name), \ 78 .info = &qdev_prop_uuid, \ 79 .offset = offsetof(_state, _field) \ 80 + type_check(QemuUUID, typeof_field(_state, _field)), \ 81 } 82 83 84 #endif 85