Changeset 89407 in vbox for trunk/include
- Timestamp:
- May 31, 2021 4:32:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/iommu-intel.h
r89365 r89407 517 517 518 518 519 /** @name Second-Level P aging Entry.519 /** @name Second-Level PML5E. 520 520 * In accordance with the Intel spec. 521 521 * @{ */ 522 522 /** R: Read. */ 523 #define VTD_BF_SL P_ENTRY_R_SHIFT0524 #define VTD_BF_SL P_ENTRY_R_MASKUINT64_C(0x0000000000000001)523 #define VTD_BF_SL_PML5E_R_SHIFT 0 524 #define VTD_BF_SL_PML5E_R_MASK UINT64_C(0x0000000000000001) 525 525 /** W: Write. */ 526 #define VTD_BF_SL P_ENTRY_W_SHIFT1527 #define VTD_BF_SL P_ENTRY_W_MASKUINT64_C(0x0000000000000002)526 #define VTD_BF_SL_PML5E_W_SHIFT 1 527 #define VTD_BF_SL_PML5E_W_MASK UINT64_C(0x0000000000000002) 528 528 /** X: Execute. */ 529 #define VTD_BF_SL P_ENTRY_X_SHIFT2530 #define VTD_BF_SL P_ENTRY_X_MASKUINT64_C(0x0000000000000004)529 #define VTD_BF_SL_PML5E_X_SHIFT 2 530 #define VTD_BF_SL_PML5E_X_MASK UINT64_C(0x0000000000000004) 531 531 /** IGN: Ignored (bits 6:3). */ 532 #define VTD_BF_SL P_ENTRY_IGN_6_3_SHIFT3533 #define VTD_BF_SL P_ENTRY_IGN_6_3_MASKUINT64_C(0x0000000000000078)532 #define VTD_BF_SL_PML5E_IGN_6_3_SHIFT 3 533 #define VTD_BF_SL_PML5E_IGN_6_3_MASK UINT64_C(0x0000000000000078) 534 534 /** R: Reserved (bit 7). */ 535 #define VTD_BF_SL P_ENTRY_RSVD_7_SHIFT7536 #define VTD_BF_SL P_ENTRY_RSVD_7_MASKUINT64_C(0x0000000000000080)535 #define VTD_BF_SL_PML5E_RSVD_7_SHIFT 7 536 #define VTD_BF_SL_PML5E_RSVD_7_MASK UINT64_C(0x0000000000000080) 537 537 /** A: Accessed. */ 538 #define VTD_BF_SL P_ENTRY_A_SHIFT8539 #define VTD_BF_SL P_ENTRY_A_MASKUINT64_C(0x0000000000000100)538 #define VTD_BF_SL_PML5E_A_SHIFT 8 539 #define VTD_BF_SL_PML5E_A_MASK UINT64_C(0x0000000000000100) 540 540 /** IGN: Ignored (bits 10:9). */ 541 #define VTD_BF_SL P_ENTRY_IGN_10_9_SHIFT9542 #define VTD_BF_SL P_ENTRY_IGN_10_9_MASKUINT64_C(0x0000000000000600)541 #define VTD_BF_SL_PML5E_IGN_10_9_SHIFT 9 542 #define VTD_BF_SL_PML5E_IGN_10_9_MASK UINT64_C(0x0000000000000600) 543 543 /** R: Reserved (bit 11). */ 544 #define VTD_BF_SL P_ENTRY_RSVD_11_SHIFT11545 #define VTD_BF_SL P_ENTRY_RSVD_11_MASKUINT64_C(0x0000000000000800)544 #define VTD_BF_SL_PML5E_RSVD_11_SHIFT 11 545 #define VTD_BF_SL_PML5E_RSVD_11_MASK UINT64_C(0x0000000000000800) 546 546 /** ADDR: Address. */ 547 #define VTD_BF_SL P_ENTRY_ADDR_SHIFT12548 #define VTD_BF_SL P_ENTRY_ADDR_MASKUINT64_C(0x000ffffffffff000)547 #define VTD_BF_SL_PML5E_ADDR_SHIFT 12 548 #define VTD_BF_SL_PML5E_ADDR_MASK UINT64_C(0x000ffffffffff000) 549 549 /** IGN: Ignored (bits 61:52). */ 550 #define VTD_BF_SL P_ENTRY_IGN_61_52_SHIFT52551 #define VTD_BF_SL P_ENTRY_IGN_61_52_MASKUINT64_C(0x3ff0000000000000)550 #define VTD_BF_SL_PML5E_IGN_61_52_SHIFT 52 551 #define VTD_BF_SL_PML5E_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 552 552 /** R: Reserved (bit 62). */ 553 #define VTD_BF_SL P_ENTRY_RSVD_62_SHIFT62554 #define VTD_BF_SL P_ENTRY_RSVD_62_MASKUINT64_C(0x4000000000000000)553 #define VTD_BF_SL_PML5E_RSVD_62_SHIFT 62 554 #define VTD_BF_SL_PML5E_RSVD_62_MASK UINT64_C(0x4000000000000000) 555 555 /** IGN: Ignored (bit 63). */ 556 #define VTD_BF_SL P_ENTRY_IGN_63_SHIFT63557 #define VTD_BF_SL P_ENTRY_IGN_63_MASKUINT64_C(0x8000000000000000)558 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL P_ENTRY_, UINT64_C(0), UINT64_MAX,556 #define VTD_BF_SL_PML5E_IGN_63_SHIFT 63 557 #define VTD_BF_SL_PML5E_IGN_63_MASK UINT64_C(0x8000000000000000) 558 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PML5E_, UINT64_C(0), UINT64_MAX, 559 559 (R, W, X, IGN_6_3, RSVD_7, A, IGN_10_9, RSVD_11, ADDR, IGN_61_52, RSVD_62, IGN_63)); 560 560 561 /** SL-PML5E: Valid mask. */ 562 #define VTD_SLP_PML5E_VALID_MASK ( VTD_BF_SLP_ENTRY_R_MASK | VTD_BF_SLP_ENTRY_W_MASK \ 563 | VTD_BF_SLP_ENTRY_X_MASK | VTD_BF_SLP_ENTRY_IGN_6_3_MASK \ 564 | VTD_BF_SLP_ENTRY_A_MASK | VTD_BF_SLP_ENTRY_IGN_10_9_MASK \ 565 | VTD_BF_SLP_ENTRY_ADDR_MASK | VTD_BF_SLP_ENTRY_IGN_61_52_MASK \ 566 | VTD_BF_SLP_ENTRY_IGN_63_MASK) 567 561 /** Second-level PML5E valid mask. */ 562 #define VTD_SL_PML5E_VALID_MASK ( VTD_BF_SL_PML5E_R_MASK | VTD_BF_SL_PML5E_W_MASK \ 563 | VTD_BF_SL_PML5E_X_MASK | VTD_BF_SL_PML5E_IGN_6_3_MASK \ 564 | VTD_BF_SL_PML5E_A_MASK | VTD_BF_SL_PML5E_IGN_10_9_MASK \ 565 | VTD_BF_SL_PML5E_ADDR_MASK | VTD_BF_SL_PML5E_IGN_61_52_MASK \ 566 | VTD_BF_SL_PML5E_IGN_63_MASK) 567 /** @} */ 568 569 570 /** @name Second-Level PML4E. 571 * In accordance with the Intel spec. 572 * @{ */ 573 /** R: Read. */ 574 #define VTD_BF_SL_PML4E_R_SHIFT 0 575 #define VTD_BF_SL_PML4E_R_MASK UINT64_C(0x0000000000000001) 576 /** W: Write. */ 577 #define VTD_BF_SL_PML4E_W_SHIFT 1 578 #define VTD_BF_SL_PML4E_W_MASK UINT64_C(0x0000000000000002) 579 /** X: Execute. */ 580 #define VTD_BF_SL_PML4E_X_SHIFT 2 581 #define VTD_BF_SL_PML4E_X_MASK UINT64_C(0x0000000000000004) 582 /** IGN: Ignored (bits 6:3). */ 583 #define VTD_BF_SL_PML4E_IGN_6_3_SHIFT 3 584 #define VTD_BF_SL_PML4E_IGN_6_3_MASK UINT64_C(0x0000000000000078) 585 /** R: Reserved (bit 7). */ 586 #define VTD_BF_SL_PML4E_RSVD_7_SHIFT 7 587 #define VTD_BF_SL_PML4E_RSVD_7_MASK UINT64_C(0x0000000000000080) 588 /** A: Accessed. */ 589 #define VTD_BF_SL_PML4E_A_SHIFT 8 590 #define VTD_BF_SL_PML4E_A_MASK UINT64_C(0x0000000000000100) 591 /** IGN: Ignored (bits 10:9). */ 592 #define VTD_BF_SL_PML4E_IGN_10_9_SHIFT 9 593 #define VTD_BF_SL_PML4E_IGN_10_9_MASK UINT64_C(0x0000000000000600) 594 /** R: Reserved (bit 11). */ 595 #define VTD_BF_SL_PML4E_RSVD_11_SHIFT 11 596 #define VTD_BF_SL_PML4E_RSVD_11_MASK UINT64_C(0x0000000000000800) 597 /** ADDR: Address. */ 598 #define VTD_BF_SL_PML4E_ADDR_SHIFT 12 599 #define VTD_BF_SL_PML4E_ADDR_MASK UINT64_C(0x000ffffffffff000) 600 /** IGN: Ignored (bits 61:52). */ 601 #define VTD_BF_SL_PML4E_IGN_61_52_SHIFT 52 602 #define VTD_BF_SL_PML4E_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 603 /** R: Reserved (bit 62). */ 604 #define VTD_BF_SL_PML4E_RSVD_62_SHIFT 62 605 #define VTD_BF_SL_PML4E_RSVD_62_MASK UINT64_C(0x4000000000000000) 606 /** IGN: Ignored (bit 63). */ 607 #define VTD_BF_SL_PML4E_IGN_63_SHIFT 63 608 #define VTD_BF_SL_PML4E_IGN_63_MASK UINT64_C(0x8000000000000000) 609 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PML4E_, UINT64_C(0), UINT64_MAX, 610 (R, W, X, IGN_6_3, RSVD_7, A, IGN_10_9, RSVD_11, ADDR, IGN_61_52, RSVD_62, IGN_63)); 611 612 /** Second-level PML4E valid mask. */ 613 #define VTD_SL_PML4E_VALID_MASK VTD_SL_PML5E_VALID_MASK 614 /** @} */ 615 616 617 /** @name Second-Level PDPE (1GB Page). 618 * In accordance with the Intel spec. 619 * @{ */ 620 /** R: Read. */ 621 #define VTD_BF_SL_PDPE1G_R_SHIFT 0 622 #define VTD_BF_SL_PDPE1G_R_MASK UINT64_C(0x0000000000000001) 623 /** W: Write. */ 624 #define VTD_BF_SL_PDPE1G_W_SHIFT 1 625 #define VTD_BF_SL_PDPE1G_W_MASK UINT64_C(0x0000000000000002) 626 /** X: Execute. */ 627 #define VTD_BF_SL_PDPE1G_X_SHIFT 2 628 #define VTD_BF_SL_PDPE1G_X_MASK UINT64_C(0x0000000000000004) 629 /** EMT: Extended Memory Type. */ 630 #define VTD_BF_SL_PDPE1G_EMT_SHIFT 3 631 #define VTD_BF_SL_PDPE1G_EMT_MASK UINT64_C(0x0000000000000038) 632 /** IPAT: Ignore PAT (Page Attribute Table). */ 633 #define VTD_BF_SL_PDPE1G_IPAT_SHIFT 6 634 #define VTD_BF_SL_PDPE1G_IPAT_MASK UINT64_C(0x0000000000000040) 635 /** PS: Page Size (MB1). */ 636 #define VTD_BF_SL_PDPE1G_PS_SHIFT 7 637 #define VTD_BF_SL_PDPE1G_PS_MASK UINT64_C(0x0000000000000080) 638 /** A: Accessed. */ 639 #define VTD_BF_SL_PDPE1G_A_SHIFT 8 640 #define VTD_BF_SL_PDPE1G_A_MASK UINT64_C(0x0000000000000100) 641 /** D: Dirty. */ 642 #define VTD_BF_SL_PDPE1G_D_SHIFT 9 643 #define VTD_BF_SL_PDPE1G_D_MASK UINT64_C(0x0000000000000200) 644 /** IGN: Ignored (bit 10). */ 645 #define VTD_BF_SL_PDPE1G_IGN_10_SHIFT 10 646 #define VTD_BF_SL_PDPE1G_IGN_10_MASK UINT64_C(0x0000000000000400) 647 /** R: Reserved (bit 11). */ 648 #define VTD_BF_SL_PDPE1G_RSVD_11_SHIFT 11 649 #define VTD_BF_SL_PDPE1G_RSVD_11_MASK UINT64_C(0x0000000000000800) 650 /** R: Reserved (bits 29:12). */ 651 #define VTD_BF_SL_PDPE1G_RSVD_29_12_SHIFT 12 652 #define VTD_BF_SL_PDPE1G_RSVD_29_12_MASK UINT64_C(0x000000003ffff000) 653 /** ADDR: Address of 1GB page. */ 654 #define VTD_BF_SL_PDPE1G_ADDR_SHIFT 30 655 #define VTD_BF_SL_PDPE1G_ADDR_MASK UINT64_C(0x000fffffc0000000) 656 /** IGN: Ignored (bits 61:52). */ 657 #define VTD_BF_SL_PDPE1G_IGN_61_52_SHIFT 52 658 #define VTD_BF_SL_PDPE1G_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 659 /** R: Reserved (bit 62). */ 660 #define VTD_BF_SL_PDPE1G_RSVD_62_SHIFT 62 661 #define VTD_BF_SL_PDPE1G_RSVD_62_MASK UINT64_C(0x4000000000000000) 662 /** IGN: Ignored (bit 63). */ 663 #define VTD_BF_SL_PDPE1G_IGN_63_SHIFT 63 664 #define VTD_BF_SL_PDPE1G_IGN_63_MASK UINT64_C(0x8000000000000000) 665 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PDPE1G_, UINT64_C(0), UINT64_MAX, 666 (R, W, X, EMT, IPAT, PS, A, D, IGN_10, RSVD_11, RSVD_29_12, ADDR, IGN_61_52, RSVD_62, IGN_63)); 667 668 /** Second-level PDPE (1GB Page) valid mask. */ 669 #define VTD_SL_PDPE1G_VALID_MASK ( VTD_BF_SL_PDPE1G_R_MASK | VTD_BF_SL_PDPE1G_W_MASK \ 670 | VTD_BF_SL_PDPE1G_X_MASK | VTD_BF_SL_PDPE1G_EMT_MASK \ 671 | VTD_BF_SL_PDPE1G_IPAT_MASK | VTD_BF_SL_PDPE1G_PS_MASK \ 672 | VTD_BF_SL_PDPE1G_A_MASK | VTD_BF_SL_PDPE1G_D_MASK \ 673 | VTD_BF_SL_PDPE1G_IGN_10_MASK | VTD_BF_SL_PDPE1G_ADDR_MASK \ 674 | VTD_BF_SL_PDPE1G_IGN_61_52_MASK | VTD_BF_SL_PDPE1G_IGN_63_MASK) 675 /** @} */ 676 677 678 /** @name Second-Level PDPE. 679 * In accordance with the Intel spec. 680 * @{ */ 681 /** R: Read. */ 682 #define VTD_BF_SL_PDPE_R_SHIFT 0 683 #define VTD_BF_SL_PDPE_R_MASK UINT64_C(0x0000000000000001) 684 /** W: Write. */ 685 #define VTD_BF_SL_PDPE_W_SHIFT 1 686 #define VTD_BF_SL_PDPE_W_MASK UINT64_C(0x0000000000000002) 687 /** X: Execute. */ 688 #define VTD_BF_SL_PDPE_X_SHIFT 2 689 #define VTD_BF_SL_PDPE_X_MASK UINT64_C(0x0000000000000004) 690 /** IGN: Ignored (bits 6:3). */ 691 #define VTD_BF_SL_PDPE_IGN_6_3_SHIFT 3 692 #define VTD_BF_SL_PDPE_IGN_6_3_MASK UINT64_C(0x0000000000000078) 693 /** PS: Page Size (MBZ). */ 694 #define VTD_BF_SL_PDPE_PS_SHIFT 7 695 #define VTD_BF_SL_PDPE_PS_MASK UINT64_C(0x0000000000000080) 696 /** A: Accessed. */ 697 #define VTD_BF_SL_PDPE_A_SHIFT 8 698 #define VTD_BF_SL_PDPE_A_MASK UINT64_C(0x0000000000000100) 699 /** IGN: Ignored (bits 10:9). */ 700 #define VTD_BF_SL_PDPE_IGN_10_9_SHIFT 9 701 #define VTD_BF_SL_PDPE_IGN_10_9_MASK UINT64_C(0x0000000000000600) 702 /** R: Reserved (bit 11). */ 703 #define VTD_BF_SL_PDPE_RSVD_11_SHIFT 11 704 #define VTD_BF_SL_PDPE_RSVD_11_MASK UINT64_C(0x0000000000000800) 705 /** ADDR: Address of second-level PDT. */ 706 #define VTD_BF_SL_PDPE_ADDR_SHIFT 12 707 #define VTD_BF_SL_PDPE_ADDR_MASK UINT64_C(0x000ffffffffff000) 708 /** IGN: Ignored (bits 61:52). */ 709 #define VTD_BF_SL_PDPE_IGN_61_52_SHIFT 52 710 #define VTD_BF_SL_PDPE_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 711 /** R: Reserved (bit 62). */ 712 #define VTD_BF_SL_PDPE_RSVD_62_SHIFT 62 713 #define VTD_BF_SL_PDPE_RSVD_62_MASK UINT64_C(0x4000000000000000) 714 /** IGN: Ignored (bit 63). */ 715 #define VTD_BF_SL_PDPE_IGN_63_SHIFT 63 716 #define VTD_BF_SL_PDPE_IGN_63_MASK UINT64_C(0x8000000000000000) 717 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PDPE_, UINT64_C(0), UINT64_MAX, 718 (R, W, X, IGN_6_3, PS, A, IGN_10_9, RSVD_11, ADDR, IGN_61_52, RSVD_62, IGN_63)); 719 720 /** Second-level PDPE valid mask. */ 721 #define VTD_SL_PDPE_VALID_MASK ( VTD_BF_SL_PDPE_R_MASK | VTD_BF_SL_PDPE_W_MASK \ 722 | VTD_BF_SL_PDPE_X_MASK | VTD_BF_SL_PDPE_IGN_6_3_MASK \ 723 | VTD_BF_SL_PDPE_PS_MASK | VTD_BF_SL_PDPE_A_MASK \ 724 | VTD_BF_SL_PDPE_IGN_10_9_MASK | VTD_BF_SL_PDPE_ADDR_MASK \ 725 | VTD_BF_SL_PDPE_IGN_61_52_MASK | VTD_BF_SL_PDPE_IGN_63_MASK) 726 /** @} */ 727 728 729 /** @name Second-Level PDE (2MB Page). 730 * In accordance with the Intel spec. 731 * @{ */ 732 /** R: Read. */ 733 #define VTD_BF_SL_PDE2M_R_SHIFT 0 734 #define VTD_BF_SL_PDE2M_R_MASK UINT64_C(0x0000000000000001) 735 /** W: Write. */ 736 #define VTD_BF_SL_PDE2M_W_SHIFT 1 737 #define VTD_BF_SL_PDE2M_W_MASK UINT64_C(0x0000000000000002) 738 /** X: Execute. */ 739 #define VTD_BF_SL_PDE2M_X_SHIFT 2 740 #define VTD_BF_SL_PDE2M_X_MASK UINT64_C(0x0000000000000004) 741 /** EMT: Extended Memory Type. */ 742 #define VTD_BF_SL_PDE2M_EMT_SHIFT 3 743 #define VTD_BF_SL_PDE2M_EMT_MASK UINT64_C(0x0000000000000038) 744 /** IPAT: Ignore PAT (Page Attribute Table). */ 745 #define VTD_BF_SL_PDE2M_IPAT_SHIFT 6 746 #define VTD_BF_SL_PDE2M_IPAT_MASK UINT64_C(0x0000000000000040) 747 /** PS: Page Size (MB1). */ 748 #define VTD_BF_SL_PDE2M_PS_SHIFT 7 749 #define VTD_BF_SL_PDE2M_PS_MASK UINT64_C(0x0000000000000080) 750 /** A: Accessed. */ 751 #define VTD_BF_SL_PDE2M_A_SHIFT 8 752 #define VTD_BF_SL_PDE2M_A_MASK UINT64_C(0x0000000000000100) 753 /** D: Dirty. */ 754 #define VTD_BF_SL_PDE2M_D_SHIFT 9 755 #define VTD_BF_SL_PDE2M_D_MASK UINT64_C(0x0000000000000200) 756 /** IGN: Ignored (bit 10). */ 757 #define VTD_BF_SL_PDE2M_IGN_10_SHIFT 10 758 #define VTD_BF_SL_PDE2M_IGN_10_MASK UINT64_C(0x0000000000000400) 759 /** R: Reserved (bit 11). */ 760 #define VTD_BF_SL_PDE2M_RSVD_11_SHIFT 11 761 #define VTD_BF_SL_PDE2M_RSVD_11_MASK UINT64_C(0x0000000000000800) 762 /** R: Reserved (bits 20:12). */ 763 #define VTD_BF_SL_PDE2M_RSVD_20_12_SHIFT 12 764 #define VTD_BF_SL_PDE2M_RSVD_20_12_MASK UINT64_C(0x00000000001ff000) 765 /** ADDR: Address of 2MB page. */ 766 #define VTD_BF_SL_PDE2M_ADDR_SHIFT 21 767 #define VTD_BF_SL_PDE2M_ADDR_MASK UINT64_C(0x000fffffffe00000) 768 /** IGN: Ignored (bits 61:52). */ 769 #define VTD_BF_SL_PDE2M_IGN_61_52_SHIFT 52 770 #define VTD_BF_SL_PDE2M_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 771 /** R: Reserved (bit 62). */ 772 #define VTD_BF_SL_PDE2M_RSVD_62_SHIFT 62 773 #define VTD_BF_SL_PDE2M_RSVD_62_MASK UINT64_C(0x4000000000000000) 774 /** IGN: Ignored (bit 63). */ 775 #define VTD_BF_SL_PDE2M_IGN_63_SHIFT 63 776 #define VTD_BF_SL_PDE2M_IGN_63_MASK UINT64_C(0x8000000000000000) 777 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PDE2M_, UINT64_C(0), UINT64_MAX, 778 (R, W, X, EMT, IPAT, PS, A, D, IGN_10, RSVD_11, RSVD_20_12, ADDR, IGN_61_52, RSVD_62, IGN_63)); 779 780 /** Second-level PDE (2MB page) valid mask. */ 781 #define VTD_SL_PDE2M_VALID_MASK ( VTD_BF_SL_PDE2M_R_MASK | VTD_BF_SL_PDE2M_W_MASK \ 782 | VTD_BF_SL_PDE2M_X_MASK | VTD_BF_SL_PDE2M_EMT_MASK \ 783 | VTD_BF_SL_PDE2M_IPAT_MASK | VTD_BF_SL_PDE2M_PS_MASK \ 784 | VTD_BF_SL_PDE2M_A_MASK | VTD_BF_SL_PDE2M_D_MASK \ 785 | VTD_BF_SL_PDE2M_IGN_10_MASK | VTD_BF_SL_PDE2M_ADDR_MASK \ 786 | VTD_BF_SL_PDE2M_IGN_61_52_MASK | VTD_BF_SL_PDE2M_IGN_63_MASK) 787 /** @} */ 788 789 790 /** @name Second-Level PDE. 791 * In accordance with the Intel spec. 792 * @{ */ 793 /** R: Read. */ 794 #define VTD_BF_SL_PDE_R_SHIFT 0 795 #define VTD_BF_SL_PDE_R_MASK UINT64_C(0x0000000000000001) 796 /** W: Write. */ 797 #define VTD_BF_SL_PDE_W_SHIFT 1 798 #define VTD_BF_SL_PDE_W_MASK UINT64_C(0x0000000000000002) 799 /** X: Execute. */ 800 #define VTD_BF_SL_PDE_X_SHIFT 2 801 #define VTD_BF_SL_PDE_X_MASK UINT64_C(0x0000000000000004) 802 /** IGN: Ignored (bits 6:3). */ 803 #define VTD_BF_SL_PDE_IGN_6_3_SHIFT 3 804 #define VTD_BF_SL_PDE_IGN_6_3_MASK UINT64_C(0x0000000000000078) 805 /** PS: Page Size (MBZ). */ 806 #define VTD_BF_SL_PDE_PS_SHIFT 7 807 #define VTD_BF_SL_PDE_PS_MASK UINT64_C(0x0000000000000080) 808 /** A: Accessed. */ 809 #define VTD_BF_SL_PDE_A_SHIFT 8 810 #define VTD_BF_SL_PDE_A_MASK UINT64_C(0x0000000000000100) 811 /** IGN: Ignored (bits 10:9). */ 812 #define VTD_BF_SL_PDE_IGN_10_9_SHIFT 9 813 #define VTD_BF_SL_PDE_IGN_10_9_MASK UINT64_C(0x0000000000000600) 814 /** R: Reserved (bit 11). */ 815 #define VTD_BF_SL_PDE_RSVD_11_SHIFT 11 816 #define VTD_BF_SL_PDE_RSVD_11_MASK UINT64_C(0x0000000000000800) 817 /** ADDR: Address of second-level PT. */ 818 #define VTD_BF_SL_PDE_ADDR_SHIFT 12 819 #define VTD_BF_SL_PDE_ADDR_MASK UINT64_C(0x000ffffffffff000) 820 /** IGN: Ignored (bits 61:52). */ 821 #define VTD_BF_SL_PDE_IGN_61_52_SHIFT 52 822 #define VTD_BF_SL_PDE_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 823 /** R: Reserved (bit 62). */ 824 #define VTD_BF_SL_PDE_RSVD_62_SHIFT 62 825 #define VTD_BF_SL_PDE_RSVD_62_MASK UINT64_C(0x4000000000000000) 826 /** IGN: Ignored (bit 63). */ 827 #define VTD_BF_SL_PDE_IGN_63_SHIFT 63 828 #define VTD_BF_SL_PDE_IGN_63_MASK UINT64_C(0x8000000000000000) 829 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PDE_, UINT64_C(0), UINT64_MAX, 830 (R, W, X, IGN_6_3, PS, A, IGN_10_9, RSVD_11, ADDR, IGN_61_52, RSVD_62, IGN_63)); 831 832 /** Second-level PDE valid mask. */ 833 #define VTD_SL_PDE_VALID_MASK ( VTD_BF_SL_PDE_R_MASK | VTD_BF_SL_PDE_W_MASK \ 834 | VTD_BF_SL_PDE_X_MASK | VTD_BF_SL_PDE_IGN_6_3_MASK \ 835 | VTD_BF_SL_PDE_PS_MASK | VTD_BF_SL_PDE_A_MASK \ 836 | VTD_BF_SL_PDE_IGN_10_9_MASK | VTD_BF_SL_PDE_ADDR_MASK \ 837 | VTD_BF_SL_PDE_IGN_61_52_MASK | VTD_BF_SL_PDE_IGN_63_MASK) 838 /** @} */ 839 840 841 /** @name Second-Level PTE. 842 * In accordance with the Intel spec. 843 * @{ */ 844 /** R: Read. */ 845 #define VTD_BF_SL_PTE_R_SHIFT 0 846 #define VTD_BF_SL_PTE_R_MASK UINT64_C(0x0000000000000001) 847 /** W: Write. */ 848 #define VTD_BF_SL_PTE_W_SHIFT 1 849 #define VTD_BF_SL_PTE_W_MASK UINT64_C(0x0000000000000002) 850 /** X: Execute. */ 851 #define VTD_BF_SL_PTE_X_SHIFT 2 852 #define VTD_BF_SL_PTE_X_MASK UINT64_C(0x0000000000000004) 853 /** EMT: Extended Memory Type. */ 854 #define VTD_BF_SL_PTE_EMT_SHIFT 3 855 #define VTD_BF_SL_PTE_EMT_MASK UINT64_C(0x0000000000000038) 856 /** IPAT: Ignore PAT (Page Attribute Table). */ 857 #define VTD_BF_SL_PTE_IPAT_SHIFT 6 858 #define VTD_BF_SL_PTE_IPAT_MASK UINT64_C(0x0000000000000040) 859 /** IGN: Ignored (bit 7). */ 860 #define VTD_BF_SL_PTE_IGN_7_SHIFT 7 861 #define VTD_BF_SL_PTE_IGN_7_MASK UINT64_C(0x0000000000000080) 862 /** A: Accessed. */ 863 #define VTD_BF_SL_PTE_A_SHIFT 8 864 #define VTD_BF_SL_PTE_A_MASK UINT64_C(0x0000000000000100) 865 /** D: Dirty. */ 866 #define VTD_BF_SL_PTE_D_SHIFT 9 867 #define VTD_BF_SL_PTE_D_MASK UINT64_C(0x0000000000000200) 868 /** IGN: Ignored (bit 10). */ 869 #define VTD_BF_SL_PTE_IGN_10_SHIFT 10 870 #define VTD_BF_SL_PTE_IGN_10_MASK UINT64_C(0x0000000000000400) 871 /** R: Reserved (bit 11). */ 872 #define VTD_BF_SL_PTE_RSVD_11_SHIFT 11 873 #define VTD_BF_SL_PTE_RSVD_11_MASK UINT64_C(0x0000000000000800) 874 /** ADDR: Address of 4K page. */ 875 #define VTD_BF_SL_PTE_ADDR_SHIFT 12 876 #define VTD_BF_SL_PTE_ADDR_MASK UINT64_C(0x000ffffffffff000) 877 /** IGN: Ignored (bits 61:52). */ 878 #define VTD_BF_SL_PTE_IGN_61_52_SHIFT 52 879 #define VTD_BF_SL_PTE_IGN_61_52_MASK UINT64_C(0x3ff0000000000000) 880 /** R: Reserved (bit 62). */ 881 #define VTD_BF_SL_PTE_RSVD_62_SHIFT 62 882 #define VTD_BF_SL_PTE_RSVD_62_MASK UINT64_C(0x4000000000000000) 883 /** IGN: Ignored (bit 63). */ 884 #define VTD_BF_SL_PTE_IGN_63_SHIFT 63 885 #define VTD_BF_SL_PTE_IGN_63_MASK UINT64_C(0x8000000000000000) 886 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_SL_PTE_, UINT64_C(0), UINT64_MAX, 887 (R, W, X, EMT, IPAT, IGN_7, A, D, IGN_10, RSVD_11, ADDR, IGN_61_52, RSVD_62, IGN_63)); 888 889 /** Second-level PTE valid mask. */ 890 #define VTD_SL_PTE_VALID_MASK ( VTD_BF_SL_PTE_R_MASK | VTD_BF_SL_PTE_W_MASK \ 891 | VTD_BF_SL_PTE_X_MASK | VTD_BF_SL_PTE_EMT_MASK \ 892 | VTD_BF_SL_PTE_IPAT_MASK | VTD_BF_SL_PTE_IGN_7_MASK \ 893 | VTD_BF_SL_PTE_A_MASK | VTD_BF_SL_PTE_D_MASK \ 894 | VTD_BF_SL_PTE_IGN_10_MASK | VTD_BF_SL_PTE_RSVD_11_MASK \ 895 | VTD_BF_SL_PTE_ADDR_MASK | VTD_BF_SL_PTE_IGN_61_52_MASK \ 896 | VTD_BF_SL_PTE_RSVD_62_MASK | VTD_BF_SL_PTE_IGN_63_MASK) 897 /** @} */ 898 899 900 /** @name Second-Level Generic Paging Entry. 901 * In accordance with the Intel spec. 902 * @{ */ 568 903 /** Second-Level Paging Entry. */ 569 904 typedef uint64_t VTD_SLP_ENTRY_T; … … 1372 1707 1373 1708 1374 /** @name VT-d faulted request attributes (FRCD_REG::EXE, FRCD_REG::PRIV).1375 * In accordance with the Intel spec.1376 * @{1377 */1378 /** Supervisory privilege was requested. */1379 #define VTD_REQ_ATTR_PRIV RT_BIT(0)1380 /** Execute permission was requested. */1381 #define VTD_REQ_ATTR_EXE RT_BIT(1)1382 /** @} */1383 1384 1385 1709 /** @name Advanced Fault Log Register (AFLOG_REG). 1386 1710 * In accordance with the Intel spec.
Note:
See TracChangeset
for help on using the changeset viewer.