VirtualBox

Changeset 13020 in vbox for trunk/src/VBox


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

Knut-compatibility fixes

Location:
trunk/src/VBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • 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);
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