VirtualBox

Changeset 13020 in vbox


Ignore:
Timestamp:
Oct 6, 2008 4:27:16 PM (16 years ago)
Author:
vboxsync
Message:

Knut-compatibility fixes

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmapi.h

    r13013 r13020  
    5151VMMDECL(int)    PDMApicSetTPR(PVM pVM, uint8_t u8TPR);
    5252VMMDECL(int)    PDMApicGetTPR(PVM pVM, uint8_t *pu8TPR, bool *pfPending);
    53 VMMDECL(int)    PDMApicWRMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
    54 VMMDECL(int)    PDMApicRDMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
     53VMMDECL(int)    PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
     54VMMDECL(int)    PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
    5555VMMDECL(int)    PDMVMMDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys);
    5656
  • trunk/include/VBox/pdmdev.h

    r13013 r13020  
    992992
    993993    /**
    994      * WRMSR in APIC range.
     994     * Write MSR in APIC range.
    995995     *
    996996     * @returns VBox status code.
     
    10001000     * @param   u64Value        Value to write.
    10011001     */
    1002     DECLR3CALLBACKMEMBER(uint32_t, pfnWRMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
    1003 
    1004     /**
    1005      * RDMSR in APIC range.
     1002    DECLR3CALLBACKMEMBER(uint32_t, pfnWriteMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
     1003
     1004    /**
     1005     * Read MSR in APIC range.
    10061006     *
    10071007     * @returns VBox status code.
     
    10111011     * @param   pu64Value       Value read.
    10121012     */
    1013     DECLR3CALLBACKMEMBER(uint32_t, pfnRDMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
     1013    DECLR3CALLBACKMEMBER(uint32_t, pfnReadMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
    10141014
    10151015    /**
     
    10461046    /** The name of the RC GetTPR entry point. */
    10471047    const char         *pszGetTPRRC;
    1048     /** The name of the RC WRMSR entry point. */
    1049     const char         *pszWRMSRRC;
    1050     /** The name of the RC RDMSR entry point. */
    1051     const char         *pszRDMSRRC;
     1048    /** The name of the RC WriteMSR entry point. */
     1049    const char         *pszWriteMSRRC;
     1050    /** The name of the RC ReadMSR entry point. */
     1051    const char         *pszReadMSRRC;
    10521052    /** The name of the RC BusDeliver entry point. */
    10531053    const char         *pszBusDeliverRC;
     
    10651065    /** The name of the R0 GetTPR entry point. */
    10661066    const char         *pszGetTPRR0;
    1067     /** The name of the R0 WRMSR entry point. */
    1068     const char         *pszWRMSRR0;
    1069     /** The name of the R0 RDMSR entry point. */
    1070     const char         *pszRDMSRR0;
     1067    /** The name of the R0 WriteMSR entry point. */
     1068    const char         *pszWriteMSRR0;
     1069    /** The name of the R0 ReadMSR entry point. */
     1070    const char         *pszReadMSRR0;
    10711071    /** The name of the R0 BusDeliver entry point. */
    10721072    const char         *pszBusDeliverR0;
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r13013 r13020  
    366366                                           uint8_t u8DeliveryMode, uint8_t iVector, uint8_t u8Polarity,
    367367                                           uint8_t u8TriggerMode);
    368 PDMBOTHCBDECL(uint32_t) apicWRMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
    369 PDMBOTHCBDECL(uint32_t) apicRDMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
     368PDMBOTHCBDECL(uint32_t) apicWriteMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
     369PDMBOTHCBDECL(uint32_t) apicReadMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
    370370PDMBOTHCBDECL(int)  ioapicMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb);
    371371PDMBOTHCBDECL(int)  ioapicMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb);
     
    581581}
    582582
    583 PDMBOTHCBDECL(uint32_t) apicWRMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value)
    584 {
     583PDMBOTHCBDECL(uint32_t) apicWriteMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value)
     584{
     585    APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
     586    u32Reg -= MSR_IA32_APIC_START;
     587    LogRel(("nike: WRMSR on %d: to %x written %llx\n", iCpu, u32Reg, u64Value));
    585588    return 0;
    586589}
    587 PDMBOTHCBDECL(uint32_t) apicRDMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value)
    588 {
     590PDMBOTHCBDECL(uint32_t) apicReadMSR(PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value)
     591{
     592    APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
     593    u32Reg -= MSR_IA32_APIC_START;
     594    LogRel(("nike: RDMSR on %d: read from %x\n", iCpu, u32Reg));
     595    *pu64Value = 0;
    589596    return 0;
    590597}
     
    19681975    ApicReg.pfnSetTPRR3             = apicSetTPR;
    19691976    ApicReg.pfnGetTPRR3             = apicGetTPR;
    1970     ApicReg.pfnWRMSRR3              = apicWRMSR;
    1971     ApicReg.pfnRDMSRR3              = apicRDMSR;
     1977    ApicReg.pfnWriteMSRR3           = apicWriteMSR;
     1978    ApicReg.pfnReadMSRR3            = apicReadMSR;
    19721979    ApicReg.pfnBusDeliverR3         = apicBusDeliverCallback;
    19731980    if (fGCEnabled) {
     
    19781985        ApicReg.pszSetTPRRC         = "apicSetTPR";
    19791986        ApicReg.pszGetTPRRC         = "apicGetTPR";
    1980         ApicReg.pszWRMSRRC          = "apicWRMSR";
    1981         ApicReg.pszRDMSRRC          = "apicRDMSR";
     1987        ApicReg.pszWriteMSRRC       = "apicWriteMSR";
     1988        ApicReg.pszReadMSRRC        = "apicReadMSR";
    19821989        ApicReg.pszBusDeliverRC     = "apicBusDeliverCallback";
    19831990    } else {
     
    19881995        ApicReg.pszSetTPRRC         = NULL;
    19891996        ApicReg.pszGetTPRRC         = NULL;
    1990         ApicReg.pszWRMSRRC          = NULL;
    1991         ApicReg.pszRDMSRRC          = NULL;
     1997        ApicReg.pszWriteMSRRC       = NULL;
     1998        ApicReg.pszReadMSRRC        = NULL;
    19921999        ApicReg.pszBusDeliverRC     = NULL;
    19932000    }
     
    19992006        ApicReg.pszSetTPRR0         = "apicSetTPR";
    20002007        ApicReg.pszGetTPRR0         = "apicGetTPR";
    2001         ApicReg.pszWRMSRR0          = "apicWRMSR";
    2002         ApicReg.pszRDMSRR0          = "apicRDMSR";
     2008        ApicReg.pszWriteMSRR0       = "apicWriteMSR";
     2009        ApicReg.pszReadMSRR0        = "apicReadMSR";
    20032010        ApicReg.pszBusDeliverR0     = "apicBusDeliverCallback";
    20042011    } else {
     
    20092016        ApicReg.pszSetTPRR0         = NULL;
    20102017        ApicReg.pszGetTPRR0         = NULL;
    2011         ApicReg.pszWRMSRR0          = NULL;
    2012         ApicReg.pszRDMSRR0          = NULL;
     2018        ApicReg.pszWriteMSRR0       = NULL;
     2019        ApicReg.pszReadMSRR0        = NULL;
    20132020        ApicReg.pszBusDeliverR0     = NULL;
    20142021    }
  • trunk/src/VBox/VMM/PDM.cpp

    r13013 r13020  
    432432        pVM->pdm.s.Apic.pfnGetTPRRC         += offDelta;
    433433        pVM->pdm.s.Apic.pfnBusDeliverRC     += offDelta;
    434         pVM->pdm.s.Apic.pfnWRMSRRC          += offDelta;
    435         pVM->pdm.s.Apic.pfnRDMSRRC          += offDelta;
     434        pVM->pdm.s.Apic.pfnWriteMSRRC       += offDelta;
     435        pVM->pdm.s.Apic.pfnReadMSRRC        += offDelta;
    436436    }
    437437
  • trunk/src/VBox/VMM/PDMDevHlp.cpp

    r13013 r13020  
    14891489    VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    14901490    LogFlow(("pdmR3DevHlp_APICRegister: caller='%s'/%d: pApicReg=%p:{.u32Version=%#x, .pfnGetInterruptR3=%p, .pfnSetBaseR3=%p, .pfnGetBaseR3=%p, "
    1491              ".pfnSetTPRR3=%p, .pfnGetTPRR3=%p, .pfnWRMSR3=%p, .pfnRDMSR3=%p, .pfnBusDeliverR3=%p, pszGetInterruptRC=%p:{%s}, pszSetBaseRC=%p:{%s}, pszGetBaseRC=%p:{%s}, "
    1492              ".pszSetTPRRC=%p:{%s}, .pszGetTPRRC=%p:{%s}, .pszWRMSRRC=%p:{%s}, .pszRDMSRRC=%p:{%s}, .pszBusDeliverRC=%p:{%s}} ppApicHlpR3=%p\n",
     1491             ".pfnSetTPRR3=%p, .pfnGetTPRR3=%p, .pfnWriteMSR3=%p, .pfnReadMSR3=%p, .pfnBusDeliverR3=%p, pszGetInterruptRC=%p:{%s}, pszSetBaseRC=%p:{%s}, pszGetBaseRC=%p:{%s}, "
     1492             ".pszSetTPRRC=%p:{%s}, .pszGetTPRRC=%p:{%s}, .pszWriteMSRRC=%p:{%s}, .pszReadMSRRC=%p:{%s}, .pszBusDeliverRC=%p:{%s}} ppApicHlpR3=%p\n",
    14931493             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pApicReg, pApicReg->u32Version, pApicReg->pfnGetInterruptR3, pApicReg->pfnSetBaseR3,
    1494              pApicReg->pfnGetBaseR3, pApicReg->pfnSetTPRR3, pApicReg->pfnGetTPRR3, pApicReg->pfnWRMSRR3, pApicReg->pfnRDMSRR3, pApicReg->pfnBusDeliverR3, pApicReg->pszGetInterruptRC,
     1494             pApicReg->pfnGetBaseR3, pApicReg->pfnSetTPRR3, pApicReg->pfnGetTPRR3, pApicReg->pfnWriteMSRR3, pApicReg->pfnReadMSRR3, pApicReg->pfnBusDeliverR3, pApicReg->pszGetInterruptRC,
    14951495             pApicReg->pszGetInterruptRC, pApicReg->pszSetBaseRC, pApicReg->pszSetBaseRC, pApicReg->pszGetBaseRC, pApicReg->pszGetBaseRC,
    1496              pApicReg->pszSetTPRRC, pApicReg->pszSetTPRRC, pApicReg->pszGetTPRRC, pApicReg->pszGetTPRRC, pApicReg->pszWRMSRRC, pApicReg->pszWRMSRRC, pApicReg->pszRDMSRRC, pApicReg->pszRDMSRRC, pApicReg->pszBusDeliverRC,
     1496             pApicReg->pszSetTPRRC, pApicReg->pszSetTPRRC, pApicReg->pszGetTPRRC, pApicReg->pszGetTPRRC, pApicReg->pszWriteMSRRC, pApicReg->pszWriteMSRRC, pApicReg->pszReadMSRRC, pApicReg->pszReadMSRRC, pApicReg->pszBusDeliverRC,
    14971497             pApicReg->pszBusDeliverRC, ppApicHlpR3));
    14981498
     
    15121512        ||  !pApicReg->pfnSetTPRR3
    15131513        ||  !pApicReg->pfnGetTPRR3
    1514         ||  !pApicReg->pfnWRMSRR3
    1515         ||  !pApicReg->pfnRDMSRR3
     1514        ||  !pApicReg->pfnWriteMSRR3
     1515        ||  !pApicReg->pfnReadMSRR3
    15161516        ||  !pApicReg->pfnBusDeliverR3)
    15171517    {
     
    15221522        Assert(pApicReg->pfnSetTPRR3);
    15231523        Assert(pApicReg->pfnGetTPRR3);
    1524         Assert(pApicReg->pfnWRMSRR3);
    1525         Assert(pApicReg->pfnRDMSRR3);
     1524        Assert(pApicReg->pfnWriteMSRR3);
     1525        Assert(pApicReg->pfnReadMSRR3);
    15261526        Assert(pApicReg->pfnBusDeliverR3);
    15271527        LogFlow(("pdmR3DevHlp_APICRegister: caller='%s'/%d: returns %Vrc (R3 callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
     
    15341534            ||  pApicReg->pszSetTPRRC
    15351535            ||  pApicReg->pszGetTPRRC
    1536             ||  pApicReg->pszWRMSRRC
    1537             ||  pApicReg->pszRDMSRRC
     1536            ||  pApicReg->pszWriteMSRRC
     1537            ||  pApicReg->pszReadMSRRC
    15381538            ||  pApicReg->pszBusDeliverRC)
    15391539        &&  (   !VALID_PTR(pApicReg->pszGetInterruptRC)
     
    15431543            ||  !VALID_PTR(pApicReg->pszSetTPRRC)
    15441544            ||  !VALID_PTR(pApicReg->pszGetTPRRC)
    1545             ||  !VALID_PTR(pApicReg->pszWRMSRRC)
    1546             ||  !VALID_PTR(pApicReg->pszRDMSRRC)
     1545            ||  !VALID_PTR(pApicReg->pszWriteMSRRC)
     1546            ||  !VALID_PTR(pApicReg->pszReadMSRRC)
    15471547            ||  !VALID_PTR(pApicReg->pszBusDeliverRC))
    15481548       )
     
    15541554        Assert(VALID_PTR(pApicReg->pszSetTPRRC));
    15551555        Assert(VALID_PTR(pApicReg->pszGetTPRRC));
    1556         Assert(VALID_PTR(pApicReg->pszRDMSRRC));
    1557         Assert(VALID_PTR(pApicReg->pszWRMSRRC));
     1556        Assert(VALID_PTR(pApicReg->pszReadMSRRC));
     1557        Assert(VALID_PTR(pApicReg->pszWriteMSRRC));
    15581558        Assert(VALID_PTR(pApicReg->pszBusDeliverRC));
    15591559        LogFlow(("pdmR3DevHlp_APICRegister: caller='%s'/%d: returns %Vrc (RC callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
     
    15661566            ||  pApicReg->pszSetTPRR0
    15671567            ||  pApicReg->pszGetTPRR0
    1568             ||  pApicReg->pszWRMSRR0
    1569             ||  pApicReg->pszRDMSRR0
     1568            ||  pApicReg->pszWriteMSRR0
     1569            ||  pApicReg->pszReadMSRR0
    15701570            ||  pApicReg->pszBusDeliverR0)
    15711571        &&  (   !VALID_PTR(pApicReg->pszGetInterruptR0)
     
    15751575            ||  !VALID_PTR(pApicReg->pszSetTPRR0)
    15761576            ||  !VALID_PTR(pApicReg->pszGetTPRR0)
    1577             ||  !VALID_PTR(pApicReg->pszRDMSRR0)
    1578             ||  !VALID_PTR(pApicReg->pszWRMSRR0)
     1577            ||  !VALID_PTR(pApicReg->pszReadMSRR0)
     1578            ||  !VALID_PTR(pApicReg->pszWriteMSRR0)
    15791579            ||  !VALID_PTR(pApicReg->pszBusDeliverR0))
    15801580       )
     
    15861586        Assert(VALID_PTR(pApicReg->pszSetTPRR0));
    15871587        Assert(VALID_PTR(pApicReg->pszGetTPRR0));
    1588         Assert(VALID_PTR(pApicReg->pszRDMSRR0));
    1589         Assert(VALID_PTR(pApicReg->pszWRMSRR0));
     1588        Assert(VALID_PTR(pApicReg->pszReadMSRR0));
     1589        Assert(VALID_PTR(pApicReg->pszWriteMSRR0));
    15901590        Assert(VALID_PTR(pApicReg->pszBusDeliverR0));
    15911591        LogFlow(("pdmR3DevHlp_APICRegister: caller='%s'/%d: returns %Vrc (R0 callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
     
    16451645        if (RT_SUCCESS(rc))
    16461646        {
    1647             rc = PDMR3LdrGetSymbolRCLazy(pVM, pDevIns->pDevReg->szRCMod, pApicReg->pszWRMSRRC, &pVM->pdm.s.Apic.pfnWRMSRRC);
    1648             AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szRCMod, pApicReg->pszWRMSRRC, rc));
     1647            rc = PDMR3LdrGetSymbolRCLazy(pVM, pDevIns->pDevReg->szRCMod, pApicReg->pszWriteMSRRC, &pVM->pdm.s.Apic.pfnWriteMSRRC);
     1648            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szRCMod, pApicReg->pszWriteMSRRC, rc));
    16491649        }
    16501650        if (RT_SUCCESS(rc))
    16511651        {
    1652             rc = PDMR3LdrGetSymbolRCLazy(pVM, pDevIns->pDevReg->szRCMod, pApicReg->pszRDMSRRC, &pVM->pdm.s.Apic.pfnRDMSRRC);
    1653             AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szRCMod, pApicReg->pszRDMSRRC, rc));
     1652            rc = PDMR3LdrGetSymbolRCLazy(pVM, pDevIns->pDevReg->szRCMod, pApicReg->pszReadMSRRC, &pVM->pdm.s.Apic.pfnReadMSRRC);
     1653            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szRCMod, pApicReg->pszReadMSRRC, rc));
    16541654        }
    16551655        if (RT_SUCCESS(rc))
     
    16741674        pVM->pdm.s.Apic.pfnSetTPRRC         = 0;
    16751675        pVM->pdm.s.Apic.pfnGetTPRRC         = 0;
    1676         pVM->pdm.s.Apic.pfnWRMSRRC          = 0;
    1677         pVM->pdm.s.Apic.pfnRDMSRRC          = 0;
     1676        pVM->pdm.s.Apic.pfnWriteMSRRC       = 0;
     1677        pVM->pdm.s.Apic.pfnReadMSRRC        = 0;
    16781678        pVM->pdm.s.Apic.pfnBusDeliverRC     = 0;
    16791679    }
     
    17131713        if (RT_SUCCESS(rc))
    17141714        {
    1715             rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszWRMSRR0, &pVM->pdm.s.Apic.pfnWRMSRR0);
    1716             AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszWRMSRR0, rc));
     1715            rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszWriteMSRR0, &pVM->pdm.s.Apic.pfnWriteMSRR0);
     1716            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszWriteMSRR0, rc));
    17171717        }
    17181718        if (RT_SUCCESS(rc))
    17191719        {
    1720             rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszRDMSRR0, &pVM->pdm.s.Apic.pfnRDMSRR0);
    1721             AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszRDMSRR0, rc));
     1720            rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszReadMSRR0, &pVM->pdm.s.Apic.pfnReadMSRR0);
     1721            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszReadMSRR0, rc));
    17221722        }
    17231723        if (RT_SUCCESS(rc))
     
    17421742        pVM->pdm.s.Apic.pfnSetTPRR0         = 0;
    17431743        pVM->pdm.s.Apic.pfnGetTPRR0         = 0;
    1744         pVM->pdm.s.Apic.pfnWRMSRR0          = 0;
    1745         pVM->pdm.s.Apic.pfnRDMSRR0          = 0;
     1744        pVM->pdm.s.Apic.pfnWriteMSRR0       = 0;
     1745        pVM->pdm.s.Apic.pfnReadMSRR0        = 0;
    17461746        pVM->pdm.s.Apic.pfnBusDeliverR0     = 0;
    17471747        pVM->pdm.s.Apic.pDevInsR0           = 0;
     
    17581758    pVM->pdm.s.Apic.pfnSetTPRR3         = pApicReg->pfnSetTPRR3;
    17591759    pVM->pdm.s.Apic.pfnGetTPRR3         = pApicReg->pfnGetTPRR3;
    1760     pVM->pdm.s.Apic.pfnWRMSRR3          = pApicReg->pfnWRMSRR3;
    1761     pVM->pdm.s.Apic.pfnRDMSRR3          = pApicReg->pfnRDMSRR3;
     1760    pVM->pdm.s.Apic.pfnWriteMSRR3       = pApicReg->pfnWriteMSRR3;
     1761    pVM->pdm.s.Apic.pfnReadMSRR3        = pApicReg->pfnReadMSRR3;
    17621762    pVM->pdm.s.Apic.pfnBusDeliverR3     = pApicReg->pfnBusDeliverR3;
    17631763    Log(("PDM: Registered APIC device '%s'/%d pDevIns=%p\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pDevIns));
  • trunk/src/VBox/VMM/PDMInternal.h

    r13013 r13020  
    409409    /** @copydoc PDMAPICREG::pfnGetTPRR3 */
    410410    DECLR3CALLBACKMEMBER(uint8_t,   pfnGetTPRR3,(PPDMDEVINS pDevIns));
    411     /** @copydoc PDMAPICREG::pfnWRMSRR3 */
    412     DECLR3CALLBACKMEMBER(uint32_t,  pfnWRMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
    413     /** @copydoc PDMAPICREG::pfnRDMSRR3 */
    414     DECLR3CALLBACKMEMBER(uint32_t,  pfnRDMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
     411    /** @copydoc PDMAPICREG::pfnWriteMSRR3 */
     412    DECLR3CALLBACKMEMBER(uint32_t,  pfnWriteMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
     413    /** @copydoc PDMAPICREG::pfnReadMSRR3 */
     414    DECLR3CALLBACKMEMBER(uint32_t,  pfnReadMSRR3, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
    415415    /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
    416416    DECLR3CALLBACKMEMBER(void,      pfnBusDeliverR3,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
     
    431431    /** @copydoc PDMAPICREG::pfnGetTPRR3 */
    432432    DECLR0CALLBACKMEMBER(uint8_t,   pfnGetTPRR0,(PPDMDEVINS pDevIns));
    433      /** @copydoc PDMAPICREG::pfnWRMSRR3 */
    434     DECLR0CALLBACKMEMBER(uint32_t,  pfnWRMSRR0, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
    435     /** @copydoc PDMAPICREG::pfnRDMSRR3 */
    436     DECLR0CALLBACKMEMBER(uint32_t,  pfnRDMSRR0, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
     433     /** @copydoc PDMAPICREG::pfnWriteMSRR3 */
     434    DECLR0CALLBACKMEMBER(uint32_t,  pfnWriteMSRR0, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
     435    /** @copydoc PDMAPICREG::pfnReadMSRR3 */
     436    DECLR0CALLBACKMEMBER(uint32_t,  pfnReadMSRR0, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
    437437    /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
    438438    DECLR0CALLBACKMEMBER(void,      pfnBusDeliverR0,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
     
    453453    /** @copydoc PDMAPICREG::pfnGetTPRR3 */
    454454    DECLRCCALLBACKMEMBER(uint8_t,   pfnGetTPRRC,(PPDMDEVINS pDevIns));
    455     /** @copydoc PDMAPICREG::pfnWRMSRR3 */
    456     DECLRCCALLBACKMEMBER(uint32_t,  pfnWRMSRRC, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
    457     /** @copydoc PDMAPICREG::pfnRDMSRR3 */
    458     DECLRCCALLBACKMEMBER(uint32_t,  pfnRDMSRRC, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
     455    /** @copydoc PDMAPICREG::pfnWriteMSRR3 */
     456    DECLRCCALLBACKMEMBER(uint32_t,  pfnWriteMSRRC, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value));
     457    /** @copydoc PDMAPICREG::pfnReadMSRR3 */
     458    DECLRCCALLBACKMEMBER(uint32_t,  pfnReadMSRRC, (PPDMDEVINS pDevIns, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value));
    459459    /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
    460460    DECLRCCALLBACKMEMBER(void,      pfnBusDeliverRC,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r13013 r13020  
    25792579        /* In X2APIC specification this range is reserved for APIC control. */
    25802580        if ((pRegFrame->ecx >= MSR_IA32_APIC_START) && (pRegFrame->ecx < MSR_IA32_APIC_END))
    2581         {
    2582             rc = PDMApicRDMSR(pVM, VMMGetCpuId(pVM), pRegFrame->ecx, &val);
    2583         }
     2581            rc = PDMApicReadMSR(pVM, VMMGetCpuId(pVM), pRegFrame->ecx, &val);
    25842582        else
    2585         {
    25862583            /* We should actually trigger a #GP here, but don't as that might cause more trouble. */
    25872584            val = 0;
    2588             break;
    2589         }
     2585        break;
    25902586    }
    25912587    Log(("EMInterpretRdmsr %s (%x) -> val=%VX64\n", emMSRtoString(pRegFrame->ecx), pRegFrame->ecx, val));
     
    27282724        /* In X2APIC specification this range is reserved for APIC control. */
    27292725        if ((pRegFrame->ecx >=  MSR_IA32_APIC_START) && (pRegFrame->ecx <  MSR_IA32_APIC_END))
    2730         {
    2731             return PDMApicWRMSR(pVM, VMMGetCpuId(pVM), pRegFrame->ecx, val);
    2732         }
     2726            return PDMApicWriteMSR(pVM, VMMGetCpuId(pVM), pRegFrame->ecx, val);
     2727
    27332728        /* We should actually trigger a #GP here, but don't as that might cause more trouble. */
    27342729        break;
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r13013 r13020  
    254254
    255255/**
    256  * WRMSR in APIC range.
     256 * Write MSR in APIC range.
    257257 *
    258258 * @returns VBox status code.
     
    262262 * @param   u64Value        Value to write.
    263263 */
    264 VMMDECL(int) PDMApicWRMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value)
    265 {
    266     if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns))
    267     {
    268         Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnWRMSR));
    269         pdmLock(pVM);
    270         pVM->pdm.s.Apic.CTX_SUFF(pfnWRMSR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), iCpu, u32Reg, u64Value);
    271         pdmUnlock(pVM);
    272         return VINF_SUCCESS;
    273     }
    274     return VERR_PDM_NO_APIC_INSTANCE;
    275 }
    276 
    277 /**
    278  * RDMSR in APIC range.
     264VMMDECL(int) PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value)
     265{
     266    if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns))
     267    {
     268        Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnWriteMSR));
     269        pdmLock(pVM);
     270        pVM->pdm.s.Apic.CTX_SUFF(pfnWriteMSR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), iCpu, u32Reg, u64Value);
     271        pdmUnlock(pVM);
     272        return VINF_SUCCESS;
     273    }
     274    return VERR_PDM_NO_APIC_INSTANCE;
     275}
     276
     277/**
     278 * Read MSR in APIC range.
    279279 *
    280280 * @returns VBox status code.
     
    284284 * @param   pu64Value       Value read.
    285285 */
    286 VMMDECL(int) PDMApicRDMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value)
    287 {
    288     if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns))
    289     {
    290         Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnRDMSR));
    291         pdmLock(pVM);
    292         pVM->pdm.s.Apic.CTX_SUFF(pfnRDMSR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), iCpu, u32Reg, pu64Value);
     286VMMDECL(int) PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value)
     287{
     288    if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns))
     289    {
     290        Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnReadMSR));
     291        pdmLock(pVM);
     292        pVM->pdm.s.Apic.CTX_SUFF(pfnReadMSR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), iCpu, u32Reg, pu64Value);
    293293        pdmUnlock(pVM);
    294294        return VINF_SUCCESS;
  • trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp

    r13019 r13020  
    275275    GEN_CHECK_OFF(PDM, Apic.pfnGetBaseR3);
    276276    GEN_CHECK_OFF(PDM, Apic.pfnSetTPRR3);
    277     GEN_CHECK_OFF(PDM, Apic.pfnWRMSRR3);
    278     GEN_CHECK_OFF(PDM, Apic.pfnRDMSRR3);
     277    GEN_CHECK_OFF(PDM, Apic.pfnWriteMSRR3);
     278    GEN_CHECK_OFF(PDM, Apic.pfnReadMSRR3);
    279279    GEN_CHECK_OFF(PDM, Apic.pfnGetTPRR3);
    280280    GEN_CHECK_OFF(PDM, Apic.pfnBusDeliverR3);
     
    285285    GEN_CHECK_OFF(PDM, Apic.pfnSetTPRR0);
    286286    GEN_CHECK_OFF(PDM, Apic.pfnGetTPRR0);
    287     GEN_CHECK_OFF(PDM, Apic.pfnWRMSRR0);
    288     GEN_CHECK_OFF(PDM, Apic.pfnRDMSRR0);
     287    GEN_CHECK_OFF(PDM, Apic.pfnWriteMSRR0);
     288    GEN_CHECK_OFF(PDM, Apic.pfnReadMSRR0);
    289289    GEN_CHECK_OFF(PDM, Apic.pfnBusDeliverR0);
    290290    GEN_CHECK_OFF(PDM, Apic.pDevInsRC);
     
    294294    GEN_CHECK_OFF(PDM, Apic.pfnSetTPRRC);
    295295    GEN_CHECK_OFF(PDM, Apic.pfnGetTPRRC);
    296     GEN_CHECK_OFF(PDM, Apic.pfnWRMSRRC);
    297     GEN_CHECK_OFF(PDM, Apic.pfnRDMSRRC);
     296    GEN_CHECK_OFF(PDM, Apic.pfnWriteMSRRC);
     297    GEN_CHECK_OFF(PDM, Apic.pfnReadMSRRC);
    298298    GEN_CHECK_OFF(PDM, Apic.pfnBusDeliverRC);
    299299    GEN_CHECK_OFF(PDM, IoApic);
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r13013 r13020  
    645645    { REMPARMDESC_FLAGS_INT,        sizeof(uint8_t), NULL }
    646646};
    647 static const REMPARMDESC g_aArgsPDMApicWRMSR[] =
     647static const REMPARMDESC g_aArgsPDMApicWriteMSR[] =
    648648{
    649649    { REMPARMDESC_FLAGS_INT,        sizeof(PVM), NULL },
     
    652652    { REMPARMDESC_FLAGS_INT,        sizeof(uint64_t), NULL }
    653653};
    654 static const REMPARMDESC g_aArgsPDMApicRDMSR[] =
     654static const REMPARMDESC g_aArgsPDMApicReadMSR[] =
    655655{
    656656    { REMPARMDESC_FLAGS_INT,        sizeof(PVM), NULL },
     
    10791079    { "PDMApicSetBase",                         (void *)(uintptr_t)&PDMApicSetBase,                 &g_aArgsPDMApicSetBase[0],                  RT_ELEMENTS(g_aArgsPDMApicSetBase),                    REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    10801080    { "PDMApicSetTPR",                          (void *)(uintptr_t)&PDMApicSetTPR,                  &g_aArgsPDMApicSetTPR[0],                   RT_ELEMENTS(g_aArgsPDMApicSetTPR),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    1081     { "PDMApicWRMSR",                           (void *)(uintptr_t)&PDMApicWRMSR,                  &g_aArgsPDMApicWRMSR[0],                   RT_ELEMENTS(g_aArgsPDMApicWRMSR),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),           NULL },
    1082     { "PDMApicRDMSR",                           (void *)(uintptr_t)&PDMApicRDMSR,                  &g_aArgsPDMApicRDMSR[0],                   RT_ELEMENTS(g_aArgsPDMApicRDMSR),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),           NULL },
     1081    { "PDMApicWriteMSR",                        (void *)(uintptr_t)&PDMApicWriteMSR,                  &g_aArgsPDMApicWriteMSR[0],                   RT_ELEMENTS(g_aArgsPDMApicWriteMSR),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),           NULL },
     1082    { "PDMApicReadMSR",                         (void *)(uintptr_t)&PDMApicReadMSR,                  &g_aArgsPDMApicReadMSR[0],                   RT_ELEMENTS(g_aArgsPDMApicReadMSR),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),           NULL },
    10831083    { "PDMR3DmaRun",                            (void *)(uintptr_t)&PDMR3DmaRun,                    &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
    10841084    { "PDMGetInterrupt",                        (void *)(uintptr_t)&PDMGetInterrupt,                &g_aArgsPDMGetInterrupt[0],                 RT_ELEMENTS(g_aArgsPDMGetInterrupt),                   REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
  • trunk/src/recompiler/VBoxRecompiler.c

    r13013 r13020  
    40904090{
    40914091    uint64_t value;
    4092     int rc = PDMApicRDMSR(env->pVM, 0/* cpu */, reg, &value);
    4093     if (rc != VINF_SUCCESS)
    4094     {
    4095         /** @todo: exception ? */
    4096         value = 0;
    4097     }
     4092    int rc = PDMApicReadMSR(env->pVM, 0/* cpu */, reg, &value);
     4093    if (VBOX_SUCCESS(rc))
     4094    {
     4095        LogFlow(("cpu_apic_rdms returns %#x\n", value));
     4096        return value;
     4097    }
     4098    /** @todo: exception ? */
     4099    LogFlow(("cpu_apic_rdms returns 0 (rc=%Vrc)\n", rc));
    40984100    return value;
    40994101}
     
    41014103void     cpu_apic_wrmsr(CPUX86State *env, uint32_t reg, uint64_t value)
    41024104{
    4103     int rc = PDMApicWRMSR(env->pVM, 0 /* cpu */, reg, value);
    4104     if (rc != VINF_SUCCESS)
    4105     {
    4106         /** @todo: exception ? */
    4107     }
     4105    int rc = PDMApicWriteMSR(env->pVM, 0 /* cpu */, reg, value);
     4106    /** @todo: exception if error ? */
     4107    LogFlow(("cpu_apic_wrmsr: rc=%Vrc\n", rc)); NOREF(rc);
    41084108}
    41094109/* -+- I/O Ports -+- */
  • trunk/src/recompiler/target-i386/helper.c

    r13013 r13020  
    30773077        /* In X2APIC specification this range is reserved for APIC control. */
    30783078        if ((ecx >= MSR_APIC_RANGE_START) && (ecx < MSR_APIC_RANGE_END))
    3079         {
    30803079            cpu_apic_wrmsr(env, ecx, val);
    3081         }
    30823080        else
    3083         {
    3084             /* @todo: exception ? */
    3085         }
     3081            /* @todo: exception ? */;
    30863082        break;
    30873083    }
     
    31393135        /* In X2APIC specification this range is reserved for APIC control. */
    31403136        if ((ecx >= MSR_APIC_RANGE_START) && (ecx < MSR_APIC_RANGE_END))
    3141         {
    31423137            val = cpu_apic_rdmsr(env, ecx);
    3143         }
    31443138        else
    3145         {
    31463139            /** @todo: exception ? */
    31473140            val = 0;
    3148             break;
    3149         }
     3141        break;
    31503142    }
    31513143    }
Note: See TracChangeset for help on using the changeset viewer.

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