Changeset 13067 in vbox for trunk/src/VBox
- Timestamp:
- Oct 8, 2008 10:11:24 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r13062 r13067 668 668 #define PGM_SHW_TYPE PGM_TYPE_32BIT 669 669 #define PGM_SHW_NAME(name) PGM_SHW_NAME_32BIT(name) 670 #define PGM_SHW_NAME_ GC_STR(name) PGM_SHW_NAME_GC_32BIT_STR(name)670 #define PGM_SHW_NAME_RC_STR(name) PGM_SHW_NAME_RC_32BIT_STR(name) 671 671 #define PGM_SHW_NAME_R0_STR(name) PGM_SHW_NAME_R0_32BIT_STR(name) 672 672 #include "PGMShw.h" … … 675 675 #define PGM_GST_TYPE PGM_TYPE_REAL 676 676 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 677 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_REAL_STR(name)677 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_REAL_STR(name) 678 678 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_REAL_STR(name) 679 679 #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_REAL(name) 680 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_32BIT_REAL_STR(name)680 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_32BIT_REAL_STR(name) 681 681 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_32BIT_REAL_STR(name) 682 682 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_32BIT_PT_FOR_PHYS … … 685 685 #undef BTH_PGMPOOLKIND_PT_FOR_PT 686 686 #undef PGM_BTH_NAME 687 #undef PGM_BTH_NAME_ GC_STR687 #undef PGM_BTH_NAME_RC_STR 688 688 #undef PGM_BTH_NAME_R0_STR 689 689 #undef PGM_GST_TYPE 690 690 #undef PGM_GST_NAME 691 #undef PGM_GST_NAME_ GC_STR691 #undef PGM_GST_NAME_RC_STR 692 692 #undef PGM_GST_NAME_R0_STR 693 693 … … 695 695 #define PGM_GST_TYPE PGM_TYPE_PROT 696 696 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 697 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PROT_STR(name)697 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PROT_STR(name) 698 698 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PROT_STR(name) 699 699 #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_PROT(name) 700 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_32BIT_PROT_STR(name)700 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_32BIT_PROT_STR(name) 701 701 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_32BIT_PROT_STR(name) 702 702 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_32BIT_PT_FOR_PHYS … … 705 705 #undef BTH_PGMPOOLKIND_PT_FOR_PT 706 706 #undef PGM_BTH_NAME 707 #undef PGM_BTH_NAME_ GC_STR707 #undef PGM_BTH_NAME_RC_STR 708 708 #undef PGM_BTH_NAME_R0_STR 709 709 #undef PGM_GST_TYPE 710 710 #undef PGM_GST_NAME 711 #undef PGM_GST_NAME_ GC_STR711 #undef PGM_GST_NAME_RC_STR 712 712 #undef PGM_GST_NAME_R0_STR 713 713 … … 715 715 #define PGM_GST_TYPE PGM_TYPE_32BIT 716 716 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 717 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_32BIT_STR(name)717 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_32BIT_STR(name) 718 718 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_32BIT_STR(name) 719 719 #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_32BIT(name) 720 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_32BIT_32BIT_STR(name)720 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_32BIT_32BIT_STR(name) 721 721 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_32BIT_32BIT_STR(name) 722 722 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_32BIT_PT_FOR_32BIT_PT … … 727 727 #undef BTH_PGMPOOLKIND_PT_FOR_PT 728 728 #undef PGM_BTH_NAME 729 #undef PGM_BTH_NAME_ GC_STR729 #undef PGM_BTH_NAME_RC_STR 730 730 #undef PGM_BTH_NAME_R0_STR 731 731 #undef PGM_GST_TYPE 732 732 #undef PGM_GST_NAME 733 #undef PGM_GST_NAME_ GC_STR733 #undef PGM_GST_NAME_RC_STR 734 734 #undef PGM_GST_NAME_R0_STR 735 735 736 736 #undef PGM_SHW_TYPE 737 737 #undef PGM_SHW_NAME 738 #undef PGM_SHW_NAME_ GC_STR738 #undef PGM_SHW_NAME_RC_STR 739 739 #undef PGM_SHW_NAME_R0_STR 740 740 … … 745 745 #define PGM_SHW_TYPE PGM_TYPE_PAE 746 746 #define PGM_SHW_NAME(name) PGM_SHW_NAME_PAE(name) 747 #define PGM_SHW_NAME_ GC_STR(name) PGM_SHW_NAME_GC_PAE_STR(name)747 #define PGM_SHW_NAME_RC_STR(name) PGM_SHW_NAME_RC_PAE_STR(name) 748 748 #define PGM_SHW_NAME_R0_STR(name) PGM_SHW_NAME_R0_PAE_STR(name) 749 749 #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name) … … 753 753 #define PGM_GST_TYPE PGM_TYPE_REAL 754 754 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 755 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_REAL_STR(name)755 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_REAL_STR(name) 756 756 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_REAL_STR(name) 757 757 #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name) 758 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_PAE_REAL_STR(name)758 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_PAE_REAL_STR(name) 759 759 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_PAE_REAL_STR(name) 760 760 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 762 762 #undef BTH_PGMPOOLKIND_PT_FOR_PT 763 763 #undef PGM_BTH_NAME 764 #undef PGM_BTH_NAME_ GC_STR764 #undef PGM_BTH_NAME_RC_STR 765 765 #undef PGM_BTH_NAME_R0_STR 766 766 #undef PGM_GST_TYPE 767 767 #undef PGM_GST_NAME 768 #undef PGM_GST_NAME_ GC_STR768 #undef PGM_GST_NAME_RC_STR 769 769 #undef PGM_GST_NAME_R0_STR 770 770 … … 772 772 #define PGM_GST_TYPE PGM_TYPE_PROT 773 773 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 774 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PROT_STR(name)774 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PROT_STR(name) 775 775 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PROT_STR(name) 776 776 #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PROT(name) 777 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_PAE_PROT_STR(name)777 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_PAE_PROT_STR(name) 778 778 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_PAE_PROT_STR(name) 779 779 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 781 781 #undef BTH_PGMPOOLKIND_PT_FOR_PT 782 782 #undef PGM_BTH_NAME 783 #undef PGM_BTH_NAME_ GC_STR783 #undef PGM_BTH_NAME_RC_STR 784 784 #undef PGM_BTH_NAME_R0_STR 785 785 #undef PGM_GST_TYPE 786 786 #undef PGM_GST_NAME 787 #undef PGM_GST_NAME_ GC_STR787 #undef PGM_GST_NAME_RC_STR 788 788 #undef PGM_GST_NAME_R0_STR 789 789 … … 791 791 #define PGM_GST_TYPE PGM_TYPE_32BIT 792 792 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 793 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_32BIT_STR(name)793 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_32BIT_STR(name) 794 794 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_32BIT_STR(name) 795 795 #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_32BIT(name) 796 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_PAE_32BIT_STR(name)796 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_PAE_32BIT_STR(name) 797 797 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_PAE_32BIT_STR(name) 798 798 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_32BIT_PT … … 802 802 #undef BTH_PGMPOOLKIND_PT_FOR_PT 803 803 #undef PGM_BTH_NAME 804 #undef PGM_BTH_NAME_ GC_STR804 #undef PGM_BTH_NAME_RC_STR 805 805 #undef PGM_BTH_NAME_R0_STR 806 806 #undef PGM_GST_TYPE 807 807 #undef PGM_GST_NAME 808 #undef PGM_GST_NAME_ GC_STR808 #undef PGM_GST_NAME_RC_STR 809 809 #undef PGM_GST_NAME_R0_STR 810 810 … … 812 812 #define PGM_GST_TYPE PGM_TYPE_PAE 813 813 #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) 814 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PAE_STR(name)814 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PAE_STR(name) 815 815 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PAE_STR(name) 816 816 #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PAE(name) 817 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_PAE_PAE_STR(name)817 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_PAE_PAE_STR(name) 818 818 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_PAE_PAE_STR(name) 819 819 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 824 824 #undef BTH_PGMPOOLKIND_PT_FOR_PT 825 825 #undef PGM_BTH_NAME 826 #undef PGM_BTH_NAME_ GC_STR826 #undef PGM_BTH_NAME_RC_STR 827 827 #undef PGM_BTH_NAME_R0_STR 828 828 #undef PGM_GST_TYPE 829 829 #undef PGM_GST_NAME 830 #undef PGM_GST_NAME_ GC_STR830 #undef PGM_GST_NAME_RC_STR 831 831 #undef PGM_GST_NAME_R0_STR 832 832 833 833 #undef PGM_SHW_TYPE 834 834 #undef PGM_SHW_NAME 835 #undef PGM_SHW_NAME_ GC_STR835 #undef PGM_SHW_NAME_RC_STR 836 836 #undef PGM_SHW_NAME_R0_STR 837 837 … … 842 842 #define PGM_SHW_TYPE PGM_TYPE_AMD64 843 843 #define PGM_SHW_NAME(name) PGM_SHW_NAME_AMD64(name) 844 #define PGM_SHW_NAME_ GC_STR(name) PGM_SHW_NAME_GC_AMD64_STR(name)844 #define PGM_SHW_NAME_RC_STR(name) PGM_SHW_NAME_RC_AMD64_STR(name) 845 845 #define PGM_SHW_NAME_R0_STR(name) PGM_SHW_NAME_R0_AMD64_STR(name) 846 846 #include "PGMShw.h" … … 849 849 #define PGM_GST_TYPE PGM_TYPE_AMD64 850 850 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 851 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_AMD64_STR(name)851 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_AMD64_STR(name) 852 852 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_AMD64_STR(name) 853 853 #define PGM_BTH_NAME(name) PGM_BTH_NAME_AMD64_AMD64(name) 854 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_AMD64_AMD64_STR(name)854 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_AMD64_AMD64_STR(name) 855 855 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_AMD64_AMD64_STR(name) 856 856 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 861 861 #undef BTH_PGMPOOLKIND_PT_FOR_PT 862 862 #undef PGM_BTH_NAME 863 #undef PGM_BTH_NAME_ GC_STR863 #undef PGM_BTH_NAME_RC_STR 864 864 #undef PGM_BTH_NAME_R0_STR 865 865 #undef PGM_GST_TYPE 866 866 #undef PGM_GST_NAME 867 #undef PGM_GST_NAME_ GC_STR867 #undef PGM_GST_NAME_RC_STR 868 868 #undef PGM_GST_NAME_R0_STR 869 869 870 870 #undef PGM_SHW_TYPE 871 871 #undef PGM_SHW_NAME 872 #undef PGM_SHW_NAME_ GC_STR872 #undef PGM_SHW_NAME_RC_STR 873 873 #undef PGM_SHW_NAME_R0_STR 874 874 … … 878 878 #define PGM_SHW_TYPE PGM_TYPE_NESTED 879 879 #define PGM_SHW_NAME(name) PGM_SHW_NAME_NESTED(name) 880 #define PGM_SHW_NAME_ GC_STR(name) PGM_SHW_NAME_GC_NESTED_STR(name)880 #define PGM_SHW_NAME_RC_STR(name) PGM_SHW_NAME_RC_NESTED_STR(name) 881 881 #define PGM_SHW_NAME_R0_STR(name) PGM_SHW_NAME_R0_NESTED_STR(name) 882 882 #include "PGMShw.h" … … 885 885 #define PGM_GST_TYPE PGM_TYPE_REAL 886 886 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 887 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_REAL_STR(name)887 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_REAL_STR(name) 888 888 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_REAL_STR(name) 889 889 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_REAL(name) 890 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_NESTED_REAL_STR(name)890 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_NESTED_REAL_STR(name) 891 891 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_NESTED_REAL_STR(name) 892 892 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 894 894 #undef BTH_PGMPOOLKIND_PT_FOR_PT 895 895 #undef PGM_BTH_NAME 896 #undef PGM_BTH_NAME_ GC_STR896 #undef PGM_BTH_NAME_RC_STR 897 897 #undef PGM_BTH_NAME_R0_STR 898 898 #undef PGM_GST_TYPE 899 899 #undef PGM_GST_NAME 900 #undef PGM_GST_NAME_ GC_STR900 #undef PGM_GST_NAME_RC_STR 901 901 #undef PGM_GST_NAME_R0_STR 902 902 … … 904 904 #define PGM_GST_TYPE PGM_TYPE_PROT 905 905 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 906 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PROT_STR(name)906 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PROT_STR(name) 907 907 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PROT_STR(name) 908 908 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_PROT(name) 909 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_NESTED_PROT_STR(name)909 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_NESTED_PROT_STR(name) 910 910 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_NESTED_PROT_STR(name) 911 911 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 913 913 #undef BTH_PGMPOOLKIND_PT_FOR_PT 914 914 #undef PGM_BTH_NAME 915 #undef PGM_BTH_NAME_ GC_STR915 #undef PGM_BTH_NAME_RC_STR 916 916 #undef PGM_BTH_NAME_R0_STR 917 917 #undef PGM_GST_TYPE 918 918 #undef PGM_GST_NAME 919 #undef PGM_GST_NAME_ GC_STR919 #undef PGM_GST_NAME_RC_STR 920 920 #undef PGM_GST_NAME_R0_STR 921 921 … … 923 923 #define PGM_GST_TYPE PGM_TYPE_32BIT 924 924 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 925 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_32BIT_STR(name)925 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_32BIT_STR(name) 926 926 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_32BIT_STR(name) 927 927 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_32BIT(name) 928 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_NESTED_32BIT_STR(name)928 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_NESTED_32BIT_STR(name) 929 929 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_NESTED_32BIT_STR(name) 930 930 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_32BIT_PT … … 934 934 #undef BTH_PGMPOOLKIND_PT_FOR_PT 935 935 #undef PGM_BTH_NAME 936 #undef PGM_BTH_NAME_ GC_STR936 #undef PGM_BTH_NAME_RC_STR 937 937 #undef PGM_BTH_NAME_R0_STR 938 938 #undef PGM_GST_TYPE 939 939 #undef PGM_GST_NAME 940 #undef PGM_GST_NAME_ GC_STR940 #undef PGM_GST_NAME_RC_STR 941 941 #undef PGM_GST_NAME_R0_STR 942 942 … … 944 944 #define PGM_GST_TYPE PGM_TYPE_PAE 945 945 #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) 946 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PAE_STR(name)946 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PAE_STR(name) 947 947 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PAE_STR(name) 948 948 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_PAE(name) 949 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_NESTED_PAE_STR(name)949 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_NESTED_PAE_STR(name) 950 950 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_NESTED_PAE_STR(name) 951 951 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 955 955 #undef BTH_PGMPOOLKIND_PT_FOR_PT 956 956 #undef PGM_BTH_NAME 957 #undef PGM_BTH_NAME_ GC_STR957 #undef PGM_BTH_NAME_RC_STR 958 958 #undef PGM_BTH_NAME_R0_STR 959 959 #undef PGM_GST_TYPE 960 960 #undef PGM_GST_NAME 961 #undef PGM_GST_NAME_ GC_STR961 #undef PGM_GST_NAME_RC_STR 962 962 #undef PGM_GST_NAME_R0_STR 963 963 … … 965 965 #define PGM_GST_TYPE PGM_TYPE_AMD64 966 966 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 967 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_AMD64_STR(name)967 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_AMD64_STR(name) 968 968 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_AMD64_STR(name) 969 969 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name) 970 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_NESTED_AMD64_STR(name)970 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_NESTED_AMD64_STR(name) 971 971 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_NESTED_AMD64_STR(name) 972 972 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 976 976 #undef BTH_PGMPOOLKIND_PT_FOR_PT 977 977 #undef PGM_BTH_NAME 978 #undef PGM_BTH_NAME_ GC_STR978 #undef PGM_BTH_NAME_RC_STR 979 979 #undef PGM_BTH_NAME_R0_STR 980 980 #undef PGM_GST_TYPE 981 981 #undef PGM_GST_NAME 982 #undef PGM_GST_NAME_ GC_STR982 #undef PGM_GST_NAME_RC_STR 983 983 #undef PGM_GST_NAME_R0_STR 984 984 985 985 #undef PGM_SHW_TYPE 986 986 #undef PGM_SHW_NAME 987 #undef PGM_SHW_NAME_ GC_STR987 #undef PGM_SHW_NAME_RC_STR 988 988 #undef PGM_SHW_NAME_R0_STR 989 989 … … 993 993 #define PGM_SHW_TYPE PGM_TYPE_EPT 994 994 #define PGM_SHW_NAME(name) PGM_SHW_NAME_EPT(name) 995 #define PGM_SHW_NAME_ GC_STR(name) PGM_SHW_NAME_GC_EPT_STR(name)995 #define PGM_SHW_NAME_RC_STR(name) PGM_SHW_NAME_RC_EPT_STR(name) 996 996 #define PGM_SHW_NAME_R0_STR(name) PGM_SHW_NAME_R0_EPT_STR(name) 997 997 #include "PGMShw.h" … … 1000 1000 #define PGM_GST_TYPE PGM_TYPE_REAL 1001 1001 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 1002 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_REAL_STR(name)1002 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_REAL_STR(name) 1003 1003 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_REAL_STR(name) 1004 1004 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_REAL(name) 1005 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_EPT_REAL_STR(name)1005 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_EPT_REAL_STR(name) 1006 1006 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_EPT_REAL_STR(name) 1007 1007 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 1009 1009 #undef BTH_PGMPOOLKIND_PT_FOR_PT 1010 1010 #undef PGM_BTH_NAME 1011 #undef PGM_BTH_NAME_ GC_STR1011 #undef PGM_BTH_NAME_RC_STR 1012 1012 #undef PGM_BTH_NAME_R0_STR 1013 1013 #undef PGM_GST_TYPE 1014 1014 #undef PGM_GST_NAME 1015 #undef PGM_GST_NAME_ GC_STR1015 #undef PGM_GST_NAME_RC_STR 1016 1016 #undef PGM_GST_NAME_R0_STR 1017 1017 … … 1019 1019 #define PGM_GST_TYPE PGM_TYPE_PROT 1020 1020 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 1021 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PROT_STR(name)1021 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PROT_STR(name) 1022 1022 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PROT_STR(name) 1023 1023 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_PROT(name) 1024 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_EPT_PROT_STR(name)1024 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_EPT_PROT_STR(name) 1025 1025 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_EPT_PROT_STR(name) 1026 1026 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS … … 1028 1028 #undef BTH_PGMPOOLKIND_PT_FOR_PT 1029 1029 #undef PGM_BTH_NAME 1030 #undef PGM_BTH_NAME_ GC_STR1030 #undef PGM_BTH_NAME_RC_STR 1031 1031 #undef PGM_BTH_NAME_R0_STR 1032 1032 #undef PGM_GST_TYPE 1033 1033 #undef PGM_GST_NAME 1034 #undef PGM_GST_NAME_ GC_STR1034 #undef PGM_GST_NAME_RC_STR 1035 1035 #undef PGM_GST_NAME_R0_STR 1036 1036 … … 1038 1038 #define PGM_GST_TYPE PGM_TYPE_32BIT 1039 1039 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 1040 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_32BIT_STR(name)1040 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_32BIT_STR(name) 1041 1041 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_32BIT_STR(name) 1042 1042 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_32BIT(name) 1043 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_EPT_32BIT_STR(name)1043 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_EPT_32BIT_STR(name) 1044 1044 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_EPT_32BIT_STR(name) 1045 1045 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_32BIT_PT … … 1049 1049 #undef BTH_PGMPOOLKIND_PT_FOR_PT 1050 1050 #undef PGM_BTH_NAME 1051 #undef PGM_BTH_NAME_ GC_STR1051 #undef PGM_BTH_NAME_RC_STR 1052 1052 #undef PGM_BTH_NAME_R0_STR 1053 1053 #undef PGM_GST_TYPE 1054 1054 #undef PGM_GST_NAME 1055 #undef PGM_GST_NAME_ GC_STR1055 #undef PGM_GST_NAME_RC_STR 1056 1056 #undef PGM_GST_NAME_R0_STR 1057 1057 … … 1059 1059 #define PGM_GST_TYPE PGM_TYPE_PAE 1060 1060 #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) 1061 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_PAE_STR(name)1061 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_PAE_STR(name) 1062 1062 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_PAE_STR(name) 1063 1063 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_PAE(name) 1064 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_EPT_PAE_STR(name)1064 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_EPT_PAE_STR(name) 1065 1065 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_EPT_PAE_STR(name) 1066 1066 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 1070 1070 #undef BTH_PGMPOOLKIND_PT_FOR_PT 1071 1071 #undef PGM_BTH_NAME 1072 #undef PGM_BTH_NAME_ GC_STR1072 #undef PGM_BTH_NAME_RC_STR 1073 1073 #undef PGM_BTH_NAME_R0_STR 1074 1074 #undef PGM_GST_TYPE 1075 1075 #undef PGM_GST_NAME 1076 #undef PGM_GST_NAME_ GC_STR1076 #undef PGM_GST_NAME_RC_STR 1077 1077 #undef PGM_GST_NAME_R0_STR 1078 1078 … … 1080 1080 #define PGM_GST_TYPE PGM_TYPE_AMD64 1081 1081 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 1082 #define PGM_GST_NAME_ GC_STR(name) PGM_GST_NAME_GC_AMD64_STR(name)1082 #define PGM_GST_NAME_RC_STR(name) PGM_GST_NAME_RC_AMD64_STR(name) 1083 1083 #define PGM_GST_NAME_R0_STR(name) PGM_GST_NAME_R0_AMD64_STR(name) 1084 1084 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_AMD64(name) 1085 #define PGM_BTH_NAME_ GC_STR(name) PGM_BTH_NAME_GC_EPT_AMD64_STR(name)1085 #define PGM_BTH_NAME_RC_STR(name) PGM_BTH_NAME_RC_EPT_AMD64_STR(name) 1086 1086 #define PGM_BTH_NAME_R0_STR(name) PGM_BTH_NAME_R0_EPT_AMD64_STR(name) 1087 1087 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT … … 1091 1091 #undef BTH_PGMPOOLKIND_PT_FOR_PT 1092 1092 #undef PGM_BTH_NAME 1093 #undef PGM_BTH_NAME_ GC_STR1093 #undef PGM_BTH_NAME_RC_STR 1094 1094 #undef PGM_BTH_NAME_R0_STR 1095 1095 #undef PGM_GST_TYPE 1096 1096 #undef PGM_GST_NAME 1097 #undef PGM_GST_NAME_ GC_STR1097 #undef PGM_GST_NAME_RC_STR 1098 1098 #undef PGM_GST_NAME_R0_STR 1099 1099 1100 1100 #undef PGM_SHW_TYPE 1101 1101 #undef PGM_SHW_NAME 1102 #undef PGM_SHW_NAME_ GC_STR1102 #undef PGM_SHW_NAME_RC_STR 1103 1103 #undef PGM_SHW_NAME_R0_STR 1104 1104 … … 1494 1494 { 1495 1495 PPGM pPGM = &pVM->pgm.s; 1496 STAM_REG(pVM, &pPGM->StatGCInvalidatePage, STAMTYPE_PROFILE, "/PGM/GC/InvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling."); 1497 STAM_REG(pVM, &pPGM->StatGCInvalidatePage4KBPages, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/4KBPages", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for a 4KB page."); 1498 STAM_REG(pVM, &pPGM->StatGCInvalidatePage4MBPages, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/4MBPages", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for a 4MB page."); 1499 STAM_REG(pVM, &pPGM->StatGCInvalidatePage4MBPagesSkip, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/4MBPagesSkip",STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() skipped a 4MB page."); 1500 STAM_REG(pVM, &pPGM->StatGCInvalidatePagePDMappings, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/PDMappings", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for a page directory containing mappings (no conflict)."); 1501 STAM_REG(pVM, &pPGM->StatGCInvalidatePagePDNAs, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/PDNAs", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for a not accessed page directory."); 1502 STAM_REG(pVM, &pPGM->StatGCInvalidatePagePDNPs, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/PDNPs", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for a not present page directory."); 1503 STAM_REG(pVM, &pPGM->StatGCInvalidatePagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/PDOutOfSync", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for an out of sync page directory."); 1504 STAM_REG(pVM, &pPGM->StatGCInvalidatePageSkipped, STAMTYPE_COUNTER, "/PGM/GC/InvalidatePage/Skipped", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was skipped due to not present shw or pending pending SyncCR3."); 1505 STAM_REG(pVM, &pPGM->StatGCSyncPT, STAMTYPE_PROFILE, "/PGM/GC/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGCSyncPT() body."); 1506 STAM_REG(pVM, &pPGM->StatGCAccessedPage, STAMTYPE_COUNTER, "/PGM/GC/AccessedPage", STAMUNIT_OCCURENCES, "The number of pages marked not present for accessed bit emulation."); 1507 STAM_REG(pVM, &pPGM->StatGCDirtyPage, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/Mark", STAMUNIT_OCCURENCES, "The number of pages marked read-only for dirty bit tracking."); 1508 STAM_REG(pVM, &pPGM->StatGCDirtyPageBig, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/MarkBig", STAMUNIT_OCCURENCES, "The number of 4MB pages marked read-only for dirty bit tracking."); 1509 STAM_REG(pVM, &pPGM->StatGCDirtyPageTrap, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/Trap", STAMUNIT_OCCURENCES, "The number of traps generated for dirty bit tracking."); 1510 STAM_REG(pVM, &pPGM->StatGCDirtyPageSkipped, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/Skipped", STAMUNIT_OCCURENCES, "The number of pages already dirty or readonly."); 1511 STAM_REG(pVM, &pPGM->StatGCDirtiedPage, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/SetDirty", STAMUNIT_OCCURENCES, "The number of pages marked dirty because of write accesses."); 1512 STAM_REG(pVM, &pPGM->StatGCDirtyTrackRealPF, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/RealPF", STAMUNIT_OCCURENCES, "The number of real pages faults during dirty bit tracking."); 1513 STAM_REG(pVM, &pPGM->StatGCPageAlreadyDirty, STAMTYPE_COUNTER, "/PGM/GC/DirtyPage/AlreadySet", STAMUNIT_OCCURENCES, "The number of pages already marked dirty because of write accesses."); 1514 STAM_REG(pVM, &pPGM->StatGCDirtyBitTracking, STAMTYPE_PROFILE, "/PGM/GC/DirtyPage", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMTrackDirtyBit() body."); 1515 STAM_REG(pVM, &pPGM->StatGCSyncPTAlloc, STAMTYPE_COUNTER, "/PGM/GC/SyncPT/Alloc", STAMUNIT_OCCURENCES, "The number of times PGMGCSyncPT() needed to allocate page tables."); 1516 STAM_REG(pVM, &pPGM->StatGCSyncPTConflict, STAMTYPE_COUNTER, "/PGM/GC/SyncPT/Conflicts", STAMUNIT_OCCURENCES, "The number of times PGMGCSyncPT() detected conflicts."); 1517 STAM_REG(pVM, &pPGM->StatGCSyncPTFailed, STAMTYPE_COUNTER, "/PGM/GC/SyncPT/Failed", STAMUNIT_OCCURENCES, "The number of times PGMGCSyncPT() failed."); 1496 1497 /* 1498 * Note! The layout of this function matches the member layout exactly! 1499 */ 1500 1501 /* R3 only: */ 1502 1503 /* GC only: */ 1504 STAM_REG(pVM, &pPGM->StatGCInvalidatePage, STAMTYPE_PROFILE, "/PGM/GCInvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMGCInvalidatePage() profiling."); 1505 1506 /* RZ only: */ 1507 1508 /* R0 only: */ 1509 1510 /* RZ & R3: */ 1511 STAM_REG(pVM, &pPGM->StatRZSyncCR3, STAMTYPE_PROFILE, "/PGM/RZ/SyncCR3", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() body."); 1512 STAM_REG(pVM, &pPGM->StatRZSyncCR3Handlers, STAMTYPE_PROFILE, "/PGM/RZ/SyncCR3/Handlers", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() update handler section."); 1513 STAM_REG(pVM, &pPGM->StatRZSyncCR3HandlerVirtualUpdate, STAMTYPE_PROFILE, "/PGM/RZ/SyncCR3/Handlers/VirtualUpdate", STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler updates."); 1514 STAM_REG(pVM, &pPGM->StatRZSyncCR3HandlerVirtualReset, STAMTYPE_PROFILE, "/PGM/RZ/SyncCR3/Handlers/VirtualReset", STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler resets."); 1515 STAM_REG(pVM, &pPGM->StatRZSyncCR3Global, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/Global", STAMUNIT_OCCURENCES, "The number of global CR3 syncs."); 1516 STAM_REG(pVM, &pPGM->StatRZSyncCR3NotGlobal, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/NotGlobal", STAMUNIT_OCCURENCES, "The number of non-global CR3 syncs."); 1517 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstCacheHit, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstChacheHit", STAMUNIT_OCCURENCES, "The number of times we got some kind of a cache hit."); 1518 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstFreed, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstFreed", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry."); 1519 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstFreedSrcNP, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstFreedSrcNP", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry for which the source entry was not present."); 1520 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstNotPresent, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstNotPresent", STAMUNIT_OCCURENCES, "The number of times we've encountered a not present shadow entry for a present guest entry."); 1521 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstSkippedGlobalPD, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstSkippedGlobalPD", STAMUNIT_OCCURENCES, "The number of times a global page directory wasn't flushed."); 1522 STAM_REG(pVM, &pPGM->StatRZSyncCR3DstSkippedGlobalPT, STAMTYPE_COUNTER, "/PGM/RZ/SyncCR3/DstSkippedGlobalPT", STAMUNIT_OCCURENCES, "The number of times a page table with only global entries wasn't flushed."); 1523 STAM_REG(pVM, &pPGM->StatRZSyncPT, STAMTYPE_PROFILE, "/PGM/RZ/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the pfnSyncPT() body."); 1524 STAM_REG(pVM, &pPGM->StatRZSyncPTFailed, STAMTYPE_COUNTER, "/PGM/RZ/SyncPT/Failed", STAMUNIT_OCCURENCES, "The number of times pfnSyncPT() failed."); 1525 STAM_REG(pVM, &pPGM->StatRZSyncPagePDNAs, STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDNAs", STAMUNIT_OCCURENCES, "The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit."); 1526 STAM_REG(pVM, &pPGM->StatRZSyncPagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDOutOfSync", STAMUNIT_OCCURENCES, "The number of time we've encountered an out-of-sync PD in SyncPage."); 1527 STAM_REG(pVM, &pPGM->StatRZAccessedPage, STAMTYPE_COUNTER, "/PGM/RZ/AccessedPage", STAMUNIT_OCCURENCES, "The number of pages marked not present for accessed bit emulation."); 1528 STAM_REG(pVM, &pPGM->StatRZDirtyBitTracking, STAMTYPE_PROFILE, "/PGM/RZ/DirtyPage", STAMUNIT_TICKS_PER_CALL, "Profiling the dirty bit tracking in CheckPageFault()."); 1529 STAM_REG(pVM, &pPGM->StatRZDirtyPage, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/Mark", STAMUNIT_OCCURENCES, "The number of pages marked read-only for dirty bit tracking."); 1530 STAM_REG(pVM, &pPGM->StatRZDirtyPageBig, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/MarkBig", STAMUNIT_OCCURENCES, "The number of 4MB pages marked read-only for dirty bit tracking."); 1531 STAM_REG(pVM, &pPGM->StatRZDirtyPageSkipped, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/Skipped", STAMUNIT_OCCURENCES, "The number of pages already dirty or readonly."); 1532 STAM_REG(pVM, &pPGM->StatRZDirtyPageTrap, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/Trap", STAMUNIT_OCCURENCES, "The number of traps generated for dirty bit tracking."); 1533 STAM_REG(pVM, &pPGM->StatRZDirtiedPage, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/SetDirty", STAMUNIT_OCCURENCES, "The number of pages marked dirty because of write accesses."); 1534 STAM_REG(pVM, &pPGM->StatRZDirtyTrackRealPF, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/RealPF", STAMUNIT_OCCURENCES, "The number of real pages faults during dirty bit tracking."); 1535 STAM_REG(pVM, &pPGM->StatRZPageAlreadyDirty, STAMTYPE_COUNTER, "/PGM/RZ/DirtyPage/AlreadySet", STAMUNIT_OCCURENCES, "The number of pages already marked dirty because of write accesses."); 1536 STAM_REG(pVM, &pPGM->StatRZInvalidatePage, STAMTYPE_PROFILE, "/PGM/RZ/InvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMInvalidatePage() profiling."); 1537 STAM_REG(pVM, &pPGM->StatRZInvalidatePage4KBPages, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/4KBPages", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for a 4KB page."); 1538 STAM_REG(pVM, &pPGM->StatRZInvalidatePage4MBPages, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/4MBPages", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for a 4MB page."); 1539 STAM_REG(pVM, &pPGM->StatRZInvalidatePage4MBPagesSkip, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/4MBPagesSkip",STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() skipped a 4MB page."); 1540 STAM_REG(pVM, &pPGM->StatRZInvalidatePagePDMappings, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/PDMappings", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for a page directory containing mappings (no conflict)."); 1541 STAM_REG(pVM, &pPGM->StatRZInvalidatePagePDNAs, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/PDNAs", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for a not accessed page directory."); 1542 STAM_REG(pVM, &pPGM->StatRZInvalidatePagePDNPs, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/PDNPs", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for a not present page directory."); 1543 STAM_REG(pVM, &pPGM->StatRZInvalidatePagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/PDOutOfSync", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was called for an out of sync page directory."); 1544 STAM_REG(pVM, &pPGM->StatRZInvalidatePageSkipped, STAMTYPE_COUNTER, "/PGM/RZ/InvalidatePage/Skipped", STAMUNIT_OCCURENCES, "The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3."); 1545 1546 1547 /* TODO: */ 1518 1548 1519 1549 STAM_REG(pVM, &pPGM->StatGCTrap0e, STAMTYPE_PROFILE, "/PGM/GC/Trap0e", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMGCTrap0eHandler() body."); … … 1582 1612 STAM_REG(pVM, &pPGM->StatHCGuestPDWriteConflict, STAMTYPE_COUNTER, "/PGM/HC/PDWriteConflict", STAMUNIT_OCCURENCES, "The number of times pgmHCGuestPDWriteHandler() detected a conflict."); 1583 1613 1584 STAM_REG(pVM, &pPGM->StatHCInvalidatePage, STAMTYPE_PROFILE, "/PGM/HC/InvalidatePage", STAMUNIT_TICKS_PER_CALL, "PGMHCInvalidatePage() profiling.");1585 STAM_REG(pVM, &pPGM->StatHCInvalidatePage4KBPages, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/4KBPages", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was called for a 4KB page.");1586 STAM_REG(pVM, &pPGM->StatHCInvalidatePage4MBPages, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/4MBPages", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was called for a 4MB page.");1587 STAM_REG(pVM, &pPGM->StatHCInvalidatePage4MBPagesSkip, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/4MBPagesSkip",STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() skipped a 4MB page.");1588 STAM_REG(pVM, &pPGM->StatHCInvalidatePagePDMappings, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/PDMappings", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was called for a page directory containing mappings (no conflict).");1589 STAM_REG(pVM, &pPGM->StatHCInvalidatePagePDNAs, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/PDNAs", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was called for a not accessed page directory.");1590 STAM_REG(pVM, &pPGM->StatHCInvalidatePagePDNPs, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/PDNPs", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was called for a not present page directory.");1591 STAM_REG(pVM, &pPGM->StatHCInvalidatePagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/PDOutOfSync", STAMUNIT_OCCURENCES, "The number of times PGMGCInvalidatePage() was called for an out of sync page directory.");1592 STAM_REG(pVM, &pPGM->StatHCInvalidatePageSkipped, STAMTYPE_COUNTER, "/PGM/HC/InvalidatePage/Skipped", STAMUNIT_OCCURENCES, "The number of times PGMHCInvalidatePage() was skipped due to not present shw or pending pending SyncCR3.");1593 1614 STAM_REG(pVM, &pPGM->StatHCResolveConflict, STAMTYPE_PROFILE, "/PGM/HC/ResolveConflict", STAMUNIT_TICKS_PER_CALL, "pgmR3SyncPTResolveConflict() profiling (includes the entire relocation)."); 1594 1615 STAM_REG(pVM, &pPGM->StatHCPrefetch, STAMTYPE_PROFILE, "/PGM/HC/Prefetch", STAMUNIT_TICKS_PER_CALL, "PGMR3PrefetchPage profiling."); 1595 1616 1596 STAM_REG(pVM, &pPGM->StatHCSyncPT, STAMTYPE_PROFILE, "/PGM/HC/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body."); 1597 STAM_REG(pVM, &pPGM->StatHCAccessedPage, STAMTYPE_COUNTER, "/PGM/HC/AccessedPage", STAMUNIT_OCCURENCES, "The number of pages marked not present for accessed bit emulation."); 1598 STAM_REG(pVM, &pPGM->StatHCDirtyPage, STAMTYPE_COUNTER, "/PGM/HC/DirtyPage/Mark", STAMUNIT_OCCURENCES, "The number of pages marked read-only for dirty bit tracking."); 1599 STAM_REG(pVM, &pPGM->StatHCDirtyPageBig, STAMTYPE_COUNTER, "/PGM/HC/DirtyPage/MarkBig", STAMUNIT_OCCURENCES, "The number of 4MB pages marked read-only for dirty bit tracking."); 1600 STAM_REG(pVM, &pPGM->StatHCDirtyPageTrap, STAMTYPE_COUNTER, "/PGM/HC/DirtyPage/Trap", STAMUNIT_OCCURENCES, "The number of traps generated for dirty bit tracking."); 1601 STAM_REG(pVM, &pPGM->StatHCDirtyPageSkipped, STAMTYPE_COUNTER, "/PGM/HC/DirtyPage/Skipped", STAMUNIT_OCCURENCES, "The number of pages already dirty or readonly."); 1602 STAM_REG(pVM, &pPGM->StatHCDirtyBitTracking, STAMTYPE_PROFILE, "/PGM/HC/DirtyPage", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMTrackDirtyBit() body."); 1603 1604 STAM_REG(pVM, &pPGM->StatGCSyncPagePDNAs, STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDNAs", STAMUNIT_OCCURENCES, "The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit."); 1605 STAM_REG(pVM, &pPGM->StatGCSyncPagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/GC/SyncPagePDOutOfSync", STAMUNIT_OCCURENCES, "The number of time we've encountered an out-of-sync PD in SyncPage."); 1606 STAM_REG(pVM, &pPGM->StatHCSyncPagePDNAs, STAMTYPE_COUNTER, "/PGM/HC/SyncPagePDNAs", STAMUNIT_OCCURENCES, "The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit."); 1607 STAM_REG(pVM, &pPGM->StatHCSyncPagePDOutOfSync, STAMTYPE_COUNTER, "/PGM/HC/SyncPagePDOutOfSync", STAMUNIT_OCCURENCES, "The number of time we've encountered an out-of-sync PD in SyncPage."); 1617 STAM_REG(pVM, &pPGM->StatR3SyncPT, STAMTYPE_PROFILE, "/PGM/R3/SyncPT", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMR3SyncPT() body."); 1618 1608 1619 1609 1620 STAM_REG(pVM, &pPGM->StatFlushTLB, STAMTYPE_PROFILE, "/PGM/FlushTLB", STAMUNIT_OCCURENCES, "Profiling of the PGMFlushTLB() body."); … … 1613 1624 STAM_REG(pVM, &pPGM->StatFlushTLBSameCR3Global, STAMTYPE_COUNTER, "/PGM/FlushTLB/SameCR3Global", STAMUNIT_OCCURENCES, "The number of times PGMFlushTLB was called with the same CR3, global. (flush)"); 1614 1625 1615 STAM_REG(pVM, &pPGM->StatGCSyncCR3, STAMTYPE_PROFILE, "/PGM/GC/SyncCR3", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() body.");1616 STAM_REG(pVM, &pPGM->StatGCSyncCR3Handlers, STAMTYPE_PROFILE, "/PGM/GC/SyncCR3/Handlers", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() update handler section.");1617 STAM_REG(pVM, &pPGM->StatGCSyncCR3HandlerVirtualUpdate, STAMTYPE_PROFILE, "/PGM/GC/SyncCR3/Handlers/VirtualUpdate",STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler updates.");1618 STAM_REG(pVM, &pPGM->StatGCSyncCR3HandlerVirtualReset, STAMTYPE_PROFILE, "/PGM/GC/SyncCR3/Handlers/VirtualReset", STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler resets.");1619 STAM_REG(pVM, &pPGM->StatGCSyncCR3Global, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/Global", STAMUNIT_OCCURENCES, "The number of global CR3 syncs.");1620 STAM_REG(pVM, &pPGM->StatGCSyncCR3NotGlobal, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/NotGlobal", STAMUNIT_OCCURENCES, "The number of non-global CR3 syncs.");1621 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstCacheHit, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstChacheHit", STAMUNIT_OCCURENCES, "The number of times we got some kind of a cache hit.");1622 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstFreed, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstFreed", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry.");1623 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstFreedSrcNP, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstFreedSrcNP", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry for which the source entry was not present.");1624 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstNotPresent, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstNotPresent", STAMUNIT_OCCURENCES, "The number of times we've encountered a not present shadow entry for a present guest entry.");1625 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstSkippedGlobalPD, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstSkippedGlobalPD", STAMUNIT_OCCURENCES, "The number of times a global page directory wasn't flushed.");1626 STAM_REG(pVM, &pPGM->StatGCSyncCR3DstSkippedGlobalPT, STAMTYPE_COUNTER, "/PGM/GC/SyncCR3/DstSkippedGlobalPT", STAMUNIT_OCCURENCES, "The number of times a page table with only global entries wasn't flushed.");1627 1628 STAM_REG(pVM, &pPGM->StatHCSyncCR3, STAMTYPE_PROFILE, "/PGM/HC/SyncCR3", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() body.");1629 STAM_REG(pVM, &pPGM->StatHCSyncCR3Handlers, STAMTYPE_PROFILE, "/PGM/HC/SyncCR3/Handlers", STAMUNIT_TICKS_PER_CALL, "Profiling of the PGMSyncCR3() update handler section.");1630 STAM_REG(pVM, &pPGM->StatHCSyncCR3HandlerVirtualUpdate, STAMTYPE_PROFILE, "/PGM/HC/SyncCR3/Handlers/VirtualUpdate",STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler updates.");1631 STAM_REG(pVM, &pPGM->StatHCSyncCR3HandlerVirtualReset, STAMTYPE_PROFILE, "/PGM/HC/SyncCR3/Handlers/VirtualReset", STAMUNIT_TICKS_PER_CALL, "Profiling of the virtual handler resets.");1632 STAM_REG(pVM, &pPGM->StatHCSyncCR3Global, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/Global", STAMUNIT_OCCURENCES, "The number of global CR3 syncs.");1633 STAM_REG(pVM, &pPGM->StatHCSyncCR3NotGlobal, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/NotGlobal", STAMUNIT_OCCURENCES, "The number of non-global CR3 syncs.");1634 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstCacheHit, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstChacheHit", STAMUNIT_OCCURENCES, "The number of times we got some kind of a cache hit.");1635 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstFreed, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstFreed", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry.");1636 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstFreedSrcNP, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstFreedSrcNP", STAMUNIT_OCCURENCES, "The number of times we've had to free a shadow entry for which the source entry was not present.");1637 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstNotPresent, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstNotPresent", STAMUNIT_OCCURENCES, "The number of times we've encountered a not present shadow entry for a present guest entry.");1638 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstSkippedGlobalPD, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstSkippedGlobalPD", STAMUNIT_OCCURENCES, "The number of times a global page directory wasn't flushed.");1639 STAM_REG(pVM, &pPGM->StatHCSyncCR3DstSkippedGlobalPT, STAMTYPE_COUNTER, "/PGM/HC/SyncCR3/DstSkippedGlobalPT", STAMUNIT_OCCURENCES, "The number of times a page table with only global entries wasn't flushed.");1640 1626 1641 1627 STAM_REG(pVM, &pPGM->StatVirtHandleSearchByPhysGC, STAMTYPE_PROFILE, "/PGM/VirtHandler/SearchByPhys/GC", STAMUNIT_TICKS_PER_CALL, "Profiling of pgmHandlerVirtualFindByPhysAddr in GC."); … … 2864 2850 pVM->pgm.s.pfnR3ShwModifyPage = pModeData->pfnR3ShwModifyPage; 2865 2851 2866 pVM->pgm.s.pfn GCShwGetPage = pModeData->pfnGCShwGetPage;2867 pVM->pgm.s.pfn GCShwModifyPage = pModeData->pfnGCShwModifyPage;2852 pVM->pgm.s.pfnRCShwGetPage = pModeData->pfnRCShwGetPage; 2853 pVM->pgm.s.pfnRCShwModifyPage = pModeData->pfnRCShwModifyPage; 2868 2854 2869 2855 pVM->pgm.s.pfnR0ShwGetPage = pModeData->pfnR0ShwGetPage; … … 2887 2873 pVM->pgm.s.pszR3GstPAEWriteHandlerCR3 = pModeData->pszR3GstPAEWriteHandlerCR3; 2888 2874 2889 pVM->pgm.s.pfn GCGstGetPage = pModeData->pfnGCGstGetPage;2890 pVM->pgm.s.pfn GCGstModifyPage = pModeData->pfnGCGstModifyPage;2891 pVM->pgm.s.pfn GCGstGetPDE = pModeData->pfnGCGstGetPDE;2892 pVM->pgm.s.pfn GCGstMonitorCR3 = pModeData->pfnGCGstMonitorCR3;2893 pVM->pgm.s.pfn GCGstUnmonitorCR3 = pModeData->pfnGCGstUnmonitorCR3;2894 pVM->pgm.s.pfn GCGstMapCR3 = pModeData->pfnGCGstMapCR3;2895 pVM->pgm.s.pfn GCGstUnmapCR3 = pModeData->pfnGCGstUnmapCR3;2896 pVM->pgm.s.pfn GCGstWriteHandlerCR3 = pModeData->pfnGCGstWriteHandlerCR3;2897 pVM->pgm.s.pfn GCGstPAEWriteHandlerCR3 = pModeData->pfnGCGstPAEWriteHandlerCR3;2875 pVM->pgm.s.pfnRCGstGetPage = pModeData->pfnRCGstGetPage; 2876 pVM->pgm.s.pfnRCGstModifyPage = pModeData->pfnRCGstModifyPage; 2877 pVM->pgm.s.pfnRCGstGetPDE = pModeData->pfnRCGstGetPDE; 2878 pVM->pgm.s.pfnRCGstMonitorCR3 = pModeData->pfnRCGstMonitorCR3; 2879 pVM->pgm.s.pfnRCGstUnmonitorCR3 = pModeData->pfnRCGstUnmonitorCR3; 2880 pVM->pgm.s.pfnRCGstMapCR3 = pModeData->pfnRCGstMapCR3; 2881 pVM->pgm.s.pfnRCGstUnmapCR3 = pModeData->pfnRCGstUnmapCR3; 2882 pVM->pgm.s.pfnRCGstWriteHandlerCR3 = pModeData->pfnRCGstWriteHandlerCR3; 2883 pVM->pgm.s.pfnRCGstPAEWriteHandlerCR3 = pModeData->pfnRCGstPAEWriteHandlerCR3; 2898 2884 2899 2885 pVM->pgm.s.pfnR0GstGetPage = pModeData->pfnR0GstGetPage; … … 2910 2896 /* both */ 2911 2897 pVM->pgm.s.pfnR3BthRelocate = pModeData->pfnR3BthRelocate; 2912 pVM->pgm.s.pfnR3BthTrap0eHandler = pModeData->pfnR3BthTrap0eHandler;2913 2898 pVM->pgm.s.pfnR3BthInvalidatePage = pModeData->pfnR3BthInvalidatePage; 2914 2899 pVM->pgm.s.pfnR3BthSyncCR3 = pModeData->pfnR3BthSyncCR3; … … 2921 2906 #endif 2922 2907 2923 pVM->pgm.s.pfn GCBthTrap0eHandler = pModeData->pfnGCBthTrap0eHandler;2924 pVM->pgm.s.pfn GCBthInvalidatePage = pModeData->pfnGCBthInvalidatePage;2925 pVM->pgm.s.pfn GCBthSyncCR3 = pModeData->pfnGCBthSyncCR3;2926 pVM->pgm.s.pfn GCBthSyncPage = pModeData->pfnGCBthSyncPage;2927 pVM->pgm.s.pfn GCBthPrefetchPage = pModeData->pfnGCBthPrefetchPage;2928 pVM->pgm.s.pfn GCBthVerifyAccessSyncPage = pModeData->pfnGCBthVerifyAccessSyncPage;2908 pVM->pgm.s.pfnRCBthTrap0eHandler = pModeData->pfnRCBthTrap0eHandler; 2909 pVM->pgm.s.pfnRCBthInvalidatePage = pModeData->pfnRCBthInvalidatePage; 2910 pVM->pgm.s.pfnRCBthSyncCR3 = pModeData->pfnRCBthSyncCR3; 2911 pVM->pgm.s.pfnRCBthSyncPage = pModeData->pfnRCBthSyncPage; 2912 pVM->pgm.s.pfnRCBthPrefetchPage = pModeData->pfnRCBthPrefetchPage; 2913 pVM->pgm.s.pfnRCBthVerifyAccessSyncPage = pModeData->pfnRCBthVerifyAccessSyncPage; 2929 2914 #ifdef VBOX_STRICT 2930 pVM->pgm.s.pfn GCBthAssertCR3 = pModeData->pfnGCBthAssertCR3;2915 pVM->pgm.s.pfnRCBthAssertCR3 = pModeData->pfnRCBthAssertCR3; 2931 2916 #endif 2932 2917 -
trunk/src/VBox/VMM/PGMBth.h
r12975 r13067 55 55 pModeData->pfnR3BthRelocate = PGM_BTH_NAME(Relocate); 56 56 pModeData->pfnR3BthSyncCR3 = PGM_BTH_NAME(SyncCR3); 57 pModeData->pfnR3BthTrap0eHandler = PGM_BTH_NAME(Trap0eHandler);58 57 pModeData->pfnR3BthInvalidatePage = PGM_BTH_NAME(InvalidatePage); 59 58 pModeData->pfnR3BthSyncPage = PGM_BTH_NAME(SyncPage); … … 70 69 #if PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */ 71 70 /* GC */ 72 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(Trap0eHandler), &pModeData->pfnGCBthTrap0eHandler);73 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(Trap0eHandler), rc), rc);74 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(InvalidatePage), &pModeData->pfnGCBthInvalidatePage);75 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(InvalidatePage), rc), rc);76 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(SyncCR3), &pModeData->pfnGCBthSyncCR3);77 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(SyncPage), rc), rc);78 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(SyncPage), &pModeData->pfnGCBthSyncPage);79 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(SyncPage), rc), rc);80 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(PrefetchPage), &pModeData->pfnGCBthPrefetchPage);81 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(PrefetchPage), rc), rc);82 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(VerifyAccessSyncPage), &pModeData->pfnGCBthVerifyAccessSyncPage);83 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(VerifyAccessSyncPage), rc), rc);71 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(Trap0eHandler), &pModeData->pfnRCBthTrap0eHandler); 72 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(Trap0eHandler), rc), rc); 73 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(InvalidatePage), &pModeData->pfnRCBthInvalidatePage); 74 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(InvalidatePage), rc), rc); 75 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(SyncCR3), &pModeData->pfnRCBthSyncCR3); 76 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(SyncPage), rc), rc); 77 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(SyncPage), &pModeData->pfnRCBthSyncPage); 78 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(SyncPage), rc), rc); 79 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(PrefetchPage), &pModeData->pfnRCBthPrefetchPage); 80 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(PrefetchPage), rc), rc); 81 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage), &pModeData->pfnRCBthVerifyAccessSyncPage); 82 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage), rc), rc); 84 83 # ifdef VBOX_STRICT 85 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_ GC_STR(AssertCR3), &pModeData->pfnGCBthAssertCR3);86 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_ GC_STR(AssertCR3), rc), rc);84 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_BTH_NAME_RC_STR(AssertCR3), &pModeData->pfnRCBthAssertCR3); 85 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_RC_STR(AssertCR3), rc), rc); 87 86 # endif 88 87 #endif /* Not AMD64 shadow paging. */ -
trunk/src/VBox/VMM/PGMGst.h
r12975 r13067 168 168 #if PGM_SHW_TYPE != PGM_TYPE_AMD64 /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */ 169 169 /* GC */ 170 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(GetPage), &pModeData->pfnGCGstGetPage);171 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(GetPage), rc), rc);172 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(ModifyPage), &pModeData->pfnGCGstModifyPage);173 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(ModifyPage), rc), rc);174 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(GetPDE), &pModeData->pfnGCGstGetPDE);175 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(GetPDE), rc), rc);176 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(MonitorCR3), &pModeData->pfnGCGstMonitorCR3);177 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(MonitorCR3), rc), rc);178 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(UnmonitorCR3), &pModeData->pfnGCGstUnmonitorCR3);179 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(UnmonitorCR3), rc), rc);180 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(MapCR3), &pModeData->pfnGCGstMapCR3);181 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(MapCR3), rc), rc);182 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(UnmapCR3), &pModeData->pfnGCGstUnmapCR3);183 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(UnmapCR3), rc), rc);170 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(GetPage), &pModeData->pfnRCGstGetPage); 171 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(GetPage), rc), rc); 172 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(ModifyPage), &pModeData->pfnRCGstModifyPage); 173 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(ModifyPage), rc), rc); 174 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(GetPDE), &pModeData->pfnRCGstGetPDE); 175 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(GetPDE), rc), rc); 176 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(MonitorCR3), &pModeData->pfnRCGstMonitorCR3); 177 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(MonitorCR3), rc), rc); 178 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(UnmonitorCR3), &pModeData->pfnRCGstUnmonitorCR3); 179 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(UnmonitorCR3), rc), rc); 180 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(MapCR3), &pModeData->pfnRCGstMapCR3); 181 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(MapCR3), rc), rc); 182 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(UnmapCR3), &pModeData->pfnRCGstUnmapCR3); 183 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(UnmapCR3), rc), rc); 184 184 # if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE 185 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(WriteHandlerCR3), &pModeData->pfnGCGstWriteHandlerCR3);186 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(WriteHandlerCR3), rc), rc);187 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_ GC_STR(WriteHandlerCR3), &pModeData->pfnGCGstPAEWriteHandlerCR3);188 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_ GC_STR(PAEWriteHandlerCR3), rc), rc);185 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(WriteHandlerCR3), &pModeData->pfnRCGstWriteHandlerCR3); 186 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(WriteHandlerCR3), rc), rc); 187 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(WriteHandlerCR3), &pModeData->pfnRCGstPAEWriteHandlerCR3); 188 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_RC_STR(PAEWriteHandlerCR3), rc), rc); 189 189 # endif 190 190 #endif /* Not AMD64 shadow paging. */ -
trunk/src/VBox/VMM/PGMInternal.h
r13062 r13067 1712 1712 * @{ */ 1713 1713 #ifdef IN_GC 1714 # define PGM_CTX(a,b) a## GC##b1714 # define PGM_CTX(a,b) a##RC##b 1715 1715 # define PGM_CTX_STR(a,b) a "GC" b 1716 1716 # define PGM_CTX_DECL(type) VMMRCDECL(type) … … 1728 1728 1729 1729 #define PGM_GST_NAME_REAL(name) PGM_CTX(pgm,GstReal##name) 1730 #define PGM_GST_NAME_ GC_REAL_STR(name) "pgmGCGstReal" #name1730 #define PGM_GST_NAME_RC_REAL_STR(name) "pgmRCGstReal" #name 1731 1731 #define PGM_GST_NAME_R0_REAL_STR(name) "pgmR0GstReal" #name 1732 1732 #define PGM_GST_NAME_PROT(name) PGM_CTX(pgm,GstProt##name) 1733 #define PGM_GST_NAME_ GC_PROT_STR(name) "pgmGCGstProt" #name1733 #define PGM_GST_NAME_RC_PROT_STR(name) "pgmRCGstProt" #name 1734 1734 #define PGM_GST_NAME_R0_PROT_STR(name) "pgmR0GstProt" #name 1735 1735 #define PGM_GST_NAME_32BIT(name) PGM_CTX(pgm,Gst32Bit##name) 1736 #define PGM_GST_NAME_ GC_32BIT_STR(name) "pgmGCGst32Bit" #name1736 #define PGM_GST_NAME_RC_32BIT_STR(name) "pgmRCGst32Bit" #name 1737 1737 #define PGM_GST_NAME_R0_32BIT_STR(name) "pgmR0Gst32Bit" #name 1738 1738 #define PGM_GST_NAME_PAE(name) PGM_CTX(pgm,GstPAE##name) 1739 #define PGM_GST_NAME_ GC_PAE_STR(name) "pgmGCGstPAE" #name1739 #define PGM_GST_NAME_RC_PAE_STR(name) "pgmRCGstPAE" #name 1740 1740 #define PGM_GST_NAME_R0_PAE_STR(name) "pgmR0GstPAE" #name 1741 1741 #define PGM_GST_NAME_AMD64(name) PGM_CTX(pgm,GstAMD64##name) 1742 #define PGM_GST_NAME_ GC_AMD64_STR(name) "pgmGCGstAMD64" #name1742 #define PGM_GST_NAME_RC_AMD64_STR(name) "pgmRCGstAMD64" #name 1743 1743 #define PGM_GST_NAME_R0_AMD64_STR(name) "pgmR0GstAMD64" #name 1744 1744 #define PGM_GST_PFN(name, pVM) ((pVM)->pgm.s.PGM_CTX(pfn,Gst##name)) … … 1746 1746 1747 1747 #define PGM_SHW_NAME_32BIT(name) PGM_CTX(pgm,Shw32Bit##name) 1748 #define PGM_SHW_NAME_ GC_32BIT_STR(name) "pgmGCShw32Bit" #name1748 #define PGM_SHW_NAME_RC_32BIT_STR(name) "pgmRCShw32Bit" #name 1749 1749 #define PGM_SHW_NAME_R0_32BIT_STR(name) "pgmR0Shw32Bit" #name 1750 1750 #define PGM_SHW_NAME_PAE(name) PGM_CTX(pgm,ShwPAE##name) 1751 #define PGM_SHW_NAME_ GC_PAE_STR(name) "pgmGCShwPAE" #name1751 #define PGM_SHW_NAME_RC_PAE_STR(name) "pgmRCShwPAE" #name 1752 1752 #define PGM_SHW_NAME_R0_PAE_STR(name) "pgmR0ShwPAE" #name 1753 1753 #define PGM_SHW_NAME_AMD64(name) PGM_CTX(pgm,ShwAMD64##name) 1754 #define PGM_SHW_NAME_ GC_AMD64_STR(name) "pgmGCShwAMD64" #name1754 #define PGM_SHW_NAME_RC_AMD64_STR(name) "pgmRCShwAMD64" #name 1755 1755 #define PGM_SHW_NAME_R0_AMD64_STR(name) "pgmR0ShwAMD64" #name 1756 1756 #define PGM_SHW_NAME_NESTED(name) PGM_CTX(pgm,ShwNested##name) 1757 #define PGM_SHW_NAME_ GC_NESTED_STR(name) "pgmGCShwNested" #name1757 #define PGM_SHW_NAME_RC_NESTED_STR(name) "pgmRCShwNested" #name 1758 1758 #define PGM_SHW_NAME_R0_NESTED_STR(name) "pgmR0ShwNested" #name 1759 1759 #define PGM_SHW_NAME_EPT(name) PGM_CTX(pgm,ShwEPT##name) 1760 #define PGM_SHW_NAME_ GC_EPT_STR(name) "pgmGCShwEPT" #name1760 #define PGM_SHW_NAME_RC_EPT_STR(name) "pgmRCShwEPT" #name 1761 1761 #define PGM_SHW_NAME_R0_EPT_STR(name) "pgmR0ShwEPT" #name 1762 1762 #define PGM_SHW_DECL(type, name) PGM_CTX_DECL(type) PGM_SHW_NAME(name) … … 1784 1784 #define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX(pgm,BthEPTAMD64##name) 1785 1785 1786 #define PGM_BTH_NAME_ GC_32BIT_REAL_STR(name) "pgmGCBth32BitReal" #name1787 #define PGM_BTH_NAME_ GC_32BIT_PROT_STR(name) "pgmGCBth32BitProt" #name1788 #define PGM_BTH_NAME_ GC_32BIT_32BIT_STR(name) "pgmGCBth32Bit32Bit" #name1789 #define PGM_BTH_NAME_ GC_PAE_REAL_STR(name) "pgmGCBthPAEReal" #name1790 #define PGM_BTH_NAME_ GC_PAE_PROT_STR(name) "pgmGCBthPAEProt" #name1791 #define PGM_BTH_NAME_ GC_PAE_32BIT_STR(name) "pgmGCBthPAE32Bit" #name1792 #define PGM_BTH_NAME_ GC_PAE_PAE_STR(name) "pgmGCBthPAEPAE" #name1793 #define PGM_BTH_NAME_ GC_AMD64_AMD64_STR(name) "pgmGCBthAMD64AMD64" #name1794 #define PGM_BTH_NAME_ GC_NESTED_REAL_STR(name) "pgmGCBthNestedReal" #name1795 #define PGM_BTH_NAME_ GC_NESTED_PROT_STR(name) "pgmGCBthNestedProt" #name1796 #define PGM_BTH_NAME_ GC_NESTED_32BIT_STR(name) "pgmGCBthNested32Bit" #name1797 #define PGM_BTH_NAME_ GC_NESTED_PAE_STR(name) "pgmGCBthNestedPAE" #name1798 #define PGM_BTH_NAME_ GC_NESTED_AMD64_STR(name) "pgmGCBthNestedAMD64" #name1799 #define PGM_BTH_NAME_ GC_EPT_REAL_STR(name) "pgmGCBthEPTReal" #name1800 #define PGM_BTH_NAME_ GC_EPT_PROT_STR(name) "pgmGCBthEPTProt" #name1801 #define PGM_BTH_NAME_ GC_EPT_32BIT_STR(name) "pgmGCBthEPT32Bit" #name1802 #define PGM_BTH_NAME_ GC_EPT_PAE_STR(name) "pgmGCBthEPTPAE" #name1803 #define PGM_BTH_NAME_ GC_EPT_AMD64_STR(name) "pgmGCBthEPTAMD64" #name1786 #define PGM_BTH_NAME_RC_32BIT_REAL_STR(name) "pgmRCBth32BitReal" #name 1787 #define PGM_BTH_NAME_RC_32BIT_PROT_STR(name) "pgmRCBth32BitProt" #name 1788 #define PGM_BTH_NAME_RC_32BIT_32BIT_STR(name) "pgmRCBth32Bit32Bit" #name 1789 #define PGM_BTH_NAME_RC_PAE_REAL_STR(name) "pgmRCBthPAEReal" #name 1790 #define PGM_BTH_NAME_RC_PAE_PROT_STR(name) "pgmRCBthPAEProt" #name 1791 #define PGM_BTH_NAME_RC_PAE_32BIT_STR(name) "pgmRCBthPAE32Bit" #name 1792 #define PGM_BTH_NAME_RC_PAE_PAE_STR(name) "pgmRCBthPAEPAE" #name 1793 #define PGM_BTH_NAME_RC_AMD64_AMD64_STR(name) "pgmRCBthAMD64AMD64" #name 1794 #define PGM_BTH_NAME_RC_NESTED_REAL_STR(name) "pgmRCBthNestedReal" #name 1795 #define PGM_BTH_NAME_RC_NESTED_PROT_STR(name) "pgmRCBthNestedProt" #name 1796 #define PGM_BTH_NAME_RC_NESTED_32BIT_STR(name) "pgmRCBthNested32Bit" #name 1797 #define PGM_BTH_NAME_RC_NESTED_PAE_STR(name) "pgmRCBthNestedPAE" #name 1798 #define PGM_BTH_NAME_RC_NESTED_AMD64_STR(name) "pgmRCBthNestedAMD64" #name 1799 #define PGM_BTH_NAME_RC_EPT_REAL_STR(name) "pgmRCBthEPTReal" #name 1800 #define PGM_BTH_NAME_RC_EPT_PROT_STR(name) "pgmRCBthEPTProt" #name 1801 #define PGM_BTH_NAME_RC_EPT_32BIT_STR(name) "pgmRCBthEPT32Bit" #name 1802 #define PGM_BTH_NAME_RC_EPT_PAE_STR(name) "pgmRCBthEPTPAE" #name 1803 #define PGM_BTH_NAME_RC_EPT_AMD64_STR(name) "pgmRCBthEPTAMD64" #name 1804 1804 #define PGM_BTH_NAME_R0_32BIT_REAL_STR(name) "pgmR0Bth32BitReal" #name 1805 1805 #define PGM_BTH_NAME_R0_32BIT_PROT_STR(name) "pgmR0Bth32BitProt" #name … … 1844 1844 DECLR3CALLBACKMEMBER(int, pfnR3ShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 1845 1845 1846 DECLRCCALLBACKMEMBER(int, pfn GCShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys));1847 DECLRCCALLBACKMEMBER(int, pfn GCShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));1846 DECLRCCALLBACKMEMBER(int, pfnRCShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys)); 1847 DECLRCCALLBACKMEMBER(int, pfnRCShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 1848 1848 1849 1849 DECLR0CALLBACKMEMBER(int, pfnR0ShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys)); … … 1868 1868 R3PTRTYPE(const char *) pszR3GstPAEWriteHandlerCR3; 1869 1869 1870 DECLRCCALLBACKMEMBER(int, pfn GCGstGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys));1871 DECLRCCALLBACKMEMBER(int, pfn GCGstModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));1872 DECLRCCALLBACKMEMBER(int, pfn GCGstGetPDE,(PVM pVM, RTGCUINTPTR GCPtr, PX86PDEPAE pPde));1873 DECLRCCALLBACKMEMBER(int, pfn GCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));1874 DECLRCCALLBACKMEMBER(int, pfn GCGstUnmonitorCR3,(PVM pVM));1875 DECLRCCALLBACKMEMBER(int, pfn GCGstMapCR3,(PVM pVM, RTGCPHYS GCPhysCR3));1876 DECLRCCALLBACKMEMBER(int, pfn GCGstUnmapCR3,(PVM pVM));1877 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfn GCGstWriteHandlerCR3;1878 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfn GCGstPAEWriteHandlerCR3;1870 DECLRCCALLBACKMEMBER(int, pfnRCGstGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys)); 1871 DECLRCCALLBACKMEMBER(int, pfnRCGstModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 1872 DECLRCCALLBACKMEMBER(int, pfnRCGstGetPDE,(PVM pVM, RTGCUINTPTR GCPtr, PX86PDEPAE pPde)); 1873 DECLRCCALLBACKMEMBER(int, pfnRCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3)); 1874 DECLRCCALLBACKMEMBER(int, pfnRCGstUnmonitorCR3,(PVM pVM)); 1875 DECLRCCALLBACKMEMBER(int, pfnRCGstMapCR3,(PVM pVM, RTGCPHYS GCPhysCR3)); 1876 DECLRCCALLBACKMEMBER(int, pfnRCGstUnmapCR3,(PVM pVM)); 1877 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnRCGstWriteHandlerCR3; 1878 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnRCGstPAEWriteHandlerCR3; 1879 1879 1880 1880 DECLR0CALLBACKMEMBER(int, pfnR0GstGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys)); … … 1893 1893 */ 1894 1894 DECLR3CALLBACKMEMBER(int, pfnR3BthRelocate,(PVM pVM, RTGCUINTPTR offDelta)); 1895 DECLR3CALLBACKMEMBER(int, pfnR3BthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault));1895 /* no pfnR3BthTrap0eHandler */ 1896 1896 DECLR3CALLBACKMEMBER(int, pfnR3BthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage)); 1897 1897 DECLR3CALLBACKMEMBER(int, pfnR3BthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal)); … … 1903 1903 #endif 1904 1904 1905 DECLRCCALLBACKMEMBER(int, pfn GCBthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault));1906 DECLRCCALLBACKMEMBER(int, pfn GCBthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage));1907 DECLRCCALLBACKMEMBER(int, pfn GCBthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal));1908 DECLRCCALLBACKMEMBER(int, pfn GCBthSyncPage,(PVM pVM, X86PDE PdeSrc, RTGCUINTPTR GCPtrPage, unsigned cPages, unsigned uError));1909 DECLRCCALLBACKMEMBER(int, pfn GCBthPrefetchPage,(PVM pVM, RTGCUINTPTR GCPtrPage));1910 DECLRCCALLBACKMEMBER(int, pfn GCBthVerifyAccessSyncPage,(PVM pVM, RTGCUINTPTR GCPtrPage, unsigned fFlags, unsigned uError));1905 DECLRCCALLBACKMEMBER(int, pfnRCBthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault)); 1906 DECLRCCALLBACKMEMBER(int, pfnRCBthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage)); 1907 DECLRCCALLBACKMEMBER(int, pfnRCBthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal)); 1908 DECLRCCALLBACKMEMBER(int, pfnRCBthSyncPage,(PVM pVM, X86PDE PdeSrc, RTGCUINTPTR GCPtrPage, unsigned cPages, unsigned uError)); 1909 DECLRCCALLBACKMEMBER(int, pfnRCBthPrefetchPage,(PVM pVM, RTGCUINTPTR GCPtrPage)); 1910 DECLRCCALLBACKMEMBER(int, pfnRCBthVerifyAccessSyncPage,(PVM pVM, RTGCUINTPTR GCPtrPage, unsigned fFlags, unsigned uError)); 1911 1911 #ifdef VBOX_STRICT 1912 DECLRCCALLBACKMEMBER(unsigned, pfn GCBthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb));1912 DECLRCCALLBACKMEMBER(unsigned, pfnRCBthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb)); 1913 1913 #endif 1914 1914 … … 2109 2109 DECLR3CALLBACKMEMBER(int, pfnR3ShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 2110 2110 2111 DECLRCCALLBACKMEMBER(int, pfn GCShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys));2112 DECLRCCALLBACKMEMBER(int, pfn GCShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));2111 DECLRCCALLBACKMEMBER(int, pfnRCShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys)); 2112 DECLRCCALLBACKMEMBER(int, pfnRCShwModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 2113 2113 2114 2114 DECLR0CALLBACKMEMBER(int, pfnR0ShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys)); … … 2134 2134 R3PTRTYPE(const char *) pszR3GstPAEWriteHandlerCR3; 2135 2135 2136 DECLRCCALLBACKMEMBER(int, pfn GCGstGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys));2137 DECLRCCALLBACKMEMBER(int, pfn GCGstModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));2138 DECLRCCALLBACKMEMBER(int, pfn GCGstGetPDE,(PVM pVM, RTGCUINTPTR GCPtr, PX86PDEPAE pPde));2139 DECLRCCALLBACKMEMBER(int, pfn GCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));2140 DECLRCCALLBACKMEMBER(int, pfn GCGstUnmonitorCR3,(PVM pVM));2141 DECLRCCALLBACKMEMBER(int, pfn GCGstMapCR3,(PVM pVM, RTGCPHYS GCPhysCR3));2142 DECLRCCALLBACKMEMBER(int, pfn GCGstUnmapCR3,(PVM pVM));2143 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfn GCGstWriteHandlerCR3;2144 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfn GCGstPAEWriteHandlerCR3;2136 DECLRCCALLBACKMEMBER(int, pfnRCGstGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys)); 2137 DECLRCCALLBACKMEMBER(int, pfnRCGstModifyPage,(PVM pVM, RTGCUINTPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask)); 2138 DECLRCCALLBACKMEMBER(int, pfnRCGstGetPDE,(PVM pVM, RTGCUINTPTR GCPtr, PX86PDEPAE pPde)); 2139 DECLRCCALLBACKMEMBER(int, pfnRCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3)); 2140 DECLRCCALLBACKMEMBER(int, pfnRCGstUnmonitorCR3,(PVM pVM)); 2141 DECLRCCALLBACKMEMBER(int, pfnRCGstMapCR3,(PVM pVM, RTGCPHYS GCPhysCR3)); 2142 DECLRCCALLBACKMEMBER(int, pfnRCGstUnmapCR3,(PVM pVM)); 2143 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnRCGstWriteHandlerCR3; 2144 RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnRCGstPAEWriteHandlerCR3; 2145 2145 #if HC_ARCH_BITS == 64 2146 2146 RTRCPTR alignment3; /**< structure size alignment. */ … … 2162 2162 */ 2163 2163 DECLR3CALLBACKMEMBER(int, pfnR3BthRelocate,(PVM pVM, RTGCUINTPTR offDelta)); 2164 DECLR3CALLBACKMEMBER(int, pfnR3BthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault));2164 /* no pfnR3BthTrap0eHandler */ 2165 2165 DECLR3CALLBACKMEMBER(int, pfnR3BthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage)); 2166 2166 DECLR3CALLBACKMEMBER(int, pfnR3BthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal)); … … 2178 2178 DECLR0CALLBACKMEMBER(unsigned, pfnR0BthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb)); 2179 2179 2180 DECLRCCALLBACKMEMBER(int, pfn GCBthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault));2181 DECLRCCALLBACKMEMBER(int, pfn GCBthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage));2182 DECLRCCALLBACKMEMBER(int, pfn GCBthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal));2183 DECLRCCALLBACKMEMBER(int, pfn GCBthSyncPage,(PVM pVM, X86PDE PdeSrc, RTGCUINTPTR GCPtrPage, unsigned cPages, unsigned uError));2184 DECLRCCALLBACKMEMBER(int, pfn GCBthPrefetchPage,(PVM pVM, RTGCUINTPTR GCPtrPage));2185 DECLRCCALLBACKMEMBER(int, pfn GCBthVerifyAccessSyncPage,(PVM pVM, RTGCUINTPTR GCPtrPage, unsigned fFlags, unsigned uError));2186 DECLRCCALLBACKMEMBER(unsigned, pfn GCBthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb));2180 DECLRCCALLBACKMEMBER(int, pfnRCBthTrap0eHandler,(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault)); 2181 DECLRCCALLBACKMEMBER(int, pfnRCBthInvalidatePage,(PVM pVM, RTGCPTR GCPtrPage)); 2182 DECLRCCALLBACKMEMBER(int, pfnRCBthSyncCR3,(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal)); 2183 DECLRCCALLBACKMEMBER(int, pfnRCBthSyncPage,(PVM pVM, X86PDE PdeSrc, RTGCUINTPTR GCPtrPage, unsigned cPages, unsigned uError)); 2184 DECLRCCALLBACKMEMBER(int, pfnRCBthPrefetchPage,(PVM pVM, RTGCUINTPTR GCPtrPage)); 2185 DECLRCCALLBACKMEMBER(int, pfnRCBthVerifyAccessSyncPage,(PVM pVM, RTGCUINTPTR GCPtrPage, unsigned fFlags, unsigned uError)); 2186 DECLRCCALLBACKMEMBER(unsigned, pfnRCBthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb)); 2187 2187 #if HC_ARCH_BITS == 64 2188 2188 RTRCPTR alignment2; /**< structure size alignment. */ … … 2398 2398 /** @} */ 2399 2399 2400 #ifdef VBOX_WITH_STATISTICS 2401 /** GC: Which statistic this \#PF should be attributed to. */ 2402 RCPTRTYPE(PSTAMPROFILE) pStatTrap0eAttributionGC; 2403 RTRCPTR padding0; 2404 /** HC: Which statistic this \#PF should be attributed to. */ 2405 R3R0PTRTYPE(PSTAMPROFILE) pStatTrap0eAttributionHC; 2406 RTHCPTR padding1; 2400 #ifdef VBOX_WITH_STATISTICS /** @todo move this chunk to the heap. */ 2401 /** RC: Which statistic this \#PF should be attributed to. */ 2402 RCPTRTYPE(PSTAMPROFILE) pStatTrap0eAttributionRC; 2403 RTRCPTR padding0; 2404 /** R0: Which statistic this \#PF should be attributed to. */ 2405 R0PTRTYPE(PSTAMPROFILE) pStatTrap0eAttributionR0; 2406 RTR0PTR padding1; 2407 2408 /* R3 only: */ 2409 2410 /* GC only: */ 2411 STAMPROFILE StatGCInvalidatePage; /**< GC: PGMGCInvalidatePage() profiling. */ 2412 2413 /* RZ only: */ 2414 2415 /* RZ & R3: */ 2416 STAMPROFILE StatRZSyncCR3; /**< RC/R0: PGMSyncCR3() profiling. */ 2417 STAMPROFILE StatRZSyncCR3Handlers; /**< RC/R0: Profiling of the PGMSyncCR3() update handler section. */ 2418 STAMPROFILE StatRZSyncCR3HandlerVirtualReset; /**< RC/R0: Profiling of the virtual handler resets. */ 2419 STAMPROFILE StatRZSyncCR3HandlerVirtualUpdate; /**< RC/R0: Profiling of the virtual handler updates. */ 2420 STAMCOUNTER StatRZSyncCR3Global; /**< RC/R0: The number of global CR3 syncs. */ 2421 STAMCOUNTER StatRZSyncCR3NotGlobal; /**< RC/R0: The number of non-global CR3 syncs. */ 2422 STAMCOUNTER StatRZSyncCR3DstCacheHit; /**< RC/R0: The number of times we got some kind of cache hit on a page table. */ 2423 STAMCOUNTER StatRZSyncCR3DstFreed; /**< RC/R0: The number of times we've had to free a shadow entry. */ 2424 STAMCOUNTER StatRZSyncCR3DstFreedSrcNP; /**< RC/R0: The number of times we've had to free a shadow entry for which the source entry was not present. */ 2425 STAMCOUNTER StatRZSyncCR3DstNotPresent; /**< RC/R0: The number of times we've encountered a not present shadow entry for a present guest entry. */ 2426 STAMCOUNTER StatRZSyncCR3DstSkippedGlobalPD; /**< RC/R0: The number of times a global page directory wasn't flushed. */ 2427 STAMCOUNTER StatRZSyncCR3DstSkippedGlobalPT; /**< RC/R0: The number of times a page table with only global entries wasn't flushed. */ 2428 STAMPROFILE StatRZSyncPT; /**< RC/R0: PGMSyncPT() profiling. */ 2429 STAMCOUNTER StatRZSyncPTFailed; /**< RC/R0: The number of times PGMSyncPT() failed. */ 2430 STAMCOUNTER StatRZSyncPagePDNAs; /**< RC/R0: The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit. */ 2431 STAMCOUNTER StatRZSyncPagePDOutOfSync; /**< RC/R0: The number of time we've encountered an out-of-sync PD in SyncPage. */ 2432 STAMCOUNTER StatRZAccessedPage; /**< RC/R0: The number of pages marked not present for accessed bit emulation. */ 2433 STAMPROFILE StatRZDirtyBitTracking; /**< RC/R0: Profiling the dirty bit tracking in CheckPageFault().. */ 2434 STAMCOUNTER StatRZDirtyPage; /**< RC/R0: The number of pages marked read-only for dirty bit tracking. */ 2435 STAMCOUNTER StatRZDirtyPageBig; /**< RC/R0: The number of pages marked read-only for dirty bit tracking. */ 2436 STAMCOUNTER StatRZDirtyPageSkipped; /**< RC/R0: The number of pages already dirty or readonly. */ 2437 STAMCOUNTER StatRZDirtyPageTrap; /**< RC/R0: The number of traps generated for dirty bit tracking. */ 2438 STAMCOUNTER StatRZDirtyTrackRealPF; /**< RC/R0: The number of real pages faults during dirty bit tracking. */ 2439 STAMCOUNTER StatRZDirtiedPage; /**< RC/R0: The number of pages marked dirty because of write accesses. */ 2440 STAMCOUNTER StatRZPageAlreadyDirty; /**< RC/R0: The number of pages already marked dirty because of write accesses. */ 2441 STAMPROFILE StatRZInvalidatePage; /**< RC/R0: PGMInvalidatePage() profiling. */ 2442 STAMCOUNTER StatRZInvalidatePage4KBPages; /**< RC/R0: The number of times PGMInvalidatePage() was called for a 4KB page. */ 2443 STAMCOUNTER StatRZInvalidatePage4MBPages; /**< RC/R0: The number of times PGMInvalidatePage() was called for a 4MB page. */ 2444 STAMCOUNTER StatRZInvalidatePage4MBPagesSkip; /**< RC/R0: The number of times PGMInvalidatePage() skipped a 4MB page. */ 2445 STAMCOUNTER StatRZInvalidatePagePDMappings; /**< RC/R0: The number of times PGMInvalidatePage() was called for a page directory containing mappings (no conflict). */ 2446 STAMCOUNTER StatRZInvalidatePagePDNAs; /**< RC/R0: The number of times PGMInvalidatePage() was called for a not accessed page directory. */ 2447 STAMCOUNTER StatRZInvalidatePagePDNPs; /**< RC/R0: The number of times PGMInvalidatePage() was called for a not present page directory. */ 2448 STAMCOUNTER StatRZInvalidatePagePDOutOfSync; /**< RC/R0: The number of times PGMInvalidatePage() was called for an out of sync page directory. */ 2449 STAMCOUNTER StatRZInvalidatePageSkipped; /**< RC/R0: The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */ 2450 2451 STAMPROFILE StatR3SyncCR3; /**< R3: PGMSyncCR3() profiling. */ 2452 STAMPROFILE StatR3SyncCR3Handlers; /**< R3: Profiling of the PGMSyncCR3() update handler section. */ 2453 STAMPROFILE StatR3SyncCR3HandlerVirtualReset; /**< R3: Profiling of the virtual handler resets. */ 2454 STAMPROFILE StatR3SyncCR3HandlerVirtualUpdate; /**< R3: Profiling of the virtual handler updates. */ 2455 STAMCOUNTER StatR3SyncCR3Global; /**< R3: The number of global CR3 syncs. */ 2456 STAMCOUNTER StatR3SyncCR3NotGlobal; /**< R3: The number of non-global CR3 syncs. */ 2457 STAMCOUNTER StatR3SyncCR3DstFreed; /**< R3: The number of times we've had to free a shadow entry. */ 2458 STAMCOUNTER StatR3SyncCR3DstFreedSrcNP; /**< R3: The number of times we've had to free a shadow entry for which the source entry was not present. */ 2459 STAMCOUNTER StatR3SyncCR3DstNotPresent; /**< R3: The number of times we've encountered a not present shadow entry for a present guest entry. */ 2460 STAMCOUNTER StatR3SyncCR3DstSkippedGlobalPD; /**< R3: The number of times a global page directory wasn't flushed. */ 2461 STAMCOUNTER StatR3SyncCR3DstSkippedGlobalPT; /**< R3: The number of times a page table with only global entries wasn't flushed. */ 2462 STAMCOUNTER StatR3SyncCR3DstCacheHit; /**< R3: The number of times we got some kind of cache hit on a page table. */ 2463 STAMPROFILE StatR3SyncPT; /**< R3: PGMSyncPT() profiling. */ 2464 STAMCOUNTER StatR3SyncPTFailed; /**< R3: The number of times PGMSyncPT() failed. */ 2465 STAMCOUNTER StatR3SyncPagePDNAs; /**< R3: The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit. */ 2466 STAMCOUNTER StatR3SyncPagePDOutOfSync; /**< R3: The number of time we've encountered an out-of-sync PD in SyncPage. */ 2467 STAMCOUNTER StatR3AccessedPage; /**< R3: The number of pages marked not present for accessed bit emulation. */ 2468 STAMPROFILE StatR3DirtyBitTracking; /**< R3: Profiling the dirty bit tracking in CheckPageFault(). */ 2469 STAMCOUNTER StatR3DirtyPage; /**< R3: The number of pages marked read-only for dirty bit tracking. */ 2470 STAMCOUNTER StatR3DirtyPageBig; /**< R3: The number of pages marked read-only for dirty bit tracking. */ 2471 STAMCOUNTER StatR3DirtyPageSkipped; /**< R3: The number of pages already dirty or readonly. */ 2472 STAMCOUNTER StatR3DirtyPageTrap; /**< R3: The number of traps generated for dirty bit tracking. */ 2473 STAMCOUNTER StatR3DirtyTrackRealPF; /**< R3: The number of real pages faults during dirty bit tracking. */ 2474 STAMCOUNTER StatR3DirtiedPage; /**< R3: The number of pages marked dirty because of write accesses. */ 2475 STAMCOUNTER StatR3PageAlreadyDirty; /**< R3: The number of pages already marked dirty because of write accesses. */ 2476 STAMPROFILE StatR3InvalidatePage; /**< R3: PGMInvalidatePage() profiling. */ 2477 STAMCOUNTER StatR3InvalidatePage4KBPages; /**< R3: The number of times PGMInvalidatePage() was called for a 4KB page. */ 2478 STAMCOUNTER StatR3InvalidatePage4MBPages; /**< R3: The number of times PGMInvalidatePage() was called for a 4MB page. */ 2479 STAMCOUNTER StatR3InvalidatePage4MBPagesSkip; /**< R3: The number of times PGMInvalidatePage() skipped a 4MB page. */ 2480 STAMCOUNTER StatR3InvalidatePagePDNAs; /**< R3: The number of times PGMInvalidatePage() was called for a not accessed page directory. */ 2481 STAMCOUNTER StatR3InvalidatePagePDNPs; /**< R3: The number of times PGMInvalidatePage() was called for a not present page directory. */ 2482 STAMCOUNTER StatR3InvalidatePagePDMappings; /**< R3: The number of times PGMInvalidatePage() was called for a page directory containing mappings (no conflict). */ 2483 STAMCOUNTER StatR3InvalidatePagePDOutOfSync; /**< R3: The number of times PGMInvalidatePage() was called for an out of sync page directory. */ 2484 STAMCOUNTER StatR3InvalidatePageSkipped; /**< R3: The number of times PGMInvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */ 2485 2486 /* TODO (cleanup): */ 2487 2488 /** GC: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2489 STAMPROFILE StatVirtHandleSearchByPhysGC; 2490 /** HC: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2491 STAMPROFILE StatVirtHandleSearchByPhysHC; 2492 /** HC: The number of times PGMR3HandlerPhysicalReset is called. */ 2493 STAMCOUNTER StatHandlePhysicalReset; 2494 2495 STAMPROFILE StatCheckPageFault; 2496 STAMPROFILE StatLazySyncPT; 2497 STAMPROFILE StatMapping; 2498 STAMPROFILE StatOutOfSync; 2499 STAMPROFILE StatHandlers; 2500 STAMPROFILE StatEIPHandlers; 2501 STAMPROFILE StatHCPrefetch; 2502 2503 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING 2504 STAMCOUNTER StatTrackVirgin; /**< The number of first time shadowings. */ 2505 STAMCOUNTER StatTrackAliased; /**< The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */ 2506 STAMCOUNTER StatTrackAliasedMany; /**< The number of times we're tracking using cRef2. */ 2507 STAMCOUNTER StatTrackAliasedLots; /**< The number of times we're hitting pages which has overflowed cRef2. */ 2508 STAMCOUNTER StatTrackOverflows; /**< The number of times the extent list grows to long. */ 2509 STAMPROFILE StatTrackDeref; /**< Profiling of SyncPageWorkerTrackDeref (expensive). */ 2510 # endif 2511 2512 STAMCOUNTER StatPageHCMapTlbHits; /** Ring-3/0 page mapper TLB hits. */ 2513 STAMCOUNTER StatPageHCMapTlbMisses; /** Ring-3/0 page mapper TLB misses. */ 2514 STAMCOUNTER StatChunkR3MapTlbHits; /** Ring-3/0 chunk mapper TLB hits. */ 2515 STAMCOUNTER StatChunkR3MapTlbMisses; /** Ring-3/0 chunk mapper TLB misses. */ 2516 STAMCOUNTER StatPageReplaceShared; /** Times a shared page has been replaced by a private one. */ 2517 STAMCOUNTER StatPageReplaceZero; /** Times the zero page has been replaced by a private one. */ 2518 STAMCOUNTER StatPageHandyAllocs; /** The number of times we've executed GMMR3AllocateHandyPages. */ 2519 2520 STAMCOUNTER StatDynRamTotal; /** Allocated MBs of guest ram */ 2521 STAMCOUNTER StatDynRamGrow; /** Nr of pgmr3PhysGrowRange calls. */ 2522 2523 STAMCOUNTER StatGCTrap0ePD[X86_PG_ENTRIES]; 2524 STAMCOUNTER StatGCSyncPtPD[X86_PG_ENTRIES]; 2525 STAMCOUNTER StatGCSyncPagePD[X86_PG_ENTRIES]; 2526 2407 2527 STAMPROFILE StatGCTrap0e; /**< GC: PGMGCTrap0eHandler() profiling. */ 2408 2528 STAMPROFILE StatTrap0eCSAM; /**< Profiling of the Trap0eHandler body when the cause is CSAM. */ … … 2441 2561 STAMCOUNTER StatGCTrap0eMap; 2442 2562 2443 /** GC: PGMSyncPT() profiling. */2444 STAMPROFILE StatGCSyncPT;2445 /** GC: The number of times PGMSyncPT() needed to allocate page tables. */2446 STAMCOUNTER StatGCSyncPTAlloc;2447 /** GC: The number of times PGMSyncPT() detected conflicts. */2448 STAMCOUNTER StatGCSyncPTConflict;2449 /** GC: The number of times PGMSyncPT() failed. */2450 STAMCOUNTER StatGCSyncPTFailed;2451 /** GC: PGMGCInvalidatePage() profiling. */2452 STAMPROFILE StatGCInvalidatePage;2453 /** GC: The number of times PGMGCInvalidatePage() was called for a 4KB page. */2454 STAMCOUNTER StatGCInvalidatePage4KBPages;2455 /** GC: The number of times PGMGCInvalidatePage() was called for a 4MB page. */2456 STAMCOUNTER StatGCInvalidatePage4MBPages;2457 /** GC: The number of times PGMGCInvalidatePage() skipped a 4MB page. */2458 STAMCOUNTER StatGCInvalidatePage4MBPagesSkip;2459 /** GC: The number of times PGMGCInvalidatePage() was called for a not accessed page directory. */2460 STAMCOUNTER StatGCInvalidatePagePDNAs;2461 /** GC: The number of times PGMGCInvalidatePage() was called for a not present page directory. */2462 STAMCOUNTER StatGCInvalidatePagePDNPs;2463 /** GC: The number of times PGMGCInvalidatePage() was called for a page directory containing mappings (no conflict). */2464 STAMCOUNTER StatGCInvalidatePagePDMappings;2465 /** GC: The number of times PGMGCInvalidatePage() was called for an out of sync page directory. */2466 STAMCOUNTER StatGCInvalidatePagePDOutOfSync;2467 /** HC: The number of times PGMGCInvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */2468 STAMCOUNTER StatGCInvalidatePageSkipped;2469 2563 /** GC: The number of times user page is out of sync was detected in GC. */ 2470 2564 STAMCOUNTER StatGCPageOutOfSyncUser; … … 2501 2595 STAMCOUNTER StatGCGuestROMWriteUnhandled; 2502 2596 2503 /** HC: PGMR3InvalidatePage() profiling. */2504 STAMPROFILE StatHCInvalidatePage;2505 /** HC: The number of times PGMR3InvalidatePage() was called for a 4KB page. */2506 STAMCOUNTER StatHCInvalidatePage4KBPages;2507 /** HC: The number of times PGMR3InvalidatePage() was called for a 4MB page. */2508 STAMCOUNTER StatHCInvalidatePage4MBPages;2509 /** HC: The number of times PGMR3InvalidatePage() skipped a 4MB page. */2510 STAMCOUNTER StatHCInvalidatePage4MBPagesSkip;2511 /** HC: The number of times PGMR3InvalidatePage() was called for a not accessed page directory. */2512 STAMCOUNTER StatHCInvalidatePagePDNAs;2513 /** HC: The number of times PGMR3InvalidatePage() was called for a not present page directory. */2514 STAMCOUNTER StatHCInvalidatePagePDNPs;2515 /** HC: The number of times PGMR3InvalidatePage() was called for a page directory containing mappings (no conflict). */2516 STAMCOUNTER StatHCInvalidatePagePDMappings;2517 /** HC: The number of times PGMGCInvalidatePage() was called for an out of sync page directory. */2518 STAMCOUNTER StatHCInvalidatePagePDOutOfSync;2519 /** HC: The number of times PGMR3InvalidatePage() was skipped due to not present shw or pending pending SyncCR3. */2520 STAMCOUNTER StatHCInvalidatePageSkipped;2521 /** HC: PGMR3SyncPT() profiling. */2522 STAMPROFILE StatHCSyncPT;2523 2597 /** HC: pgmr3SyncPTResolveConflict() profiling (includes the entire relocation). */ 2524 2598 STAMPROFILE StatHCResolveConflict; … … 2530 2604 STAMCOUNTER StatHCGuestPDWriteConflict; 2531 2605 2532 /** HC: The number of pages marked not present for accessed bit emulation. */2533 STAMCOUNTER StatHCAccessedPage;2534 /** HC: The number of pages marked read-only for dirty bit tracking. */2535 STAMCOUNTER StatHCDirtyPage;2536 /** HC: The number of pages marked read-only for dirty bit tracking. */2537 STAMCOUNTER StatHCDirtyPageBig;2538 /** HC: The number of traps generated for dirty bit tracking. */2539 STAMCOUNTER StatHCDirtyPageTrap;2540 /** HC: The number of pages already dirty or readonly. */2541 STAMCOUNTER StatHCDirtyPageSkipped;2542 2543 /** GC: The number of pages marked not present for accessed bit emulation. */2544 STAMCOUNTER StatGCAccessedPage;2545 /** GC: The number of pages marked read-only for dirty bit tracking. */2546 STAMCOUNTER StatGCDirtyPage;2547 /** GC: The number of pages marked read-only for dirty bit tracking. */2548 STAMCOUNTER StatGCDirtyPageBig;2549 /** GC: The number of traps generated for dirty bit tracking. */2550 STAMCOUNTER StatGCDirtyPageTrap;2551 /** GC: The number of pages already dirty or readonly. */2552 STAMCOUNTER StatGCDirtyPageSkipped;2553 /** GC: The number of pages marked dirty because of write accesses. */2554 STAMCOUNTER StatGCDirtiedPage;2555 /** GC: The number of pages already marked dirty because of write accesses. */2556 STAMCOUNTER StatGCPageAlreadyDirty;2557 /** GC: The number of real pages faults during dirty bit tracking. */2558 STAMCOUNTER StatGCDirtyTrackRealPF;2559 2560 /** GC: Profiling of the PGMTrackDirtyBit() body */2561 STAMPROFILE StatGCDirtyBitTracking;2562 /** HC: Profiling of the PGMTrackDirtyBit() body */2563 STAMPROFILE StatHCDirtyBitTracking;2564 2606 2565 2607 /** GC: Profiling of the PGMGstModifyPage() body */ … … 2567 2609 /** HC: Profiling of the PGMGstModifyPage() body */ 2568 2610 STAMPROFILE StatHCGstModifyPage; 2569 2570 /** GC: The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit. */2571 STAMCOUNTER StatGCSyncPagePDNAs;2572 /** GC: The number of time we've encountered an out-of-sync PD in SyncPage. */2573 STAMCOUNTER StatGCSyncPagePDOutOfSync;2574 /** HC: The number of time we've marked a PD not present from SyncPage to virtualize the accessed bit. */2575 STAMCOUNTER StatHCSyncPagePDNAs;2576 /** HC: The number of time we've encountered an out-of-sync PD in SyncPage. */2577 STAMCOUNTER StatHCSyncPagePDOutOfSync;2578 2611 2579 2612 STAMCOUNTER StatSynPT4kGC; … … 2593 2626 STAMCOUNTER StatFlushTLBSameCR3Global; 2594 2627 2595 STAMPROFILE StatGCSyncCR3; /**< GC: PGMSyncCR3() profiling. */ 2596 STAMPROFILE StatGCSyncCR3Handlers; /**< GC: Profiling of the PGMSyncCR3() update handler section. */ 2597 STAMPROFILE StatGCSyncCR3HandlerVirtualReset; /**< GC: Profiling of the virtual handler resets. */ 2598 STAMPROFILE StatGCSyncCR3HandlerVirtualUpdate; /**< GC: Profiling of the virtual handler updates. */ 2599 STAMCOUNTER StatGCSyncCR3Global; /**< GC: The number of global CR3 syncs. */ 2600 STAMCOUNTER StatGCSyncCR3NotGlobal; /**< GC: The number of non-global CR3 syncs. */ 2601 STAMCOUNTER StatGCSyncCR3DstFreed; /**< GC: The number of times we've had to free a shadow entry. */ 2602 STAMCOUNTER StatGCSyncCR3DstFreedSrcNP; /**< GC: The number of times we've had to free a shadow entry for which the source entry was not present. */ 2603 STAMCOUNTER StatGCSyncCR3DstNotPresent; /**< GC: The number of times we've encountered a not present shadow entry for a present guest entry. */ 2604 STAMCOUNTER StatGCSyncCR3DstSkippedGlobalPD; /**< GC: The number of times a global page directory wasn't flushed. */ 2605 STAMCOUNTER StatGCSyncCR3DstSkippedGlobalPT; /**< GC: The number of times a page table with only global entries wasn't flushed. */ 2606 STAMCOUNTER StatGCSyncCR3DstCacheHit; /**< GC: The number of times we got some kind of cache hit on a page table. */ 2607 2608 STAMPROFILE StatHCSyncCR3; /**< HC: PGMSyncCR3() profiling. */ 2609 STAMPROFILE StatHCSyncCR3Handlers; /**< HC: Profiling of the PGMSyncCR3() update handler section. */ 2610 STAMPROFILE StatHCSyncCR3HandlerVirtualReset; /**< HC: Profiling of the virtual handler resets. */ 2611 STAMPROFILE StatHCSyncCR3HandlerVirtualUpdate; /**< HC: Profiling of the virtual handler updates. */ 2612 STAMCOUNTER StatHCSyncCR3Global; /**< HC: The number of global CR3 syncs. */ 2613 STAMCOUNTER StatHCSyncCR3NotGlobal; /**< HC: The number of non-global CR3 syncs. */ 2614 STAMCOUNTER StatHCSyncCR3DstFreed; /**< HC: The number of times we've had to free a shadow entry. */ 2615 STAMCOUNTER StatHCSyncCR3DstFreedSrcNP; /**< HC: The number of times we've had to free a shadow entry for which the source entry was not present. */ 2616 STAMCOUNTER StatHCSyncCR3DstNotPresent; /**< HC: The number of times we've encountered a not present shadow entry for a present guest entry. */ 2617 STAMCOUNTER StatHCSyncCR3DstSkippedGlobalPD; /**< HC: The number of times a global page directory wasn't flushed. */ 2618 STAMCOUNTER StatHCSyncCR3DstSkippedGlobalPT; /**< HC: The number of times a page table with only global entries wasn't flushed. */ 2619 STAMCOUNTER StatHCSyncCR3DstCacheHit; /**< HC: The number of times we got some kind of cache hit on a page table. */ 2620 2621 /** GC: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2622 STAMPROFILE StatVirtHandleSearchByPhysGC; 2623 /** HC: Profiling of pgmHandlerVirtualFindByPhysAddr. */ 2624 STAMPROFILE StatVirtHandleSearchByPhysHC; 2625 /** HC: The number of times PGMR3HandlerPhysicalReset is called. */ 2626 STAMCOUNTER StatHandlePhysicalReset; 2627 2628 STAMPROFILE StatCheckPageFault; 2629 STAMPROFILE StatLazySyncPT; 2630 STAMPROFILE StatMapping; 2631 STAMPROFILE StatOutOfSync; 2632 STAMPROFILE StatHandlers; 2633 STAMPROFILE StatEIPHandlers; 2634 STAMPROFILE StatHCPrefetch; 2635 2636 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING 2637 /** The number of first time shadowings. */ 2638 STAMCOUNTER StatTrackVirgin; 2639 /** The number of times switching to cRef2, i.e. the page is being shadowed by two PTs. */ 2640 STAMCOUNTER StatTrackAliased; 2641 /** The number of times we're tracking using cRef2. */ 2642 STAMCOUNTER StatTrackAliasedMany; 2643 /** The number of times we're hitting pages which has overflowed cRef2. */ 2644 STAMCOUNTER StatTrackAliasedLots; 2645 /** The number of times the extent list grows to long. */ 2646 STAMCOUNTER StatTrackOverflows; 2647 /** Profiling of SyncPageWorkerTrackDeref (expensive). */ 2648 STAMPROFILE StatTrackDeref; 2649 # endif 2650 2651 /** Ring-3/0 page mapper TLB hits. */ 2652 STAMCOUNTER StatPageHCMapTlbHits; 2653 /** Ring-3/0 page mapper TLB misses. */ 2654 STAMCOUNTER StatPageHCMapTlbMisses; 2655 /** Ring-3/0 chunk mapper TLB hits. */ 2656 STAMCOUNTER StatChunkR3MapTlbHits; 2657 /** Ring-3/0 chunk mapper TLB misses. */ 2658 STAMCOUNTER StatChunkR3MapTlbMisses; 2659 /** Times a shared page has been replaced by a private one. */ 2660 STAMCOUNTER StatPageReplaceShared; 2661 /** Times the zero page has been replaced by a private one. */ 2662 STAMCOUNTER StatPageReplaceZero; 2663 /** The number of times we've executed GMMR3AllocateHandyPages. */ 2664 STAMCOUNTER StatPageHandyAllocs; 2665 2666 /** Allocated mbs of guest ram */ 2667 STAMCOUNTER StatDynRamTotal; 2668 /** Nr of pgmr3PhysGrowRange calls. */ 2669 STAMCOUNTER StatDynRamGrow; 2670 2671 STAMCOUNTER StatGCTrap0ePD[X86_PG_ENTRIES]; 2672 STAMCOUNTER StatGCSyncPtPD[X86_PG_ENTRIES]; 2673 STAMCOUNTER StatGCSyncPagePD[X86_PG_ENTRIES]; 2674 #endif 2628 #endif /* VBOX_WITH_STATISTICS */ 2675 2629 } PGM, *PPGM; 2676 2630 -
trunk/src/VBox/VMM/PGMShw.h
r12975 r13067 115 115 #if PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */ 116 116 /* GC */ 117 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_SHW_NAME_ GC_STR(GetPage), &pModeData->pfnGCShwGetPage);118 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_ GC_STR(GetPage), rc), rc);119 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_SHW_NAME_ GC_STR(ModifyPage), &pModeData->pfnGCShwModifyPage);120 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_ GC_STR(ModifyPage), rc), rc);117 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_SHW_NAME_RC_STR(GetPage), &pModeData->pfnRCShwGetPage); 118 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_RC_STR(GetPage), rc), rc); 119 rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_SHW_NAME_RC_STR(ModifyPage), &pModeData->pfnRCShwModifyPage); 120 AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_RC_STR(ModifyPage), rc), rc); 121 121 #endif /* Not AMD64 shadow paging. */ 122 122 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r13060 r13067 337 337 #undef PGM_SHW_NAME 338 338 339 #endif 340 339 #endif /* !IN_GC */ 340 341 342 #ifndef IN_RING3 341 343 /** 342 344 * #PF Handler. … … 352 354 LogFlow(("PGMTrap0eHandler: uErr=%RGu pvFault=%VGv eip=%VGv\n", uErr, pvFault, pRegFrame->rip)); 353 355 STAM_PROFILE_START(&pVM->pgm.s.StatGCTrap0e, a); 354 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = NULL; } );356 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } ); 355 357 356 358 … … 401 403 if (rc == VINF_PGM_SYNCPAGE_MODIFIED_PDE) 402 404 rc = VINF_SUCCESS; 403 STAM_STATS({ if (!pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution))404 pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; });405 STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution), a);405 STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution)) 406 pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; }); 407 STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a); 406 408 return rc; 407 409 } 410 #endif /* !IN_RING3 */ 411 408 412 409 413 /** … … 446 450 break; 447 451 if ((uintptr_t)GCPtr - (uintptr_t)pMapping->GCPtr < pMapping->cb) 448 {449 STAM_COUNTER_INC(&pVM->pgm.s.StatGCSyncPTConflict);450 452 return pMapping; 451 }452 453 pMapping = pMapping->CTX_SUFF(pNext); 453 454 } … … 646 647 #endif 647 648 648 STAM_PROFILE_START(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);649 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePage), a); 649 650 rc = PGM_BTH_PFN(InvalidatePage, pVM)(pVM, GCPtrPage); 650 STAM_PROFILE_STOP(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);651 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePage), a); 651 652 652 653 #ifndef IN_RING0 … … 1541 1542 * Let the 'Bth' function do the work and we'll just keep track of the flags. 1542 1543 */ 1543 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncCR3), a);1544 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3), a); 1544 1545 int rc = PGM_BTH_PFN(SyncCR3, pVM)(pVM, cr0, cr3, cr4, fGlobal); 1545 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncCR3), a);1546 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3), a); 1546 1547 AssertMsg(rc == VINF_SUCCESS || rc == VINF_PGM_SYNC_CR3 || VBOX_FAILURE(rc), ("rc=%VRc\n", rc)); 1547 1548 if (rc == VINF_SUCCESS) … … 1972 1973 VMMDECL(unsigned) PGMAssertCR3(PVM pVM, uint64_t cr3, uint64_t cr4) 1973 1974 { 1974 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncCR3), a);1975 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3), a); 1975 1976 unsigned cErrors = PGM_BTH_PFN(AssertCR3, pVM)(pVM, cr3, cr4, 0, ~(RTGCUINTPTR)0); 1976 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncCR3), a);1977 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3), a); 1977 1978 return cErrors; 1978 1979 return 0; -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r13063 r13067 67 67 #endif 68 68 69 70 #ifndef IN_RING3 69 71 /** 70 72 * #PF Handler for raw-mode guest execution. … … 78 80 PGM_BTH_DECL(int, Trap0eHandler)(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault) 79 81 { 80 # if(PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64) \82 # if (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64) \ 81 83 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 82 84 && (PGM_SHW_TYPE != PGM_TYPE_EPT || PGM_GST_TYPE == PGM_TYPE_PROT) 83 85 84 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE != PGM_TYPE_PAE86 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE != PGM_TYPE_PAE 85 87 /* 86 88 * Hide the instruction fetch trap indicator for now. … … 92 94 TRPMSetErrorCode(pVM, uErr); 93 95 } 94 # endif96 # endif 95 97 96 98 /* … … 98 100 */ 99 101 int rc; 100 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)101 # if PGM_GST_TYPE == PGM_TYPE_32BIT102 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 103 # if PGM_GST_TYPE == PGM_TYPE_32BIT 102 104 const unsigned iPDSrc = (RTGCUINTPTR)pvFault >> GST_PD_SHIFT; 103 105 PGSTPD pPDSrc = CTXSUFF(pVM->pgm.s.pGuestPD); 104 106 105 # elif PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64106 107 # if PGM_GST_TYPE == PGM_TYPE_PAE107 # elif PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 108 109 # if PGM_GST_TYPE == PGM_TYPE_PAE 108 110 unsigned iPDSrc; 109 111 PGSTPD pPDSrc = pgmGstGetPaePDPtr(&pVM->pgm.s, (RTGCUINTPTR)pvFault, &iPDSrc); 110 112 111 # elif PGM_GST_TYPE == PGM_TYPE_AMD64113 # elif PGM_GST_TYPE == PGM_TYPE_AMD64 112 114 unsigned iPDSrc; 113 115 PX86PML4E pPml4eSrc; … … 117 119 pPDSrc = pgmGstGetLongModePDPtr(&pVM->pgm.s, pvFault, &pPml4eSrc, &PdpeSrc, &iPDSrc); 118 120 Assert(pPml4eSrc); 119 # endif121 # endif 120 122 /* Quick check for a valid guest trap. */ 121 123 if (!pPDSrc) 122 124 { 123 # if PGM_GST_TYPE == PGM_TYPE_AMD64 && GC_ARCH_BITS == 64125 # if PGM_GST_TYPE == PGM_TYPE_AMD64 && GC_ARCH_BITS == 64 124 126 LogFlow(("Trap0eHandler: guest PML4 %d not present CR3=%VGp\n", (int)(((RTGCUINTPTR)pvFault >> X86_PML4_SHIFT) & X86_PML4_MASK), CPUMGetGuestCR3(pVM) & X86_CR3_PAGE_MASK)); 125 # else127 # else 126 128 LogFlow(("Trap0eHandler: guest iPDSrc=%u not present CR3=%VGp\n", iPDSrc, CPUMGetGuestCR3(pVM) & X86_CR3_PAGE_MASK)); 127 # endif128 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eGuestTrap; });129 # endif 130 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eGuestTrap; }); 129 131 TRPMSetErrorCode(pVM, uErr); 130 132 return VINF_EM_RAW_GUEST_TRAP; 131 133 } 132 # endif133 # else134 # endif 135 # else 134 136 PGSTPD pPDSrc = NULL; 135 137 const unsigned iPDSrc = 0; 136 # endif137 138 # if PGM_SHW_TYPE == PGM_TYPE_32BIT138 # endif 139 140 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 139 141 const unsigned iPDDst = (RTGCUINTPTR)pvFault >> SHW_PD_SHIFT; 140 142 PX86PD pPDDst = pVM->pgm.s.CTXMID(p,32BitPD); 141 # elif PGM_SHW_TYPE == PGM_TYPE_PAE143 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 142 144 const unsigned iPDDst = (RTGCUINTPTR)pvFault >> SHW_PD_SHIFT; 143 145 PX86PDPAE pPDDst = pVM->pgm.s.CTXMID(ap,PaePDs)[0]; /* We treat this as a PD with 2048 entries, so no need to and with SHW_PD_MASK to get iPDDst */ 144 146 145 # if PGM_GST_TYPE == PGM_TYPE_PAE147 # if PGM_GST_TYPE == PGM_TYPE_PAE 146 148 /* Did we mark the PDPT as not present in SyncCR3? */ 147 149 unsigned iPdpte = ((RTGCUINTPTR)pvFault >> SHW_PDPT_SHIFT) & SHW_PDPT_MASK; … … 149 151 pVM->pgm.s.CTXMID(p,PaePDPT)->a[iPdpte].n.u1Present = 1; 150 152 151 # endif152 153 # elif PGM_SHW_TYPE == PGM_TYPE_AMD64153 # endif 154 155 # elif PGM_SHW_TYPE == PGM_TYPE_AMD64 154 156 const unsigned iPDDst = (((RTGCUINTPTR)pvFault >> SHW_PD_SHIFT) & SHW_PD_MASK); 155 157 PX86PDPAE pPDDst; 156 # if PGM_GST_TYPE == PGM_TYPE_PROT158 # if PGM_GST_TYPE == PGM_TYPE_PROT 157 159 /* AMD-V nested paging */ 158 160 X86PML4E Pml4eSrc; … … 163 165 Pml4eSrc.u = X86_PML4E_P | X86_PML4E_RW | X86_PML4E_US | X86_PML4E_A; 164 166 PdpeSrc.u = X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A; 165 # endif167 # endif 166 168 167 169 rc = PGMShwSyncLongModePDPtr(pVM, (RTGCUINTPTR)pvFault, pPml4eSrc, &PdpeSrc, &pPDDst); … … 172 174 } 173 175 Assert(pPDDst); 174 # elif PGM_SHW_TYPE == PGM_TYPE_EPT176 # elif PGM_SHW_TYPE == PGM_TYPE_EPT 175 177 const unsigned iPDDst = (((RTGCUINTPTR)pvFault >> SHW_PD_SHIFT) & SHW_PD_MASK); 176 178 PEPTPD pPDDst; … … 179 181 AssertReturn(rc == VINF_SUCCESS /* *must* test for VINF_SUCCESS!! */, rc); 180 182 Assert(pPDDst); 181 # endif182 183 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)183 # endif 184 185 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 184 186 /* 185 187 * If we successfully correct the write protection fault due to dirty bit … … 192 194 || rc == VINF_EM_RAW_GUEST_TRAP) 193 195 { 194 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution)196 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) 195 197 = rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? &pVM->pgm.s.StatTrap0eDirtyAndAccessedBits : &pVM->pgm.s.StatTrap0eGuestTrap; }); 196 198 LogBird(("Trap0eHandler: returns %s\n", rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT ? "VINF_SUCCESS" : "VINF_EM_RAW_GUEST_TRAP")); … … 199 201 200 202 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0ePD[iPDSrc]); 201 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */203 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 202 204 203 205 /* … … 212 214 * 213 215 */ 214 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)216 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 215 217 GSTPDE PdeSrc = pPDSrc->a[iPDSrc]; 216 # else218 # else 217 219 GSTPDE PdeSrc; 218 220 PdeSrc.au32[0] = 0; /* faked so we don't have to #ifdef everything */ … … 221 223 PdeSrc.n.u1Accessed = 1; 222 224 PdeSrc.n.u1User = 1; 223 # endif225 # endif 224 226 if ( !(uErr & X86_TRAP_PF_P) /* not set means page not present instead of page protection violation */ 225 227 && !pPDDst->a[iPDDst].n.u1Present … … 228 230 229 231 { 230 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eSyncPT; });232 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eSyncPT; }); 231 233 STAM_PROFILE_START(&pVM->pgm.s.StatLazySyncPT, f); 232 234 LogFlow(("=>SyncPT %04x = %08x\n", iPDSrc, PdeSrc.au32[0])); … … 243 245 } 244 246 245 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)247 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 246 248 /* 247 249 * Check if this address is within any of our mappings. … … 286 288 && uErr & X86_TRAP_PF_RW) 287 289 { 288 # ifdef IN_GC290 # ifdef IN_GC 289 291 STAM_PROFILE_START(&pCur->Stat, h); 290 292 rc = pCur->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, (RTGCUINTPTR)pvFault - (RTGCUINTPTR)pCur->Core.Key); 291 293 STAM_PROFILE_STOP(&pCur->Stat, h); 292 # else294 # else 293 295 AssertFailed(); 294 296 rc = VINF_EM_RAW_EMULATE_INSTR; /* can't happen with VMX */ 295 # endif297 # endif 296 298 STAM_COUNTER_INC(&pVM->pgm.s.StatTrap0eMapHandler); 297 299 STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a); … … 311 313 STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a); 312 314 } /* pgmAreMappingsEnabled(&pVM->pgm.s) */ 313 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */315 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 314 316 315 317 /* … … 325 327 RTGCPHYS GCPhys = NIL_RTGCPHYS; 326 328 327 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)328 # if PGM_GST_TYPE == PGM_TYPE_AMD64329 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 330 # if PGM_GST_TYPE == PGM_TYPE_AMD64 329 331 bool fBigPagesSupported = true; 330 # else332 # else 331 333 bool fBigPagesSupported = !!(CPUMGetGuestCR4(pVM) & X86_CR4_PSE); 332 # endif334 # endif 333 335 if ( PdeSrc.b.u1Size 334 336 && fBigPagesSupported) … … 346 348 } 347 349 } 348 # else350 # else 349 351 /* No paging so the fault address is the physical address */ 350 352 GCPhys = (RTGCPHYS)((RTGCUINTPTR)pvFault & ~PAGE_OFFSET_MASK); 351 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */353 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 352 354 353 355 /* … … 373 375 if (pCur) 374 376 { 375 # ifdef PGM_SYNC_N_PAGES377 # ifdef PGM_SYNC_N_PAGES 376 378 /* 377 379 * If the region is write protected and we got a page not present fault, then sync … … 392 394 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync); 393 395 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 394 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; });396 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; }); 395 397 return rc; 396 398 } 397 399 } 398 # endif400 # endif 399 401 400 402 AssertMsg( pCur->enmType != PGMPHYSHANDLERTYPE_PHYSICAL_WRITE … … 402 404 ("Unexpected trap for physical handler: %08X (phys=%08x) HCPhys=%X uErr=%X, enum=%d\n", pvFault, GCPhys, pPage->HCPhys, uErr, pCur->enmType)); 403 405 404 # if defined(IN_GC) || defined(IN_RING0)406 # if defined(IN_GC) || defined(IN_RING0) 405 407 if (pCur->CTX_SUFF(pfnHandler)) 406 408 { … … 410 412 } 411 413 else 412 # endif414 # endif 413 415 rc = VINF_EM_RAW_EMULATE_INSTR; 414 416 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersPhysical); 415 417 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 416 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndPhys; });418 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndPhys; }); 417 419 return rc; 418 420 } 419 421 } 420 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)422 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 421 423 else 422 424 { 423 # ifdef PGM_SYNC_N_PAGES425 # ifdef PGM_SYNC_N_PAGES 424 426 /* 425 427 * If the region is write protected and we got a page not present fault, then sync … … 438 440 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync); 439 441 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 440 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndVirt; });442 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndVirt; }); 441 443 return rc; 442 444 } 443 445 } 444 # endif446 # endif 445 447 /* 446 448 * Ok, it's an virtual page access handler. … … 466 468 || pCur->enmType != PGMVIRTHANDLERTYPE_WRITE ) ) 467 469 { 468 # ifdef IN_GC470 # ifdef IN_GC 469 471 STAM_PROFILE_START(&pCur->Stat, h); 470 472 rc = pCur->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, (RTGCUINTPTR)pvFault - (RTGCUINTPTR)pCur->Core.Key); 471 473 STAM_PROFILE_STOP(&pCur->Stat, h); 472 # else474 # else 473 475 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 474 # endif476 # endif 475 477 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtual); 476 478 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 477 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });479 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; }); 478 480 return rc; 479 481 } … … 493 495 { 494 496 Assert((pCur->aPhysToVirt[iPage].Core.Key & X86_PTE_PAE_PG_MASK) == GCPhys); 495 # ifdef IN_GC497 # ifdef IN_GC 496 498 RTGCUINTPTR off = (iPage << PAGE_SHIFT) + ((RTGCUINTPTR)pvFault & PAGE_OFFSET_MASK) - ((RTGCUINTPTR)pCur->Core.Key & PAGE_OFFSET_MASK); 497 499 Assert(off < pCur->cb); … … 499 501 rc = pCur->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, off); 500 502 STAM_PROFILE_STOP(&pCur->Stat, h); 501 # else503 # else 502 504 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 503 # endif505 # endif 504 506 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtualByPhys); 505 507 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 506 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });508 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; }); 507 509 return rc; 508 510 } 509 511 } 510 512 } 511 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */513 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 512 514 513 515 /* … … 532 534 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersOutOfSync); 533 535 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 534 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; });536 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncHndPhys; }); 535 537 return rc; 536 538 } … … 546 548 PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(pPage) ? " virt" : "")); 547 549 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 548 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndUnhandled; });550 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndUnhandled; }); 549 551 return rc; 550 552 } /* if any kind of handler */ 551 553 552 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)554 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 553 555 if (uErr & X86_TRAP_PF_P) 554 556 { … … 573 575 || pCur->enmType != PGMVIRTHANDLERTYPE_WRITE ) ) 574 576 { 575 # ifdef IN_GC577 # ifdef IN_GC 576 578 STAM_PROFILE_START(&pCur->Stat, h); 577 579 rc = pCur->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, (RTGCUINTPTR)pvFault - (RTGCUINTPTR)pCur->Core.Key); 578 580 STAM_PROFILE_STOP(&pCur->Stat, h); 579 # else581 # else 580 582 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo for VMX */ 581 # endif583 # endif 582 584 STAM_COUNTER_INC(&pVM->pgm.s.StatHandlersVirtualUnmarked); 583 585 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 584 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; });586 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eHndVirt; }); 585 587 return rc; 586 588 } 587 589 } 588 590 } 589 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */591 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 590 592 } 591 593 else … … 602 604 STAM_PROFILE_STOP(&pVM->pgm.s.StatHandlers, b); 603 605 604 # ifdef PGM_OUT_OF_SYNC_IN_GC606 # ifdef PGM_OUT_OF_SYNC_IN_GC 605 607 /* 606 608 * We are here only if page is present in Guest page tables and trap is not handled … … 622 624 STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor); 623 625 624 # if defined(LOG_ENABLED) && !defined(IN_RING0)626 # if defined(LOG_ENABLED) && !defined(IN_RING0) 625 627 RTGCPHYS GCPhys; 626 628 uint64_t fPageGst; … … 628 630 Log(("Page out of sync: %VGv eip=%08x PdeSrc.n.u1User=%d fPageGst=%08llx GCPhys=%VGp scan=%d\n", 629 631 pvFault, pRegFrame->eip, PdeSrc.n.u1User, fPageGst, GCPhys, CSAMDoesPageNeedScanning(pVM, (RTRCPTR)pRegFrame->eip))); 630 # endif /* LOG_ENABLED */631 632 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0)632 # endif /* LOG_ENABLED */ 633 634 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0) 633 635 if (CPUMGetGuestCPL(pVM, pRegFrame) == 0) 634 636 { … … 641 643 if ( pvFault == (RTGCPTR)pRegFrame->eip 642 644 || (RTGCUINTPTR)pvFault - pRegFrame->eip < 8 /* instruction crossing a page boundary */ 643 # ifdef CSAM_DETECT_NEW_CODE_PAGES645 # ifdef CSAM_DETECT_NEW_CODE_PAGES 644 646 || ( !PATMIsPatchGCAddr(pVM, (RTGCPTR)pRegFrame->eip) 645 647 && CSAMDoesPageNeedScanning(pVM, (RTRCPTR)pRegFrame->eip)) /* any new code we encounter here */ 646 # endif /* CSAM_DETECT_NEW_CODE_PAGES */648 # endif /* CSAM_DETECT_NEW_CODE_PAGES */ 647 649 ) 648 650 { … … 662 664 663 665 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c); 664 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eCSAM; });666 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eCSAM; }); 665 667 return rc; 666 668 } 667 669 } 668 # ifdef CSAM_DETECT_NEW_CODE_PAGES670 # ifdef CSAM_DETECT_NEW_CODE_PAGES 669 671 else 670 672 if ( uErr == X86_TRAP_PF_RW … … 697 699 } 698 700 } 699 # endif /* CSAM_DETECT_NEW_CODE_PAGES */701 # endif /* CSAM_DETECT_NEW_CODE_PAGES */ 700 702 701 703 /* … … 707 709 } 708 710 } 709 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0) */711 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0) */ 710 712 rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, (RTGCUINTPTR)pvFault, PGM_SYNC_NR_PAGES, uErr); 711 713 if (VBOX_SUCCESS(rc)) … … 713 715 /* The page was successfully synced, return to the guest. */ 714 716 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c); 715 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSync; });717 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSync; }); 716 718 return VINF_SUCCESS; 717 719 } … … 741 743 * Page was successfully synced, return to guest. 742 744 */ 743 # ifdef VBOX_STRICT745 # ifdef VBOX_STRICT 744 746 RTGCPHYS GCPhys; 745 747 uint64_t fPageGst; … … 751 753 rc = PGMShwGetPage(pVM, pvFault, &fPageShw, NULL); 752 754 AssertMsg(VBOX_SUCCESS(rc) && fPageShw & X86_PTE_RW, ("rc=%Vrc fPageShw=%VX64\n", rc, fPageShw)); 753 # endif /* VBOX_STRICT */755 # endif /* VBOX_STRICT */ 754 756 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c); 755 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncObsHnd; });757 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eOutOfSyncObsHnd; }); 756 758 return VINF_SUCCESS; 757 759 } … … 780 782 } 781 783 782 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)783 # ifdef VBOX_STRICT784 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 785 # ifdef VBOX_STRICT 784 786 /* 785 787 * Check for VMM page flags vs. Guest page flags consistency. … … 808 810 else 809 811 AssertMsgFailed(("PGMGCGetPage rc=%Vrc\n", rc)); 810 # endif /* VBOX_STRICT */811 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */812 # endif /* VBOX_STRICT */ 813 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 812 814 } 813 815 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c); 814 # endif /* PGM_OUT_OF_SYNC_IN_GC */816 # endif /* PGM_OUT_OF_SYNC_IN_GC */ 815 817 } 816 818 else … … 834 836 835 837 836 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)838 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 837 839 /* 838 840 * Conclusion, this is a guest trap. … … 841 843 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0eUnhandled); 842 844 return VINF_EM_RAW_GUEST_TRAP; 843 # else845 # else 844 846 /* present, but not a monitored page; perhaps the guest is probing physical memory */ 845 847 return VINF_EM_RAW_EMULATE_INSTR; 846 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */847 848 849 # else /* PGM_GST_TYPE != PGM_TYPE_32BIT */848 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 849 850 851 # else /* PGM_GST_TYPE != PGM_TYPE_32BIT */ 850 852 851 853 AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE)); 852 854 return VERR_INTERNAL_ERROR; 853 # endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */855 # endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */ 854 856 } 857 #endif /* !IN_RING3 */ 855 858 856 859 … … 896 899 { 897 900 Assert(!(pPdptDst->a[iPdpte].u & PGM_PLXFLAGS_MAPPING)); 898 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePageSkipped));901 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePageSkipped)); 899 902 return VINF_SUCCESS; 900 903 } … … 914 917 { 915 918 AssertMsg(rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT || rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT, ("Unexpected rc=%Vrc\n", rc)); 916 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePageSkipped));919 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePageSkipped)); 917 920 if (!VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3)) 918 921 PGM_INVL_GUEST_TLBS(); … … 926 929 if (!pPdpeDst->n.u1Present) 927 930 { 928 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePageSkipped));931 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePageSkipped)); 929 932 if (!VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3)) 930 933 PGM_INVL_GUEST_TLBS(); … … 937 940 if (!PdeDst.n.u1Present) 938 941 { 939 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePageSkipped));942 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePageSkipped)); 940 943 return VINF_SUCCESS; 941 944 } … … 989 992 # endif 990 993 { 991 STAM_COUNTER_INC(&pVM->pgm.s. StatHCInvalidatePageSkipped);994 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePageSkipped)); 992 995 return VINF_SUCCESS; 993 996 } … … 1015 1018 pgmPoolFreeByPage(pPool, pShwPdpt, pVM->pgm.s.pHCShwAmd64CR3->idx, iPml4e); 1016 1019 pPml4eDst->u = 0; 1017 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNPs));1020 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNPs)); 1018 1021 PGM_INVL_GUEST_TLBS(); 1019 1022 return VINF_SUCCESS; … … 1029 1032 pgmPoolFreeByPage(pPool, pShwPdpt, pVM->pgm.s.pHCShwAmd64CR3->idx, iPml4e); 1030 1033 pPml4eDst->u = 0; 1031 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDOutOfSync));1034 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDOutOfSync)); 1032 1035 PGM_INVL_GUEST_TLBS(); 1033 1036 } … … 1041 1044 pgmPoolFreeByPage(pPool, pShwPdpt, pVM->pgm.s.pHCShwAmd64CR3->idx, iPml4e); 1042 1045 pPml4eDst->u = 0; 1043 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNAs));1046 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNAs)); 1044 1047 PGM_INVL_GUEST_TLBS(); 1045 1048 } … … 1055 1058 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdpte); 1056 1059 pPdpeDst->u = 0; 1057 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNPs));1060 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNPs)); 1058 1061 PGM_INVL_GUEST_TLBS(); 1059 1062 return VINF_SUCCESS; … … 1069 1072 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdpte); 1070 1073 pPdpeDst->u = 0; 1071 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDOutOfSync));1074 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDOutOfSync)); 1072 1075 PGM_INVL_GUEST_TLBS(); 1073 1076 } … … 1081 1084 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdpte); 1082 1085 pPdpeDst->u = 0; 1083 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNAs));1086 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNAs)); 1084 1087 PGM_INVL_GUEST_TLBS(); 1085 1088 } … … 1144 1147 # endif 1145 1148 pPdeDst->u = 0; 1146 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDOutOfSync));1149 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDOutOfSync)); 1147 1150 PGM_INVL_GUEST_TLBS(); 1148 1151 } … … 1160 1163 # endif 1161 1164 pPdeDst->u = 0; 1162 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNAs));1165 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNAs)); 1163 1166 PGM_INVL_GUEST_TLBS(); 1164 1167 } … … 1192 1195 rc = VINF_SUCCESS; 1193 1196 # endif 1194 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePage4KBPages));1197 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePage4KBPages)); 1195 1198 PGM_INVL_PG(GCPtrPage); 1196 1199 } … … 1208 1211 # endif 1209 1212 pPdeDst->u = 0; 1210 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDOutOfSync));1213 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDOutOfSync)); 1211 1214 PGM_INVL_GUEST_TLBS(); 1212 1215 } … … 1235 1238 { 1236 1239 LogFlow(("Skipping flush for big page containing %VGv (PD=%X .u=%VX64)-> nothing has changed!\n", GCPtrPage, iPDSrc, PdeSrc.u)); 1237 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePage4MBPagesSkip));1240 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePage4MBPagesSkip)); 1238 1241 return VINF_SUCCESS; 1239 1242 } … … 1254 1257 # endif 1255 1258 pPdeDst->u = 0; 1256 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePage4MBPages));1259 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePage4MBPages)); 1257 1260 PGM_INVL_BIG_PG(GCPtrPage); 1258 1261 } … … 1271 1274 # endif 1272 1275 pPdeDst->u = 0; 1273 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDNPs));1276 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDNPs)); 1274 1277 PGM_INVL_PG(GCPtrPage); 1275 1278 } … … 1277 1280 { 1278 1281 Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s)); 1279 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,InvalidatePagePDMappings));1282 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,InvalidatePagePDMappings)); 1280 1283 } 1281 1284 } … … 1449 1452 { 1450 1453 LogFlow(("SyncPageWorker: page and or page directory not accessed -> mark not present\n")); 1451 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,AccessedPage));1454 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,AccessedPage)); 1452 1455 PteDst.u = 0; 1453 1456 } … … 1459 1462 if (!PteSrc.n.u1Dirty && (PdeSrc.n.u1Write & PteSrc.n.u1Write)) 1460 1463 { 1461 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPage));1464 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPage)); 1462 1465 PteDst.u = (PteSrc.u & ~(X86_PTE_PAE_PG_MASK | X86_PTE_AVL_MASK | X86_PTE_PAT | X86_PTE_PCD | X86_PTE_PWT | X86_PTE_RW)) 1463 1466 | (HCPhys & X86_PTE_PAE_PG_MASK) … … 1467 1470 #endif 1468 1471 { 1469 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageSkipped));1472 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageSkipped)); 1470 1473 #if PGM_SHW_TYPE == PGM_TYPE_EPT 1471 1474 PteDst.u = (HCPhys & EPT_PTE_PG_MASK); … … 1775 1778 if (!PdeSrc.b.u1Dirty && PdeSrc.b.u1Write) 1776 1779 { 1777 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageBig));1780 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageBig)); 1778 1781 PdeDst.u |= PGM_PDFLAGS_TRACK_DIRTY; 1779 1782 PdeDst.n.u1Write = 0; … … 1800 1803 return VINF_SUCCESS; 1801 1804 } 1802 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncPagePDNAs));1805 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPagePDNAs)); 1803 1806 } 1804 1807 else 1805 1808 { 1806 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncPagePDOutOfSync));1809 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPagePDOutOfSync)); 1807 1810 Log2(("SyncPage: Out-Of-Sync PDE at %VGp PdeSrc=%RX64 PdeDst=%RX64\n", 1808 1811 GCPtrPage, (uint64_t)PdeSrc.u, (uint64_t)PdeDst.u)); … … 1978 1981 int rc; 1979 1982 1980 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);1983 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 1981 1984 LogFlow(("CheckPageFault: GCPtrPage=%VGv uErr=%#x PdeSrc=%08x\n", GCPtrPage, uErr, pPdeSrc->u)); 1982 1985 … … 2065 2068 if (pPdeDst->n.u1Present && (pPdeDst->u & PGM_PDFLAGS_TRACK_DIRTY)) 2066 2069 { 2067 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageTrap));2070 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageTrap)); 2068 2071 2069 2072 Assert(pPdeSrc->b.u1Write); … … 2073 2076 pPdeDst->au32[0] &= ~PGM_PDFLAGS_TRACK_DIRTY; 2074 2077 PGM_INVL_BIG_PG(GCPtrPage); 2075 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2078 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2076 2079 return VINF_PGM_HANDLED_DIRTY_BIT_FAULT; 2077 2080 } 2078 2081 } 2079 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2082 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2080 2083 return VINF_PGM_NO_DIRTY_BIT_TRACKING; 2081 2084 } … … 2102 2105 ) 2103 2106 { 2104 # ifdef IN_GC 2105 STAM_COUNTER_INC(&pVM->pgm.s.StatGCDirtyTrackRealPF); 2106 # endif 2107 STAM_PROFILE_STOP(&pVM->pgm.s.CTXMID(Stat,DirtyBitTracking), a); 2107 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyTrackRealPF)); 2108 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2108 2109 LogFlow(("CheckPageFault: real page fault at %VGv PteSrc.u=%08x (2)\n", GCPtrPage, PteSrc.u)); 2109 2110 … … 2114 2115 TRPMSetErrorCode(pVM, uErr | X86_TRAP_PF_P); /* page-level protection violation */ 2115 2116 2116 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2117 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2117 2118 return VINF_EM_RAW_GUEST_TRAP; 2118 2119 } … … 2135 2136 { 2136 2137 /* Write access, so mark guest entry as dirty. */ 2137 # if defined(IN_GC) && defined(VBOX_WITH_STATISTICS)2138 # ifdef VBOX_WITH_STATISTICS 2138 2139 if (!pPteSrc->n.u1Dirty) 2139 STAM_COUNTER_INC(&pVM->pgm.s. StatGCDirtiedPage);2140 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtiedPage)); 2140 2141 else 2141 STAM_COUNTER_INC(&pVM->pgm.s. StatGCPageAlreadyDirty);2142 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,PageAlreadyDirty)); 2142 2143 # endif 2143 2144 … … 2153 2154 { 2154 2155 LogRel(("CheckPageFault: write to hypervisor region %VGv\n", GCPtrPage)); 2155 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2156 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2156 2157 return VINF_SUCCESS; 2157 2158 } … … 2175 2176 ("Unexpected dirty bit tracking on monitored page %VGv (phys %VGp)!!!!!!\n", GCPtrPage, pPteSrc->u & X86_PTE_PAE_PG_MASK)); 2176 2177 # endif 2177 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageTrap));2178 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageTrap)); 2178 2179 2179 2180 Assert(pPteSrc->n.u1Write); … … 2185 2186 PGM_INVL_PG(GCPtrPage); 2186 2187 2187 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2188 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2188 2189 return VINF_PGM_HANDLED_DIRTY_BIT_FAULT; 2189 2190 } … … 2210 2211 } 2211 2212 # endif /* VBOX_STRICT */ 2212 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2213 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2213 2214 return VINF_PGM_NO_DIRTY_BIT_TRACKING; 2214 2215 } 2215 2216 AssertRC(rc); 2216 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,DirtyBitTracking), a);2217 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2217 2218 return rc; 2218 2219 … … 2222 2223 * Single exit handler to get rid of duplicate code paths. 2223 2224 */ 2224 # ifdef IN_GC 2225 STAM_COUNTER_INC(&pVM->pgm.s.StatGCDirtyTrackRealPF); 2226 # endif 2227 STAM_PROFILE_STOP(&pVM->pgm.s.CTXMID(Stat, DirtyBitTracking), a); 2225 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyTrackRealPF)); 2226 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyBitTracking), a); 2228 2227 Log(("CheckPageFault: real page fault at %VGv (%d)\n", GCPtrPage, uPageFaultLevel)); 2229 2228 … … 2280 2279 PGM_BTH_DECL(int, SyncPT)(PVM pVM, unsigned iPDSrc, PGSTPD pPDSrc, RTGCUINTPTR GCPtrPage) 2281 2280 { 2282 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncPT), a);2281 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2283 2282 STAM_COUNTER_INC(&pVM->pgm.s.StatGCSyncPtPD[iPDSrc]); 2284 2283 LogFlow(("SyncPT: GCPtrPage=%VGv\n", GCPtrPage)); … … 2334 2333 # ifndef IN_RING3 2335 2334 Log(("SyncPT: Conflict at %VGv\n", GCPtrPage)); 2336 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncPT), a);2335 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2337 2336 return VERR_ADDRESS_CONFLICT; 2338 2337 # else … … 2348 2347 if (VBOX_FAILURE(rc)) 2349 2348 { 2350 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncPT), a);2349 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2351 2350 return rc; 2352 2351 } … … 2419 2418 if (!PdeSrc.b.u1Dirty && PdeSrc.b.u1Write) 2420 2419 { 2421 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageBig));2420 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageBig)); 2422 2421 PdeDst.u |= PGM_PDFLAGS_TRACK_DIRTY; 2423 2422 PdeDst.b.u1Write = 0; … … 2558 2557 if (!PdeSrc.b.u1Dirty && PdeSrc.b.u1Write) 2559 2558 { 2560 STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,DirtyPageBig));2559 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,DirtyPageBig)); 2561 2560 PdeDst.u |= PGM_PDFLAGS_TRACK_DIRTY; 2562 2561 PdeDst.b.u1Write = 0; … … 2669 2668 AssertRelease(!PdeDst.n.u1Present); 2670 2669 2671 STAM_PROFILE_STOP(&pVM->pgm.s.CTXMID(Stat,SyncPT), a); 2672 # ifdef IN_GC 2670 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2673 2671 if (VBOX_FAILURE(rc)) 2674 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,SyncPTFailed)); 2675 # endif 2672 STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPTFailed)); 2676 2673 return rc; 2677 2674 … … 2762 2759 2763 2760 rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, (RTGCUINTPTR)GCPtrPage, PGM_SYNC_NR_PAGES, 0 /* page not present */); 2764 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncPT), a);2761 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2765 2762 return rc; 2766 2763 2767 2764 #else 2768 2765 AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE)); 2769 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncPT), a);2766 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncPT), a); 2770 2767 return VERR_INTERNAL_ERROR; 2771 2768 #endif … … 3100 3097 */ 3101 3098 /** @todo this MUST go away. See #1557. */ 3102 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncCR3Handlers), h);3099 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3Handlers), h); 3103 3100 PGM_GST_NAME(HandlerVirtualUpdate)(pVM, cr4); 3104 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncCR3Handlers), h);3101 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3Handlers), h); 3105 3102 #endif 3106 3103 … … 3122 3119 3123 3120 Assert(fGlobal || (cr4 & X86_CR4_PGE)); 3124 MY_STAM_COUNTER_INC(fGlobal ? &pVM->pgm.s.CTX MID(Stat,SyncCR3Global) : &pVM->pgm.s.CTXMID(Stat,SyncCR3NotGlobal));3121 MY_STAM_COUNTER_INC(fGlobal ? &pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3Global) : &pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3NotGlobal)); 3125 3122 3126 3123 # if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 … … 3423 3420 && (cr4 & (X86_CR4_PGE | X86_CR4_PSE)) == (X86_CR4_PGE | X86_CR4_PSE)) 3424 3421 # endif 3425 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstSkippedGlobalPD));3422 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstSkippedGlobalPD)); 3426 3423 else if (!fGlobal && !pShwPage->fSeenNonGlobal && (cr4 & X86_CR4_PGE)) 3427 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstSkippedGlobalPT));3424 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstSkippedGlobalPT)); 3428 3425 else 3429 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstCacheHit));3426 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstCacheHit)); 3430 3427 # endif /* VBOX_WITH_STATISTICS */ 3431 3428 /** @todo a replacement strategy isn't really needed unless we're using a very small pool < 512 pages. … … 3443 3440 # endif 3444 3441 pPDEDst->u = 0; 3445 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstFreed));3442 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstFreed)); 3446 3443 } 3447 3444 } 3448 3445 else 3449 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstNotPresent));3446 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstNotPresent)); 3450 3447 pPDEDst++; 3451 3448 } … … 3476 3473 # endif 3477 3474 pPDEDst->u = 0; 3478 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX MID(Stat,SyncCR3DstFreedSrcNP));3475 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstFreedSrcNP)); 3479 3476 } 3480 3477 pPDEDst++; -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r13062 r13067 611 611 pVM->pgm.s.pfnR3GstWriteHandlerCR3, 0, 612 612 pVM->pgm.s.pfnR0GstWriteHandlerCR3, 0, 613 pVM->pgm.s.pfn GCGstWriteHandlerCR3, 0,613 pVM->pgm.s.pfnRCGstWriteHandlerCR3, 0, 614 614 pVM->pgm.s.pszR3GstWriteHandlerCR3); 615 615 # else /* PGMPOOL_WITH_MIXED_PT_CR3 */ … … 936 936 937 937 pgmLock(pVM); 938 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncCR3HandlerVirtualUpdate), a);938 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3HandlerVirtualUpdate), a); 939 939 State.pVM = pVM; 940 940 State.fTodo = pVM->pgm.s.fSyncFlags; 941 941 State.cr4 = cr4; 942 942 RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, PGM_GST_NAME(VirtHandlerUpdateOne), &State); 943 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncCR3HandlerVirtualUpdate), a);943 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3HandlerVirtualUpdate), a); 944 944 945 945 … … 949 949 if (State.fTodo & PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL) 950 950 { 951 STAM_PROFILE_START(&pVM->pgm.s.CTX MID(Stat,SyncCR3HandlerVirtualReset), b);951 STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3HandlerVirtualReset), b); 952 952 Log(("pgmR3VirtualHandlersUpdate: resets bits\n")); 953 953 RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualResetOne, pVM); 954 954 pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL; 955 STAM_PROFILE_STOP(&pVM->pgm.s.CTX MID(Stat,SyncCR3HandlerVirtualReset), b);955 STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3HandlerVirtualReset), b); 956 956 } 957 957 pgmUnlock(pVM); -
trunk/src/VBox/VMM/VMMGC/PGMGC.cpp
r13060 r13067 177 177 LogFlow(("PGMGCInvalidatePage: GCPtrPage=%VGv\n", GCPtrPage)); 178 178 179 STAM_PROFILE_START(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);179 STAM_PROFILE_START(&pVM->pgm.s.StatGCInvalidatePage, a); 180 180 181 181 /* … … 189 189 LogFlow(("PGMGCInvalidatePage: Conflict!\n")); 190 190 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 191 STAM_PROFILE_STOP(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);191 STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a); 192 192 return VINF_PGM_SYNC_CR3; 193 193 } … … 196 196 { 197 197 LogFlow(("PGMGCInvalidatePage: PGM_SYNC_MONITOR_CR3 -> reinterpret instruction in HC\n")); 198 STAM_PROFILE_STOP(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);198 STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a); 199 199 /** @todo counter for these... */ 200 200 return VINF_EM_RAW_EMULATE_INSTR; … … 210 210 rc = PGM_BTH_PFN(InvalidatePage, pVM)(pVM, GCPtrPage); 211 211 212 STAM_PROFILE_STOP(& CTXMID(pVM->pgm.s.Stat,InvalidatePage), a);212 STAM_PROFILE_STOP(&pVM->pgm.s.StatGCInvalidatePage, a); 213 213 return rc; 214 214 } -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r13038 r13067 84 84 LogFlow(("PGMTrap0eHandler: uErr=%#x pvFault=%VGp eip=%VGv\n", uErr, pvFault, pRegFrame->rip)); 85 85 STAM_PROFILE_START(&pVM->pgm.s.StatGCTrap0e, a); 86 STAM_STATS({ pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = NULL; } );86 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = NULL; } ); 87 87 88 88 /* AMD uses the host's paging mode; Intel has a single mode (EPT). */ … … 158 158 if (rc == VINF_PGM_SYNCPAGE_MODIFIED_PDE) 159 159 rc = VINF_SUCCESS; 160 STAM_STATS({ if (!pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution))161 pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; });162 STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX SUFF(pStatTrap0eAttribution), a);160 STAM_STATS({ if (!pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution)) 161 pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatTrap0eMisc; }); 162 STAM_PROFILE_STOP_EX(&pVM->pgm.s.StatGCTrap0e, pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution), a); 163 163 return rc; 164 164 } -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r13062 r13067 419 419 GEN_CHECK_OFF(PGM, pfnR3ShwGetPage); 420 420 GEN_CHECK_OFF(PGM, pfnR3ShwModifyPage); 421 GEN_CHECK_OFF(PGM, pfn GCShwGetPage);422 GEN_CHECK_OFF(PGM, pfn GCShwModifyPage);421 GEN_CHECK_OFF(PGM, pfnRCShwGetPage); 422 GEN_CHECK_OFF(PGM, pfnRCShwModifyPage); 423 423 GEN_CHECK_OFF(PGM, pfnR3GstRelocate); 424 424 GEN_CHECK_OFF(PGM, pfnR3GstExit); … … 430 430 GEN_CHECK_OFF(PGM, pfnR3GstModifyPage); 431 431 GEN_CHECK_OFF(PGM, pfnR3GstGetPDE); 432 GEN_CHECK_OFF(PGM, pfn GCGstGetPage);433 GEN_CHECK_OFF(PGM, pfn GCGstModifyPage);434 GEN_CHECK_OFF(PGM, pfn GCGstGetPDE);432 GEN_CHECK_OFF(PGM, pfnRCGstGetPage); 433 GEN_CHECK_OFF(PGM, pfnRCGstModifyPage); 434 GEN_CHECK_OFF(PGM, pfnRCGstGetPDE); 435 435 GEN_CHECK_OFF(PGM, pfnR3BthRelocate); 436 436 GEN_CHECK_OFF(PGM, pfnR3BthSyncCR3); 437 GEN_CHECK_OFF(PGM, pfnR3BthTrap0eHandler);438 437 GEN_CHECK_OFF(PGM, pfnR3BthInvalidatePage); 439 438 GEN_CHECK_OFF(PGM, pfnR3BthSyncPage); … … 441 440 GEN_CHECK_OFF(PGM, pfnR3BthVerifyAccessSyncPage); 442 441 GEN_CHECK_OFF(PGM, pfnR3BthAssertCR3); 443 GEN_CHECK_OFF(PGM, pfn GCBthTrap0eHandler);444 GEN_CHECK_OFF(PGM, pfn GCBthInvalidatePage);445 GEN_CHECK_OFF(PGM, pfn GCBthSyncPage);446 GEN_CHECK_OFF(PGM, pfn GCBthPrefetchPage);447 GEN_CHECK_OFF(PGM, pfn GCBthVerifyAccessSyncPage);448 GEN_CHECK_OFF(PGM, pfn GCBthAssertCR3);442 GEN_CHECK_OFF(PGM, pfnRCBthTrap0eHandler); 443 GEN_CHECK_OFF(PGM, pfnRCBthInvalidatePage); 444 GEN_CHECK_OFF(PGM, pfnRCBthSyncPage); 445 GEN_CHECK_OFF(PGM, pfnRCBthPrefetchPage); 446 GEN_CHECK_OFF(PGM, pfnRCBthVerifyAccessSyncPage); 447 GEN_CHECK_OFF(PGM, pfnRCBthAssertCR3); 449 448 GEN_CHECK_OFF(PGM, pRamRangesR3); 450 449 GEN_CHECK_OFF(PGM, pRamRangesR0); … … 517 516 GEN_CHECK_OFF(PGM, cGuestModeChanges); 518 517 #ifdef VBOX_WITH_STATISTICS 519 GEN_CHECK_OFF(PGM, pStatTrap0eAttributionHC); 518 GEN_CHECK_OFF(PGM, pStatTrap0eAttributionR0); 519 GEN_CHECK_OFF(PGM, pStatTrap0eAttributionRC); 520 520 #endif 521 521
Note:
See TracChangeset
for help on using the changeset viewer.