- Timestamp:
- Apr 10, 2023 5:44:28 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r99317 r99360 339 339 * @param pVM The cross context VM structure. 340 340 * @param pPhysHandler The physical handler. 341 * @param GCPhys The address of the virtual VMX APIC-access page. 341 * @param GCPhys The address of the virtual VMX APIC-access page. Must be 342 * page aligned. 342 343 */ 343 344 static int pgmHandlerPhysicalRegisterVmxApicAccessPage(PVMCC pVM, PPGMPHYSHANDLER pPhysHandler, RTGCPHYS GCPhys) … … 454 455 * 455 456 * @param pVM The cross context VM structure. 456 * @param GCPhys Start physical address. 457 * @param GCPhys The address of the VMX virtual-APIC access page. Must be 458 * page aligned. 457 459 * @param hType The handler type registration handle. 458 460 */ … … 461 463 PCPGMPHYSHANDLERTYPEINT const pType = pgmHandlerPhysicalTypeHandleToPtr(pVM, hType); 462 464 AssertReturn(pType, VERR_INVALID_HANDLE); 463 AssertReturn(pType->enmKind == PGMPHYSHANDLERKIND_ALL, VERR_INVALID_HANDLE); 464 AssertMsgReturn(!(GCPhys & GUEST_PAGE_OFFSET_MASK), ("%RGp\n", GCPhys), VERR_INVALID_PARAMETER); 465 AssertMsg(!(GCPhys & GUEST_PAGE_OFFSET_MASK), ("%RGp\n", GCPhys)); 465 466 466 467 /* 467 468 * Find if the VMX APIC access page has already been registered at this address. 468 469 */ 469 int rc = PGM_LOCK _VOID(pVM);470 int rc = PGM_LOCK(pVM); 470 471 AssertRCReturn(rc, rc); 471 472 … … 481 482 482 483 /* Check it's the virtual VMX APIC-access page. */ 483 if ( pHandlerType->fNotInHm 484 && pHandlerType->enmKind == PGMPHYSHANDLERKIND_ALL) 484 if (pHandlerType->fNotInHm) 485 { 486 Assert(pHandlerType->enmKind == PGMPHYSHANDLERKIND_ALL); 485 487 rc = VINF_SUCCESS; 488 } 486 489 else 487 490 { … … 494 497 return rc; 495 498 } 499 500 /* 501 * Validate the page handler parameters before registering the virtual VMX APIC-access page. 502 */ 503 AssertReturn(pType->enmKind == PGMPHYSHANDLERKIND_ALL, VERR_INVALID_HANDLE); 504 AssertReturn(pType->fNotInHm, VERR_PGM_HANDLER_IPE_1); 496 505 497 506 /*
Note:
See TracChangeset
for help on using the changeset viewer.