Changeset 68470 in vbox for trunk/include
- Timestamp:
- Aug 18, 2017 2:05:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r67668 r68470 499 499 500 500 /** 501 * Registration record for MSI .501 * Registration record for MSI/MSI-X emulation. 502 502 */ 503 503 typedef struct PDMMSIREG … … 553 553 554 554 /** 555 * Initialize MSI support in a PCI device. 555 * Initialize MSI or MSI-X emulation support in a PCI device. 556 * 557 * This cannot handle all corner cases of the MSI/MSI-X spec, but for the 558 * vast majority of device emulation it covers everything necessary. It's 559 * fully automatic, taking care of all BAR and config space requirements, 560 * and interrupt delivery is done using PDMDevHlpPCISetIrq and friends. 561 * When MSI/MSI-X is enabled then the iIrq parameter is redefined to take 562 * the vector number (otherwise it has the usual INTA-D meaning for PCI). 563 * 564 * A device not using this can still offer MSI/MSI-X. In this case it's 565 * completely up to the device (in the MSI-X case) to create/register the 566 * necessary MMIO BAR, handle all config space/BAR updating and take care 567 * of delivering the interrupts appropriately. 556 568 * 557 569 * @returns VBox status code. 558 570 * @param pDevIns Device instance of the PCI Bus. 559 571 * @param pPciDev The PCI device structure. 560 * @param pMsiReg MSI registration structure572 * @param pMsiReg MSI emulation registration structure 561 573 * @remarks Caller enters the PDM critical section. 562 574 */ … … 1867 1879 /** Current PDMDEVHLPR3 version number. 1868 1880 * @todo Next major revision should add piBus to pfnPCIBusRegister, and move 1869 * pfnMMIOExReduce up to after pfnMMIOExUnmap. */ 1870 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 19, 2) 1881 * pfnMMIOExReduce up to after pfnMMIOExUnmap, and move 1882 * pfnIoApicSendMsi/pfnIoApicSendMsiNoWait up to after pfnISASetIrqNoWait. */ 1883 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 19, 3) 1871 1884 //#define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 20, 0) 1872 1885 … … 2678 2691 2679 2692 /** 2680 * Initialize MSI support for the given PCI device. 2693 * Initialize MSI or MSI-X emulation support for the given PCI device. 2694 * 2695 * @see PDMPCIBUSREG::pfnRegisterMsiR3 for details. 2681 2696 * 2682 2697 * @returns VBox status code. … … 2684 2699 * @param pPciDev The PCI device. NULL is an alias for the first 2685 2700 * one registered. 2686 * @param pMsiReg MSI registartion structure.2701 * @param pMsiReg MSI emulation registration structure. 2687 2702 */ 2688 2703 DECLR3CALLBACKMEMBER(int, pfnPCIRegisterMsi,(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PPDMMSIREG pMsiReg)); … … 2807 2822 * Attaches a driver (chain) to the device. 2808 2823 * 2809 * The first call for a LUN this will serve as a regist artion of the LUN. The pBaseInterface and2824 * The first call for a LUN this will serve as a registration of the LUN. The pBaseInterface and 2810 2825 * the pszDesc string will be registered with that LUN and kept around for PDMR3QueryDeviceLun(). 2811 2826 * … … 3276 3291 DECLR3CALLBACKMEMBER(int, pfnMMIOExReduce,(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cbRegion)); 3277 3292 3293 /** 3294 * Send an MSI straight to the I/O APIC. 3295 * 3296 * @param pDevIns PCI device instance. 3297 * @param GCPhys Physical address MSI request was written. 3298 * @param uValue Value written. 3299 * @thread Any thread, but will involve the emulation thread. 3300 */ 3301 DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue)); 3302 3303 /** 3304 * Send an MSI straight to the I/O APIC, but don't wait for EMT to process 3305 * the request when not called from EMT. 3306 * 3307 * @param pDevIns PCI device instance. 3308 * @param GCPhys Physical address MSI request was written. 3309 * @param uValue Value written. 3310 * @thread Any thread, but will involve the emulation thread. 3311 */ 3312 DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsiNoWait,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue)); 3313 3278 3314 /** Space reserved for future members. 3279 3315 * @{ */ 3280 DECLR3CALLBACKMEMBER(void, pfnReserved2,(void));3281 DECLR3CALLBACKMEMBER(void, pfnReserved3,(void));3282 3316 DECLR3CALLBACKMEMBER(void, pfnReserved4,(void)); 3283 3317 DECLR3CALLBACKMEMBER(void, pfnReserved5,(void)); … … 3710 3744 DECLRCCALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns)); 3711 3745 3746 /** 3747 * Send an MSI straight to the I/O APIC. 3748 * 3749 * @param pDevIns PCI device instance. 3750 * @param GCPhys Physical address MSI request was written. 3751 * @param uValue Value written. 3752 * @thread Any thread, but will involve the emulation thread. 3753 */ 3754 DECLRCCALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue)); 3755 3712 3756 /** Space reserved for future members. 3713 3757 * @{ */ 3714 DECLRCCALLBACKMEMBER(void, pfnReserved1,(void));3715 3758 DECLRCCALLBACKMEMBER(void, pfnReserved2,(void)); 3716 3759 DECLRCCALLBACKMEMBER(void, pfnReserved3,(void)); … … 3732 3775 typedef RCPTRTYPE(const struct PDMDEVHLPRC *) PCPDMDEVHLPRC; 3733 3776 3734 /** Current PDMDEVHLP version number. */ 3735 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 5, 0) 3777 /** Current PDMDEVHLP version number. 3778 * @todo Next major revision should move pfnIoApicSendMsi up to after pfnISASetIrq. */ 3779 #define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 5, 1) 3736 3780 3737 3781 … … 3969 4013 DECLR0CALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns)); 3970 4014 4015 /** 4016 * Send an MSI straight to the I/O APIC. 4017 * 4018 * @param pDevIns PCI device instance. 4019 * @param GCPhys Physical address MSI request was written. 4020 * @param uValue Value written. 4021 * @thread Any thread, but will involve the emulation thread. 4022 */ 4023 DECLR0CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue)); 4024 3971 4025 /** Space reserved for future members. 3972 4026 * @{ */ 3973 DECLR0CALLBACKMEMBER(void, pfnReserved1,(void));3974 4027 DECLR0CALLBACKMEMBER(void, pfnReserved2,(void)); 3975 4028 DECLR0CALLBACKMEMBER(void, pfnReserved3,(void)); … … 3991 4044 typedef R0PTRTYPE(const struct PDMDEVHLPR0 *) PCPDMDEVHLPR0; 3992 4045 3993 /** Current PDMDEVHLP version number. */ 3994 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 5, 0) 4046 /** Current PDMDEVHLP version number. 4047 * @todo Next major revision should move pfnIoApicSendMsi up to after pfnISASetIrq. */ 4048 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 5, 1) 3995 4049 3996 4050 … … 4780 4834 4781 4835 /** 4782 * Initialize MSI support for the first PCI device.4836 * Initialize MSI or MSI-X emulation support for the first PCI device. 4783 4837 * 4784 4838 * @returns VBox status code. 4785 4839 * @param pDevIns The device instance. 4786 * @param pMsiReg MSI registartion structure.4840 * @param pMsiReg MSI emulation registration structure. 4787 4841 */ 4788 4842 DECLINLINE(int) PDMDevHlpPCIRegisterMsi(PPDMDEVINS pDevIns, PPDMMSIREG pMsiReg) … … 4918 4972 } 4919 4973 4974 /** 4975 * @copydoc PDMDEVHLPR3::pfnIoApicSendMsi 4976 */ 4977 DECLINLINE(void) PDMDevHlpIoApicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue) 4978 { 4979 pDevIns->CTX_SUFF(pHlp)->pfnIoApicSendMsi(pDevIns, GCPhys, uValue); 4980 } 4981 4982 /** 4983 * @copydoc PDMDEVHLPR3::pfnIoApicSendMsiNoWait 4984 */ 4985 DECLINLINE(void) PDMDevHlpIoApicSendMsiNoWait(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue) 4986 { 4987 pDevIns->CTX_SUFF(pHlp)->pfnIoApicSendMsi(pDevIns, GCPhys, uValue); 4988 } 4989 4920 4990 #ifdef IN_RING3 4921 4991
Note:
See TracChangeset
for help on using the changeset viewer.