xref: /openbmc/qemu/include/hw/i386/apic-msidef.h (revision e80a25611c67a93947ae99f4057b850410a54497)
10d09e41aSPaolo Bonzini #ifndef HW_APIC_MSIDEF_H
20d09e41aSPaolo Bonzini #define HW_APIC_MSIDEF_H
30d09e41aSPaolo Bonzini 
40d09e41aSPaolo Bonzini /*
50d09e41aSPaolo Bonzini  * Intel APIC constants: from include/asm/msidef.h
60d09e41aSPaolo Bonzini  */
70d09e41aSPaolo Bonzini 
80d09e41aSPaolo Bonzini /*
90d09e41aSPaolo Bonzini  * Shifts for MSI data
100d09e41aSPaolo Bonzini  */
110d09e41aSPaolo Bonzini 
120d09e41aSPaolo Bonzini #define MSI_DATA_VECTOR_SHIFT           0
130d09e41aSPaolo Bonzini #define  MSI_DATA_VECTOR_MASK           0x000000ff
140d09e41aSPaolo Bonzini 
150d09e41aSPaolo Bonzini #define MSI_DATA_DELIVERY_MODE_SHIFT    8
160d09e41aSPaolo Bonzini #define MSI_DATA_LEVEL_SHIFT            14
170d09e41aSPaolo Bonzini #define MSI_DATA_TRIGGER_SHIFT          15
180d09e41aSPaolo Bonzini 
190d09e41aSPaolo Bonzini /*
200d09e41aSPaolo Bonzini  * Shift/mask fields for msi address
210d09e41aSPaolo Bonzini  */
220d09e41aSPaolo Bonzini 
230d09e41aSPaolo Bonzini #define MSI_ADDR_DEST_MODE_SHIFT        2
240d09e41aSPaolo Bonzini 
250d09e41aSPaolo Bonzini #define MSI_ADDR_REDIRECTION_SHIFT      3
260d09e41aSPaolo Bonzini 
270d09e41aSPaolo Bonzini #define MSI_ADDR_DEST_ID_SHIFT          12
28cb135f59SPeter Xu #define MSI_ADDR_DEST_IDX_SHIFT         4
29*861fec45SChao Gao #define  MSI_ADDR_DEST_ID_MASK          0x000ff000
300d09e41aSPaolo Bonzini 
310d09e41aSPaolo Bonzini #endif /* HW_APIC_MSIDEF_H */
32