Changeset 60542 in vbox
- Timestamp:
- Apr 18, 2016 3:02:26 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
include/VBox/vmm/vm.h (modified) (2 diffs)
-
src/VBox/VMM/VMMAll/APICAll.cpp (modified) (4 diffs)
-
src/VBox/VMM/VMMR3/APIC.cpp (modified) (6 diffs)
-
src/VBox/VMM/include/APICInternal.h (modified) (2 diffs)
-
src/VBox/VMM/testcase/Makefile.kmk (modified) (6 diffs)
-
src/VBox/VMM/testcase/tstVMStruct.h (modified) (5 diffs)
-
src/VBox/VMM/testcase/tstVMStructDTrace.cpp (modified) (2 diffs)
-
src/VBox/VMM/testcase/tstVMStructRC.cpp (modified) (2 diffs)
-
src/VBox/VMM/testcase/tstVMStructSize.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r60307 r60542 237 237 struct APICCPU s; 238 238 # endif 239 uint8_t padding[ 512]; /* multiple of 64 */239 uint8_t padding[640]; /* multiple of 64 */ 240 240 } apic; 241 241 #endif … … 243 243 /** Align the following members on page boundary. */ 244 244 #ifdef VBOX_WITH_NEW_APIC 245 uint8_t abAlignment2[2 880];245 uint8_t abAlignment2[2752]; 246 246 #else 247 247 uint8_t abAlignment2[3392]; -
trunk/src/VBox/VMM/VMMAll/APICAll.cpp
r60523 r60542 92 92 93 93 /** 94 * Checks if a vector is set in an APIC Pending Interrupt Bitmap (PIB).94 * Checks if a vector is set in an APIC Pending-Interrupt Bitmap (PIB). 95 95 * 96 96 * @returns true if the specified vector is set, false otherwise. … … 128 128 129 129 /** 130 * Sets the vector in an APIC Pending Interrupt Bitmap (PIB).130 * Sets the vector in an APIC Pending-Interrupt Bitmap (PIB). 131 131 * 132 132 * @param pvPib Opaque pointer to the PIB. … … 140 140 141 141 /** 142 * Clears the vector in an APIC Pending Interrupt Bitmap (PIB).142 * Clears the vector in an APIC Pending-Interrupt Bitmap (PIB). 143 143 * 144 144 * @param pvPib Opaque pointer to the PIB. … … 2155 2155 AssertReturn(u8Pin <= 1, VERR_INVALID_PARAMETER); 2156 2156 AssertReturn(u8Level <= 1, VERR_INVALID_PARAMETER); 2157 2158 2157 LogFlow(("APIC%u: APICLocalInterrupt\n", pVCpu->idCpu)); 2159 2158 2160 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); 2161 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 2159 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 2162 2160 2163 2161 /* If the APIC is enabled, the interrupt is subject to LVT programming. */ 2164 2162 if (apicIsEnabled(pVCpu)) 2165 2163 { 2164 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); 2165 2166 2166 /* Pick the LVT entry corresponding to the interrupt pin. */ 2167 2167 static const uint16_t s_au16LvtOffsets[] = -
trunk/src/VBox/VMM/VMMR3/APIC.cpp
r60516 r60542 207 207 memset((void *)&pX2ApicPage->self_ipi, 0, sizeof(pX2ApicPage->self_ipi)); 208 208 209 /* Clear the p ostedinterrupt bitmaps. */209 /* Clear the pending-interrupt bitmaps. */ 210 210 PAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu); 211 211 memset((void *)&pApicCpu->ApicPibLevel, 0, sizeof(APICPIB)); … … 251 251 LogFlow(("APIC%u: APICR3Reset\n", pVCpu->idCpu)); 252 252 253 #ifdef RT_STRICT253 #ifdef VBOX_STRICT 254 254 /* Verify that the initial APIC ID reported via CPUID matches our VMCPU ID assumption. */ 255 CPUMCPUIDLEAF CpuLeaf;256 int rc = CPUMR3CpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), &CpuLeaf, 1, 0);257 AssertRC(rc);258 Assert((( CpuLeaf.uEbx >> 24) & 0xff) == pVCpu->idCpu);255 uint32_t uEax, uEbx, uEcx, uEdx; 256 uEax = uEbx = uEcx = uEdx = UINT32_MAX; 257 CPUMGetGuestCpuId(pVCpu, 1, 0, &uEax, &uEbx, &uEcx, &uEdx); 258 Assert(((uEbx >> 24) & 0xff) == pVCpu->idCpu); 259 259 #endif 260 260 261 /* 262 * The state following a power-up or reset is a superset of the INIT state. 263 * See Intel spec. 10.4.7.3 "Local APIC State After an INIT Reset ('Wait-for-SIPI' State)" 264 */ 261 265 apicR3InitIpi(pVCpu); 262 263 PXAPICPAGE pXApicPage = VMCPU_TO_XAPICPAGE(pVCpu);264 266 265 267 /* … … 268 270 * The version determines the number of LVT entries and size of the APIC ID (8 bits for P4). 269 271 */ 272 PXAPICPAGE pXApicPage = VMCPU_TO_XAPICPAGE(pVCpu); 270 273 #if XAPIC_HARDWARE_VERSION == XAPIC_HARDWARE_VERSION_P4 271 274 pXApicPage->version.u.u8MaxLvtEntry = XAPIC_MAX_LVT_ENTRIES_P4 - 1; … … 276 279 #endif 277 280 278 /** @todo It isn't very clear where the default base address is (re)initialized,279 * atm we do it here in Reset. */281 /** @todo It isn't clear in the spec. where exactly the default base address 282 * is (re)initialized, atm we do it here in Reset. */ 280 283 apicR3ResetBaseMsr(pVCpu); 281 284 … … 985 988 SupApicPage.Phys = NIL_RTHCPHYS; 986 989 990 Assert(pVCpu->idCpu == idCpu); 987 991 Assert(pApicCpu->pvApicPageR3 == NIL_RTR0PTR); 988 992 Assert(pApicCpu->pvApicPageR0 == NIL_RTR0PTR); … … 1154 1158 pApic->pApicDevRC = PDMINS_2_DATA_RCPTR(pDevIns); 1155 1159 1156 rc = apicR3InitState(pVM); 1157 AssertRCReturn(rc, rc); 1160 apicR3InitState(pVM); 1158 1161 1159 1162 /* -
trunk/src/VBox/VMM/include/APICInternal.h
r60516 r60542 441 441 /** @} */ 442 442 443 /** @name The APIC pending interrupt bitmap (PIB).443 /** @name The APIC pending-interrupt bitmap (PIB). 444 444 * @{ */ 445 445 /** The host-context physical address of the PIB. */ … … 519 519 /** @} */ 520 520 521 /** @name The pending interrupt bitmaps (PIB).521 /** @name The pending-interrupt bitmaps (PIB). 522 522 * @{ */ 523 523 /** The host-context physical address of the page. */ -
trunk/src/VBox/VMM/testcase/Makefile.kmk
r60425 r60542 152 152 tstVMStructRC_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 153 153 endif 154 ifdef VBOX_WITH_NEW_APIC 155 tstVMStructRC_DEFS += VBOX_WITH_NEW_APIC 156 endif 154 157 tstVMStructRC_SOURCES = tstVMStructRC.cpp 155 158 tstVMStructRC_INCS = \ … … 177 180 tstVMStructSize_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 178 181 endif 182 ifdef VBOX_WITH_NEW_APIC 183 tstVMStructSize_DEFS += VBOX_WITH_NEW_APIC 184 endif 179 185 180 186 tstAsmStructs_TEMPLATE = VBOXR3AUTOTST … … 188 194 ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 189 195 tstAsmStructs_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 196 endif 197 ifdef VBOX_WITH_NEW_APIC 198 tstAsmStructs_DEFS += VBOX_WITH_NEW_APIC 190 199 endif 191 200 tstAsmStructs_INCS = \ … … 203 212 ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 204 213 tstAsmStructsRC_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 214 endif 215 ifdef VBOX_WITH_NEW_APIC 216 tstAsmStructsRC_DEFS += VBOX_WITH_NEW_APIC 205 217 endif 206 218 tstAsmStructsRC_INCS = \ … … 482 494 tstVMStructDTrace_DEFS += VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI 483 495 endif 496 ifdef VBOX_WITH_NEW_APIC 497 tstVMStructDTrace_DEFS += VBOX_WITH_NEW_APIC 498 endif 484 499 485 500 … … 523 538 $(DEFS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \ 524 539 $(if $(VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI),VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI,) \ 540 $(if $(VBOX_WITH_NEW_APIC),VBOX_WITH_NEW_APIC,) \ 525 541 ) \ 526 542 -f $(if $(eq $(KBUILD_TARGET),darwin),macho,elf) \ -
trunk/src/VBox/VMM/testcase/tstVMStruct.h
r60403 r60542 8 8 9 9 /* 10 * Copyright (C) 2006-201 5Oracle Corporation10 * Copyright (C) 2006-2016 Oracle Corporation 11 11 * 12 12 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1364 1364 #endif 1365 1365 1366 #ifdef VBOX_WITH_NEW_APIC 1367 GEN_CHECK_SIZE(APIC); 1368 GEN_CHECK_OFF(APIC, pApicDevR0); 1369 GEN_CHECK_OFF(APIC, pApicDevR3); 1370 GEN_CHECK_OFF(APIC, pApicDevRC); 1371 GEN_CHECK_OFF(APIC, pvApicPibR0); 1372 GEN_CHECK_OFF(APIC, pvApicPibR3); 1373 GEN_CHECK_OFF(APIC, pvApicPibRC); 1374 GEN_CHECK_OFF(APIC, cbApicPib); 1375 GEN_CHECK_OFF(APIC, enmOriginalMode); 1376 GEN_CHECK_OFF(APICCPU, pvApicPageR0); 1377 GEN_CHECK_OFF(APICCPU, pvApicPageR3); 1378 GEN_CHECK_OFF(APICCPU, pvApicPageRC); 1379 GEN_CHECK_OFF(APICCPU, pvApicPageRC); 1380 GEN_CHECK_OFF(APICCPU, cbApicPage); 1381 GEN_CHECK_OFF(APICCPU, pvApicPibR0); 1382 GEN_CHECK_OFF(APICCPU, pvApicPibR3); 1383 GEN_CHECK_OFF(APICCPU, pvApicPibRC); 1384 GEN_CHECK_OFF(APICCPU, ApicPibLevel); 1385 GEN_CHECK_OFF(APICCPU, pTimerR0); 1386 GEN_CHECK_OFF(APICCPU, pTimerR3); 1387 GEN_CHECK_OFF(APICCPU, pTimerRC); 1388 GEN_CHECK_OFF(APICCPU, TimerCritSect); 1389 #endif 1366 1390 1367 1391 GEN_CHECK_SIZE(VM); … … 1425 1449 GEN_CHECK_OFF(VM, ftm); 1426 1450 GEN_CHECK_OFF(VM, rem); 1451 GEN_CHECK_OFF(VM, gim); 1427 1452 GEN_CHECK_OFF(VM, vm); 1428 1453 GEN_CHECK_OFF(VM, cfgm); 1454 #ifdef VBOX_WITH_NEW_APIC 1455 GEN_CHECK_OFF(VM, apic); 1456 #endif 1429 1457 GEN_CHECK_OFF(VM, aCpus); 1430 1458 … … 1444 1472 GEN_CHECK_OFF(VMCPU, uAdHoc); 1445 1473 GEN_CHECK_OFF(VMCPU, aStatAdHoc); 1446 GEN_CHECK_OFF(VMCPU, cpum);1447 1474 GEN_CHECK_OFF(VMCPU, hm); 1448 1475 GEN_CHECK_OFF(VMCPU, em); … … 1454 1481 GEN_CHECK_OFF(VMCPU, iom); 1455 1482 GEN_CHECK_OFF(VMCPU, dbgf); 1483 GEN_CHECK_OFF(VMCPU, gim); 1484 #ifdef VBOX_WITH_NEW_APIC 1485 GEN_CHECK_OFF(VMCPU, apic); 1486 #endif 1456 1487 GEN_CHECK_OFF(VMCPU, pgm); 1488 GEN_CHECK_OFF(VMCPU, cpum); 1457 1489 1458 1490 #ifndef VBOX_FOR_DTRACE_LIB -
trunk/src/VBox/VMM/testcase/tstVMStructDTrace.cpp
r57358 r60542 7 7 8 8 /* 9 * Copyright (C) 2006-201 5Oracle Corporation9 * Copyright (C) 2006-2016 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 43 43 #include "REMInternal.h" 44 44 #include "HMInternal.h" 45 #ifdef VBOX_WITH_NEW_APIC 46 # include "APICInternal.h" 47 #endif 45 48 #include "VMMInternal.h" 46 49 #include "DBGFInternal.h" -
trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp
r57358 r60542 9 9 10 10 /* 11 * Copyright (C) 2006-201 5Oracle Corporation11 * Copyright (C) 2006-2016 Oracle Corporation 12 12 * 13 13 * This file is part of VirtualBox Open Source Edition (OSE), as … … 71 71 #include "REMInternal.h" 72 72 #include "HMInternal.h" 73 #ifdef VBOX_WITH_NEW_APIC 74 # include "APICInternal.h" 75 #endif 73 76 #include "PATMInternal.h" 74 77 #include "VMMInternal.h" -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r60307 r60542 7 7 8 8 /* 9 * Copyright (C) 2006-201 5Oracle Corporation9 * Copyright (C) 2006-2016 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 46 46 #include "DBGFInternal.h" 47 47 #include "GIMInternal.h" 48 #include "APICInternal.h" 48 #ifdef VBOX_WITH_NEW_APIC 49 # include "APICInternal.h" 50 #endif 49 51 #include "STAMInternal.h" 50 52 #include "VMInternal.h"
Note:
See TracChangeset
for help on using the changeset viewer.

