VirtualBox

Changeset 80704 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Sep 10, 2019 3:19:39 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133244
Message:

PDM,Devices: Changed PDM_DEVREG_FLAGS_MSI_X into a registration field giving the max MSI-X vector count config for the device (typically VBOX_MSIX_MAX_ENTRIES). bugref:9218

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r80703 r80704  
    35253525    /* .cbInstanceRC = */           0,
    35263526    /* .cMaxPciDevices = */         0,
     3527    /* .cMaxMsixVectors = */        0,
    35273528    /* .pszDescription = */         "Advanced Programmable Interrupt Controller",
    35283529#if defined(IN_RING3)
  • trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp

    r80701 r80704  
    3131#include <VBox/vmm/hm.h>
    3232#include <VBox/vmm/vmcc.h>
     33#include <VBox/vmm/gvmm.h>
    3334
    3435#include <VBox/log.h>
    3536#include <VBox/err.h>
    36 #include <VBox/vmm/gvmm.h>
     37#include <VBox/msi.h>
    3738#include <VBox/sup.h>
    3839#include <iprt/asm.h>
     
    18131814        AssertLogRelMsgReturn(pDevReg->cMaxInstances   > 0, ("[%u]: %#x\n", i, pDevReg->cMaxInstances),  VERR_INVALID_PARAMETER);
    18141815        AssertLogRelMsgReturn(pDevReg->cMaxPciDevices <= 8, ("[%u]: %#x\n", i, pDevReg->cMaxPciDevices), VERR_INVALID_PARAMETER);
     1816        AssertLogRelMsgReturn(pDevReg->cMaxMsixVectors <= VBOX_MSIX_MAX_ENTRIES,
     1817                              ("[%u]: %#x\n", i, pDevReg->cMaxMsixVectors), VERR_INVALID_PARAMETER);
    18151818
    18161819        /* The name must be printable ascii and correctly terminated. */
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r80701 r80704  
    19281928                          ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance),
    19291929                          VERR_WRONG_ORDER);
    1930     AssertLogRelMsgReturn((pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_MSI_X) || pMsiReg->cMsixVectors == 0,
    1931                           ("'%s'/%d: PDM_DEVREG_FLAGS_MSI_X not set and cMsixVectors=%u\n",
    1932                            pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors),
     1930    AssertLogRelMsgReturn(pMsiReg->cMsixVectors <= pDevIns->pReg->cMaxMsixVectors,
     1931                          ("'%s'/%d: cMsixVectors=%u cMaxMsixVectors=%u\n",
     1932                           pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors, pDevIns->pReg->cMaxMsixVectors),
    19331933                          VERR_INVALID_FLAGS);
    19341934
  • trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp

    r80701 r80704  
    3939#include <VBox/version.h>
    4040#include <VBox/log.h>
     41#include <VBox/msi.h>
    4142#include <VBox/err.h>
    4243#include <iprt/alloc.h>
     
    762763    AssertLogRelMsgReturn(pReg->cMaxPciDevices <= 8, ("%#x (szName=%s)\n", pReg->cMaxPciDevices, pReg->szName),
    763764                          VERR_PDM_INVALID_DEVICE_REGISTRATION);
     765    AssertLogRelMsgReturn(pReg->cMaxMsixVectors <= VBOX_MSIX_MAX_ENTRIES,
     766                          ("%#x (szName=%s)\n", pReg->cMaxMsixVectors, pReg->szName),
     767                          VERR_PDM_INVALID_DEVICE_REGISTRATION);
    764768
    765769    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette