Changeset 60430 in vbox for trunk/src/VBox
- Timestamp:
- Apr 11, 2016 4:16:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/APICAll.cpp
r60428 r60430 440 440 * performed in the current context. 441 441 */ 442 static VBOXSTRICTRC apicSendIntr(PVM CPU pVCpu, uint8_t uVector, XAPICTRIGGERMODE enmTriggerMode,442 static VBOXSTRICTRC apicSendIntr(PVM pVM, PVMCPU pVCpu, uint8_t uVector, XAPICTRIGGERMODE enmTriggerMode, 443 443 XAPICDELIVERYMODE enmDeliveryMode, PCVMCPUSET pDestCpuSet, int rcRZ) 444 444 { 445 445 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 446 PVM pVM = pVCpu->CTX_SUFF(pVM);447 446 VMCPUID const cCpus = pVM->cCpus; 448 447 switch (enmDeliveryMode) … … 816 815 } 817 816 818 return apicSendIntr(pVCpu , uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, rcRZ);817 return apicSendIntr(pVCpu->CTX_SUFF(pVM), pVCpu, uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, rcRZ); 819 818 } 820 819 … … 1195 1194 || offLvt == XAPIC_OFF_LVT_LINT1 1196 1195 || offLvt == XAPIC_OFF_LVT_ERROR, 1197 ("APIC%u: apicSetLvtEntry: invalid offset, offLvt=%# x, uLvt=%#x\n", pVCpu->idCpu, offLvt, uLvt));1196 ("APIC%u: apicSetLvtEntry: invalid offset, offLvt=%#RX16, uLvt=%#RX32\n", pVCpu->idCpu, offLvt, uLvt)); 1198 1197 1199 1198 /* … … 1248 1247 apicSetError(pVCpu, XAPIC_ESR_SEND_ILLEGAL_VECTOR); 1249 1248 1249 Log4(("APIC%u: apicSetLvtEntry: offLvt=%#RX16 uLvt=%#RX32\n", pVCpu->idCpu, offLvt, uLvt)); 1250 1250 apicWriteRaw32(pXApicPage, offLvt, uLvt); 1251 1251 return VINF_SUCCESS; … … 1268 1268 { 1269 1269 VMCPU_ASSERT_EMT(pVCpu); 1270 AssertMsg(offLvt == XAPIC_OFF_CMCI, ("APIC%u: apicSetLvt1Entry: invalid offset %# x\n", pVCpu->idCpu, offLvt));1270 AssertMsg(offLvt == XAPIC_OFF_CMCI, ("APIC%u: apicSetLvt1Entry: invalid offset %#RX16\n", pVCpu->idCpu, offLvt)); 1271 1271 1272 1272 /** @todo support CMCI. */ … … 1390 1390 { 1391 1391 Assert(!XAPIC_IN_X2APIC_MODE(pVCpu)); 1392 rc = PDMDevHlpDBGFStop(pApicDev->CTX_SUFF(pDevIns), RT_SRC_POS, " offReg=%#x Id=%u\n", offReg, pVCpu->idCpu);1392 rc = PDMDevHlpDBGFStop(pApicDev->CTX_SUFF(pDevIns), RT_SRC_POS, "VCPU[%u]: offReg=%#RX16\n", pVCpu->idCpu, offReg); 1393 1393 apicSetError(pVCpu, XAPIC_ESR_ILLEGAL_REG_ADDRESS); 1394 1394 break; … … 1503 1503 } 1504 1504 1505 /* Read-only, write ignored: */ 1506 case XAPIC_OFF_VERSION: 1507 case XAPIC_OFF_ID: 1508 break; 1509 1505 1510 /* Unavailable/reserved in xAPIC mode: */ 1506 1511 case X2APIC_OFF_SELF_IPI: 1507 1512 /* Read-only registers: */ 1508 case XAPIC_OFF_ID:1509 case XAPIC_OFF_VERSION:1510 1513 case XAPIC_OFF_PPR: 1511 1514 case XAPIC_OFF_ISR0: case XAPIC_OFF_ISR1: case XAPIC_OFF_ISR2: case XAPIC_OFF_ISR3: … … 1518 1521 default: 1519 1522 { 1520 rcStrict = PDMDevHlpDBGFStop(pApicDev->CTX_SUFF(pDevIns), RT_SRC_POS, "APIC%u: offReg=%#x\n", pVCpu->idCpu, offReg); 1523 rcStrict = PDMDevHlpDBGFStop(pApicDev->CTX_SUFF(pDevIns), RT_SRC_POS, "APIC%u: offReg=%#RX16\n", pVCpu->idCpu, 1524 offReg); 1521 1525 apicSetError(pVCpu, XAPIC_ESR_ILLEGAL_REG_ADDRESS); 1522 1526 break; … … 1947 1951 VMCPUSET DestCpuSet; 1948 1952 apicGetDestCpuSet(pVM, fDestMask, fBroadcastMask, enmDestMode, enmDeliveryMode, &DestCpuSet); 1949 VBOXSTRICTRC rcStrict = apicSendIntr(NULL /* pVCpu */, uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, VINF_SUCCESS); 1953 VBOXSTRICTRC rcStrict = apicSendIntr(pVM, NULL /* pVCpu */, uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, 1954 VINF_SUCCESS /* rcRZ */); 1950 1955 return VBOXSTRICTRC_VAL(rcStrict); 1951 1956 } … … 2002 2007 case XAPICDELIVERYMODE_NMI: 2003 2008 case XAPICDELIVERYMODE_INIT: /** @todo won't work in R0/RC because callers don't care about rcRZ. */ 2004 case XAPICDELIVERYMODE_EXTINT:2005 2009 { 2006 2010 VMCPUSET DestCpuSet; … … 2008 2012 VMCPUSET_ADD(&DestCpuSet, pVCpu->idCpu); 2009 2013 uint8_t const uVector = XAPIC_LVT_GET_VECTOR(uLvt); 2010 2011 Log4(("APIC%u: APICLocalInterrupt: Sending interrupt. enmDeliveryMode=%u u8Pin=%u uVector=%u\n", 2012 pVCpu->idCpu, enmDeliveryMode, u8Pin, uVector)); 2013 2014 rcStrict = apicSendIntr(pVCpu, uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, rcRZ); 2014 rcStrict = apicSendIntr(pVCpu->CTX_SUFF(pVM), pVCpu, uVector, enmTriggerMode, enmDeliveryMode, &DestCpuSet, 2015 rcRZ); 2016 break; 2017 } 2018 2019 case XAPICDELIVERYMODE_EXTINT: 2020 { 2021 Log4(("APIC%u: APICLocalInterrupt: External interrupt. u8Pin=%u u8Level=%u\n", pVCpu->idCpu, u8Pin, u8Level)); 2022 if (u8Level) 2023 APICSetInterruptFF(pVCpu, PDMAPICIRQ_EXTINT); 2024 else 2025 APICClearInterruptFF(pVCpu, PDMAPICIRQ_EXTINT); 2015 2026 break; 2016 2027 } … … 2148 2159 #endif 2149 2160 2150 LogRel(("APIC%u: APICWriteMmio: offReg=%#RX16 \n", pVCpu->idCpu, offReg));2161 LogRel(("APIC%u: APICWriteMmio: offReg=%#RX16 uValue=%#RX32\n", pVCpu->idCpu, offReg, uValue)); 2151 2162 2152 2163 int rc = VBOXSTRICTRC_VAL(apicWriteRegister(pApicDev, pVCpu, offReg, uValue));
Note:
See TracChangeset
for help on using the changeset viewer.