1*c619a804SShuo Liu.. SPDX-License-Identifier: GPL-2.0 2*c619a804SShuo Liu 3*c619a804SShuo Liu=============== 4*c619a804SShuo LiuACRN CPUID bits 5*c619a804SShuo Liu=============== 6*c619a804SShuo Liu 7*c619a804SShuo LiuA guest VM running on an ACRN hypervisor can check some of its features using 8*c619a804SShuo LiuCPUID. 9*c619a804SShuo Liu 10*c619a804SShuo LiuACRN cpuid functions are: 11*c619a804SShuo Liu 12*c619a804SShuo Liufunction: 0x40000000 13*c619a804SShuo Liu 14*c619a804SShuo Liureturns:: 15*c619a804SShuo Liu 16*c619a804SShuo Liu eax = 0x40000010 17*c619a804SShuo Liu ebx = 0x4e524341 18*c619a804SShuo Liu ecx = 0x4e524341 19*c619a804SShuo Liu edx = 0x4e524341 20*c619a804SShuo Liu 21*c619a804SShuo LiuNote that this value in ebx, ecx and edx corresponds to the string 22*c619a804SShuo Liu"ACRNACRNACRN". The value in eax corresponds to the maximum cpuid function 23*c619a804SShuo Liupresent in this leaf, and will be updated if more functions are added in the 24*c619a804SShuo Liufuture. 25*c619a804SShuo Liu 26*c619a804SShuo Liufunction: define ACRN_CPUID_FEATURES (0x40000001) 27*c619a804SShuo Liu 28*c619a804SShuo Liureturns:: 29*c619a804SShuo Liu 30*c619a804SShuo Liu ebx, ecx, edx 31*c619a804SShuo Liu eax = an OR'ed group of (1 << flag) 32*c619a804SShuo Liu 33*c619a804SShuo Liuwhere ``flag`` is defined as below: 34*c619a804SShuo Liu 35*c619a804SShuo Liu================================= =========== ================================ 36*c619a804SShuo Liuflag value meaning 37*c619a804SShuo Liu================================= =========== ================================ 38*c619a804SShuo LiuACRN_FEATURE_PRIVILEGED_VM 0 guest VM is a privileged VM 39*c619a804SShuo Liu================================= =========== ================================ 40*c619a804SShuo Liu 41*c619a804SShuo Liufunction: 0x40000010 42*c619a804SShuo Liu 43*c619a804SShuo Liureturns:: 44*c619a804SShuo Liu 45*c619a804SShuo Liu ebx, ecx, edx 46*c619a804SShuo Liu eax = (Virtual) TSC frequency in kHz. 47