如何使用VMX挂起和恢复VM

时间:2018-05-05 10:53:48

标签: linux x86 virtualization

我在Linux中使用VMX制作了一个玩具管理程序,它可以很好地与我的测试VM配合使用。现在我正在尝试使用我的玩具管理程序测试挂起并恢复我的测试VM。我做了以下操作来暂停虚拟机。

VM以实模式启动,然后进入保护模式。它调用一个wrmsr,它将导致VMEXIT。管理程序获取VMEXIT,然后将CPU上下文(gprs,段regs,描述符表等)和VM的内存保存到磁盘文件中,然后退出。 (VMXON / VMCS区域未清除)。

现在,重新启动VM加载程序,它将读取磁盘文件,将CPU上下文保存到VMCS字段中,并填充VM的内存。然后通过调用' vmlaunch'告诉管理程序启动VM。 (在此之前,管理程序将调用vmxon,vmclear,vmptrld和vmwrite VMCS字段和来宾CPU上下文)。我的期望是VM将从之前保存的RIP恢复。
但是由于“无效的客人状态”而失败了#39;

下面是WRMSR VMEXIT上的VMCS转储。

[ 9021.315014]  # VPID = 0x0
[ 9021.315016]    # vmread(0x2) failed
[ 9021.315017]    # RFLAGS: 0x242
[ 9021.315018]  # POSTED_INTERRUPT_NOTIFICATION_VECTOR   INVALID_VALUE
[ 9021.315021]  # EPTP_INDEX = 0x0
[ 9021.315022]  # GUEST_ES_SEL = 0x10
[ 9021.315023]  # GUEST_CS_SEL = 0x8
[ 9021.315024]  # GUEST_SS_SEL = 0x10
[ 9021.315025]  # GUEST_DS_SEL = 0x10
[ 9021.315026]  # GUEST_FS_SEL = 0x0
[ 9021.315027]  # GUEST_GS_SEL = 0x0
[ 9021.315028]  # GUEST_LDTR_SEL = 0x0
[ 9021.315029]  # GUEST_TR_SEL = 0x0
[ 9021.315030]  # GUEST_INTERRUPT_STATUS = 0x0
[ 9021.315032]  # HOST_ES_SEL = 0x0
[ 9021.315034]  # HOST_CS_SEL = 0x10
[ 9021.315036]  # HOST_SS_SEL = 0x18
[ 9021.315038]  # HOST_DS_SEL = 0x0
[ 9021.315040]  # HOST_FS_SEL = 0x0
[ 9021.315042]  # HOST_GS_SEL = 0x0
[ 9021.315044]  # HOST_TR_SEL = 0x40
[ 9021.315047]  # IO_BITMAP_A_FULL = 0x0
[ 9021.315049]  # IO_BITMAP_A_HIGH = 0x0
[ 9021.315051]  # IO_BITMAP_B_FULL = 0x0
[ 9021.315053]  # IO_BITMAP_B_HIGH = 0x0
[ 9021.315055]  # MSR_BITMAP_FULL = 0x0
[ 9021.315057]  # MSR_BITMAP_HIGH = 0x0
[ 9021.315060]  # EXIT_MSR_STORE_ADDR_FULL = 0x0
[ 9021.315062]  # EXIT_MSR_STORE_ADDR_HIGH = 0x0
[ 9021.315064]  # EXIT_MSR_LOAD_ADDR_FULL = 0x7bbbc000
[ 9021.315066]  # EXIT_MSR_LOAD_ADDR_HIGH = 0x0
[ 9021.315068]  # ENTRY_MSR_LOAD_ADDR_FULL = 0x0
[ 9021.315071]  # ENTRY_MSR_LOAD_ADDR_HIGH = 0x0
[ 9021.315073]  # EXECUTIVE_VMCS_PTR_FULL = 0x0
[ 9021.315075]  # EXECUTIVE_VMCS_PTR_HIGH = 0x0
[ 9021.315077]  # TSC_OFFSET_FULL = 0xffffeb76bf0129ef
[ 9021.315079]  # TSC_OFFSET_HIGH = 0xffffeb76
[ 9021.315082]  # VIRTUAL_APIC_PAGE_ADDR_FULL = 0x0
[ 9021.315084]  # VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x0
[ 9021.315086]    # vmread(0x2014) failed
[ 9021.315087]    # RFLAGS: 0x242
[ 9021.315088]  # APIC_ACCESS_ADDR_FULL          INVALID_VALUE
[ 9021.315090]    # vmread(0x2015) failed
[ 9021.315091]    # RFLAGS: 0x242
[ 9021.315092]  # APIC_ACCESS_ADDR_HIGH          INVALID_VALUE
[ 9021.315094]    # vmread(0x2016) failed
[ 9021.315094]    # RFLAGS: 0x242
[ 9021.315096]  # POSTED_INTERRUPT_DESCRIPTION_ADDR_FULL         INVALID_VALUE
[ 9021.315098]    # vmread(0x2017) failed
[ 9021.315098]    # RFLAGS: 0x242
[ 9021.315099]  # POSTED_INTERRUPT_DESCRIPTION_ADDR_HIGH         INVALID_VALUE
[ 9021.315102]  # VM_FUNCTION_CTRL_FULL = 0x0
[ 9021.315104]  # VM_FUNCTION_CTRL_HIGH = 0x0
[ 9021.315106]  # EPT_POINTER_FULL = 0xb0932058
[ 9021.315108]  # EPT_POINTER_HIGH = 0x0
[ 9021.315110]    # vmread(0x201C) failed
[ 9021.315111]    # RFLAGS: 0x242
[ 9021.315112]  # EOI_EXIT_BITMAP_0_FULL         INVALID_VALUE
[ 9021.315114]    # vmread(0x201D) failed
[ 9021.315115]    # RFLAGS: 0x242
[ 9021.315116]  # EOI_EXIT_BITMAP_0_HIGH         INVALID_VALUE
[ 9021.315118]    # vmread(0x201E) failed
[ 9021.315119]    # RFLAGS: 0x242
[ 9021.315120]  # EOI_EXIT_BITMAP_1_FULL         INVALID_VALUE
[ 9021.315122]    # vmread(0x201F) failed
[ 9021.315123]    # RFLAGS: 0x242
[ 9021.315124]  # EOI_EXIT_BITMAP_1_HIGH         INVALID_VALUE
[ 9021.315126]    # vmread(0x2020) failed
[ 9021.315126]    # RFLAGS: 0x242
[ 9021.315127]  # EOI_EXIT_BITMAP_2_FULL         INVALID_VALUE
[ 9021.315129]    # vmread(0x2021) failed
[ 9021.315130]    # RFLAGS: 0x242
[ 9021.315131]  # EOI_EXIT_BITMAP_2_HIGH         INVALID_VALUE
[ 9021.315133]    # vmread(0x2022) failed
[ 9021.315134]    # RFLAGS: 0x242
[ 9021.315135]  # EOI_EXIT_BITMAP_3_FULL         INVALID_VALUE
[ 9021.315137]    # vmread(0x2023) failed
[ 9021.315138]    # RFLAGS: 0x242
[ 9021.315139]  # EOI_EXIT_BITMAP_3_HIGH         INVALID_VALUE
[ 9021.315141]  # EPTP_LIST_ADDRESS_FULL = 0x0
[ 9021.315143]  # EPTP_LIST_ADDRESS_HIGH = 0x0
[ 9021.315145]    # vmread(0x2026) failed
[ 9021.315146]    # RFLAGS: 0x242
[ 9021.315147]  # VMREAD_BITMAP_ADDRESS_FULL     INVALID_VALUE
[ 9021.315149]    # vmread(0x2027) failed
[ 9021.315150]    # RFLAGS: 0x242
[ 9021.315151]  # VMREAD_BITMAP_ADDRESS_HIGH     INVALID_VALUE
[ 9021.315153]    # vmread(0x2028) failed
[ 9021.315153]    # RFLAGS: 0x242
[ 9021.315154]  # VMWRITE_BITMAP_ADDRESS_FULL    INVALID_VALUE
[ 9021.315156]    # vmread(0x2029) failed
[ 9021.315157]    # RFLAGS: 0x242
[ 9021.315158]  # VMWRITE_BITMAP_ADDRESS_HIGH    INVALID_VALUE
[ 9021.315160]  # VE_INFO_ADDRESS_FULL = 0x0
[ 9021.315162]  # VE_INFO_ADDRESS_HIGH = 0x0
[ 9021.315164]  # GUEST_PHYSICAL_ADDR_FULL = 0x7c60
[ 9021.315165]  # GUEST_PHYSICAL_ADDR_HIGH = 0x0
[ 9021.315167]  # VMCS_LINK_PTR_FULL = 0xffffffffffffffff
[ 9021.315169]  # VMCS_LINK_PTR_HIGH = 0xffffffff
[ 9021.315171]  # GUEST_IA32_DEBUGCTL_FULL = 0x0
[ 9021.315174]  # GUEST_IA32_DEBUGCTL_HIGH = 0x0
[ 9021.315176]  # GUEST_IA32_PAT_FULL = 0x0
[ 9021.315179]  # GUEST_IA32_PAT_HIGH = 0x0
[ 9021.315185]  # GUEST_IA32_EFER_FULL = 0x0
[ 9021.315189]  # GUEST_IA32_EFER_HIGH = 0x0
[ 9021.315192]  # GUEST_IA32_PERF_CTL_FULL = 0x0
[ 9021.315195]  # GUEST_IA32_PERF_CTL_HIGH = 0x0
[ 9021.315197]  # GUEST_PDPTE0_FULL = 0x0
[ 9021.315198]  # GUEST_PDPTE0_HIGH = 0x0
[ 9021.315200]  # GUEST_PDPTE1_FULL = 0x0
[ 9021.315201]  # GUEST_PDPTE1_HIGH = 0x0
[ 9021.315203]  # GUEST_PDPTE2_FULL = 0x0
[ 9021.315204]  # GUEST_PDPTE2_HIGH = 0x0
[ 9021.315205]  # GUEST_PDPTE3_FULL = 0x0
[ 9021.315206]  # GUEST_PDPTE3_HIGH = 0x0
[ 9021.315209]  # HOST_IA32_PAT_FULL = 0x0
[ 9021.315212]  # HOST_IA32_PAT_HIGH = 0x0
[ 9021.315216]  # HOST_IA32_EFER_FULL = 0x0
[ 9021.315219]  # HOST_IA32_EFER_HIGH = 0x0
[ 9021.315222]  # HOST_IA32_PERF_CTL_FULL = 0x0
[ 9021.315226]  # HOST_IA32_PERF_CTL_HIGH = 0x0
[ 9021.315229]  # PIN_VM_EXEC_CONTROLS = 0x1f
[ 9021.315231]  # PROC_VM_EXEC_CONTROLS = 0xa501e9fa
[ 9021.315234]  # EXCEPTION_BITMAP = 0xfffffffe
[ 9021.315268]  # PAGEFAULT_ERRCODE_MASK = 0x0
[ 9021.315273]  # PAGEFAULT_ERRCODE_MATCH = 0xffffffff
[ 9021.315276]  # CR3_TARGET_COUNT = 0x0
[ 9021.315282]  # EXIT_CONTROLS = 0x36ffb
[ 9021.315285]  # EXIT_MSR_STORE_COUNT = 0x0
[ 9021.315289]  # EXIT_MSR_LOAD_COUNT = 0x5
[ 9021.315292]  # ENTRY_CONTROLS = 0x11fb
[ 9021.315295]  # ENTRY_MSR_LOAD_COUNT = 0x0
[ 9021.315298]  # ENTRY_INT_INFO_FIELD = 0x0
[ 9021.315301]  # ENTRY_EXCEPTION_EC = 0x0
[ 9021.315304]  # ENTRY_INSTR_LENGTH = 0x0
[ 9021.315307]  # TPR_THRESHOLD = 0x0
[ 9021.315310]  # PROC_VM_EXEC_CONTROLS2 = 0x82
[ 9021.315313]  # PLE_GAP = 0x0
[ 9021.315339]  # PLE_WINDOW = 0x0
[ 9021.315360]  # INSTR_ERROR = 0xc
[ 9021.315363]  # EXIT_REASON = 0x20
[ 9021.315364]  # EXIT_INTERRUPT_INFO = 0x0
[ 9021.315365]  # EXIT_INTERRUPT_ERRCODE = 0x0
[ 9021.315367]  # IDT_VECTORING_INFO_FIELD = 0x0
[ 9021.315389]  # IDT_VECTORING_ERRCODE = 0x0
[ 9021.315391]  # EXIT_INSTR_LEN = 0x2
[ 9021.315392]  # INSTR_INFO = 0x0
[ 9021.315394]  # GUEST_ES_LIMIT = 0xffffffff
[ 9021.315395]  # GUEST_CS_LIMIT = 0xffffffff
[ 9021.315396]  # GUEST_SS_LIMIT = 0xffffffff
[ 9021.315398]  # GUEST_DS_LIMIT = 0xffffffff
[ 9021.315399]  # GUEST_FS_LIMIT = 0xffffffff
[ 9021.315401]  # GUEST_GS_LIMIT = 0xffffffff
[ 9021.315402]  # GUEST_LDTR_LIMIT = 0xffff
[ 9021.315404]  # GUEST_TR_LIMIT = 0xffff
[ 9021.315406]  # GUEST_GDTR_LIMIT = 0x17
[ 9021.315407]  # GUEST_IDTR_LIMIT = 0xffff
[ 9021.315409]  # GUEST_ES_ATTR = 0xc093
[ 9021.315410]  # GUEST_CS_ATTR = 0xc09b
[ 9021.315412]  # GUEST_SS_ATTR = 0xc093
[ 9021.315413]  # GUEST_DS_ATTR = 0xc093
[ 9021.315415]  # GUEST_FS_ATTR = 0x1c000
[ 9021.315416]  # GUEST_GS_ATTR = 0x1c000
[ 9021.315417]  # GUEST_LDTR_ATTR = 0x82
[ 9021.315418]  # GUEST_TR_ATTR = 0x8b
[ 9021.315419]  # GUEST_INTERRUPTIBILITY_INFO = 0x0
[ 9021.315422]  # GUEST_ACTIVITY_STATE = 0x0
[ 9021.315424]  # GUEST_SMBASE = 0x0
[ 9021.315425]  # GUEST_IA32_SYSENTER_CS = 0x0
[ 9021.315427]    # vmread(0x482E) failed
[ 9021.315428]    # RFLAGS: 0x242
[ 9021.315429]  # GUEST_PREEMTION_TIMER          INVALID_VALUE
[ 9021.315432]  # HOST_IA32_SYSENTER_CS = 0x10
[ 9021.315434]  # CR0_MASK = 0xfffffffffffffff0
[ 9021.315436]  # CR4_MASK = 0xfffffffffffff871
[ 9021.315438]  # CR0_READ_SHADOW = 0x60000010
[ 9021.315441]  # CR4_READ_SHADOW = 0x10
[ 9021.315443]  # CR3_TARGET_0 = 0x0
[ 9021.315445]  # CR3_TARGET_1 = 0x83068000
[ 9021.315447]  # CR3_TARGET_2 = 0x0
[ 9021.315449]  # CR3_TARGET_3 = 0x0
[ 9021.315450]  # EXIT_QUALIFICATION = 0x0
[ 9021.315451]  # IO_RCX = 0x189f
[ 9021.315452]  # IO_RSI = 0x10
[ 9021.315453]  # IO_RDI = 0xffff97040f139bff
[ 9021.315454]  # IO_RIP = 0x7c1b
[ 9021.315455]  # GUEST_LINEAR_ADDR = 0x7c60
[ 9021.315457]  # GUEST_CR0 = 0x31
[ 9021.315458]  # GUEST_CR3 = 0x0
[ 9021.315459]  # GUEST_CR4 = 0x2050
[ 9021.315460]  # GUEST_ES_BASE = 0x0
[ 9021.315461]  # GUEST_CS_BASE = 0x0
[ 9021.315462]  # GUEST_SS_BASE = 0x0
[ 9021.315463]  # GUEST_DS_BASE = 0x0
[ 9021.315464]  # GUEST_FS_BASE = 0x0
[ 9021.315465]  # GUEST_GS_BASE = 0x0
[ 9021.315466]  # GUEST_LDTR_BASE = 0x0
[ 9021.315467]  # GUEST_TR_BASE = 0x0
[ 9021.315468]  # GUEST_GDTR_BASE = 0x7c58
[ 9021.315469]  # GUEST_IDTR_BASE = 0x0
[ 9021.315472]  # GUEST_DR7 = 0x400
[ 9021.315473]  # GUEST_RSP = 0x7bfa
[ 9021.315474]  # GUEST_RIP = 0x7c43
[ 9021.315475]  # GUEST_RFLAGS = 0x6
[ 9021.315476]  # GUEST_PENDING_DEBUG_EXCEPT = 0x0
[ 9021.315477]  # GUEST_IA32_SYSENTER_ESP = 0x0
[ 9021.315478]  # GUEST_IA32_SYSENTER_EIP = 0x0
[ 9021.315480]  # HOST_CR0 = 0x80050033
[ 9021.315482]  # HOST_CR3 = 0x83068000
[ 9021.315484]  # HOST_CR4 = 0x362670
[ 9021.315486]  # HOST_FS_BASE = 0x7f4acf98e700
[ 9021.315489]  # HOST_GS_BASE = 0xffff8800ba640000
[ 9021.315491]  # HOST_TR_BASE = 0xffff8800ba6448c0
[ 9021.315493]  # HOST_GDTR_BASE = 0xffff8800ba64c000
[ 9021.315495]  # HOST_IDTR_BASE = 0xffffffffff574000
[ 9021.315498]  # HOST_IA32_SYSENTER_ESP = 0x0
[ 9021.315500]  # HOST_IA32_SYSENTER_EIP = 0xffffffff81852720
[ 9021.315502]  # HOST_RSP = 0xffff88008279fde0
[ 9021.315504]  # HOST_RIP = 0xffffffffc05b85d5
[ 9021.315507]  # (null) = 0x0

和,      VMX访客状态

 CR0=0000000000000031  CR3=0000000000000000  CR4=0000000000002050

 RSP=0000000000007BFA  SYSENTER_ESP=0000000000000000
 RIP=0000000000007C45  SYSENTER_EIP=0000000000000000
 DR7=0000000000000400  SYSENTER_CS=00000000  RFLAGS=0000000000000006

   ES=0010  [ base=0000000000000000 limit=FFFFFFFF rights=0000C093 ]
   CS=0008  [ base=0000000000000000 limit=FFFFFFFF rights=0000C09B ]
   SS=0010  [ base=0000000000000000 limit=FFFFFFFF rights=0000C093 ]
   DS=0010  [ base=0000000000000000 limit=FFFFFFFF rights=0000C093 ]
   FS=0000  [ base=0000000000000000 limit=FFFFFFFF rights=0001C000 ]
   GS=0000  [ base=0000000000000000 limit=FFFFFFFF rights=0001C000 ]
 LDTR=0000  [ base=0000000000000000 limit=0000FFFF rights=00000082 ]
   TR=0000  [ base=0000000000000000 limit=0000FFFF rights=0000008B ]
      GDTR  [ base=0000000000007C58 limit=00000017 ]
      IDTR  [ base=0000000000000000 limit=0000FFFF ]

 EAX=60000000  ECX=00000000  ESI=00000000  ESP=00007BFA   extints=0
 EBX=00000000  EDX=00000000  EDI=00000000  EBP=00000000   nmiints=0

以下是恢复VM并点击“无效访客状态”时的VMCS转储。

[ 9148.130353]  # VPID = 0x0
[ 9148.130356]    # vmread(0x2) failed
[ 9148.130357]    # RFLAGS: 0x242
[ 9148.130358]  # POSTED_INTERRUPT_NOTIFICATION_VECTOR   INVALID_VALUE
[ 9148.130360]  # EPTP_INDEX = 0x0
[ 9148.130361]  # GUEST_ES_SEL = 0x10
[ 9148.130362]  # GUEST_CS_SEL = 0x8
[ 9148.130363]  # GUEST_SS_SEL = 0x10
[ 9148.130364]  # GUEST_DS_SEL = 0x10
[ 9148.130365]  # GUEST_FS_SEL = 0x0
[ 9148.130366]  # GUEST_GS_SEL = 0x0
[ 9148.130367]  # GUEST_LDTR_SEL = 0x0
[ 9148.130368]  # GUEST_TR_SEL = 0x0
[ 9148.130369]  # GUEST_INTERRUPT_STATUS = 0x0
[ 9148.130371]  # HOST_ES_SEL = 0x0
[ 9148.130373]  # HOST_CS_SEL = 0x10
[ 9148.130375]  # HOST_SS_SEL = 0x18
[ 9148.130377]  # HOST_DS_SEL = 0x0
[ 9148.130379]  # HOST_FS_SEL = 0x0
[ 9148.130381]  # HOST_GS_SEL = 0x0
[ 9148.130383]  # HOST_TR_SEL = 0x40
[ 9148.130385]  # IO_BITMAP_A_FULL = 0x0
[ 9148.130388]  # IO_BITMAP_A_HIGH = 0x0
[ 9148.130390]  # IO_BITMAP_B_FULL = 0x0
[ 9148.130392]  # IO_BITMAP_B_HIGH = 0x0
[ 9148.130394]  # MSR_BITMAP_FULL = 0x0
[ 9148.130396]  # MSR_BITMAP_HIGH = 0x0
[ 9148.130398]  # EXIT_MSR_STORE_ADDR_FULL = 0x0
[ 9148.130400]  # EXIT_MSR_STORE_ADDR_HIGH = 0x0
[ 9148.130403]  # EXIT_MSR_LOAD_ADDR_FULL = 0x7bbbc000
[ 9148.130405]  # EXIT_MSR_LOAD_ADDR_HIGH = 0x0
[ 9148.130407]  # ENTRY_MSR_LOAD_ADDR_FULL = 0x0
[ 9148.130409]  # ENTRY_MSR_LOAD_ADDR_HIGH = 0x0
[ 9148.130411]  # EXECUTIVE_VMCS_PTR_FULL = 0x0
[ 9148.130414]  # EXECUTIVE_VMCS_PTR_HIGH = 0x0
[ 9148.130416]  # TSC_OFFSET_FULL = 0xffffeb2ce65fe8da
[ 9148.130418]  # TSC_OFFSET_HIGH = 0xffffeb2c
[ 9148.130420]  # VIRTUAL_APIC_PAGE_ADDR_FULL = 0x0
[ 9148.130422]  # VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x0
[ 9148.130424]    # vmread(0x2014) failed
[ 9148.130425]    # RFLAGS: 0x242
[ 9148.130426]  # APIC_ACCESS_ADDR_FULL          INVALID_VALUE
[ 9148.130428]    # vmread(0x2015) failed
[ 9148.130429]    # RFLAGS: 0x242
[ 9148.130430]  # APIC_ACCESS_ADDR_HIGH          INVALID_VALUE
[ 9148.130432]    # vmread(0x2016) failed
[ 9148.130433]    # RFLAGS: 0x242
[ 9148.130434]  # POSTED_INTERRUPT_DESCRIPTION_ADDR_FULL         INVALID_VALUE
[ 9148.130436]    # vmread(0x2017) failed
[ 9148.130437]    # RFLAGS: 0x242
[ 9148.130438]  # POSTED_INTERRUPT_DESCRIPTION_ADDR_HIGH         INVALID_VALUE
[ 9148.130440]  # VM_FUNCTION_CTRL_FULL = 0x0
[ 9148.130442]  # VM_FUNCTION_CTRL_HIGH = 0x0
[ 9148.130444]  # EPT_POINTER_FULL = 0xafea5058
[ 9148.130446]  # EPT_POINTER_HIGH = 0x0
[ 9148.130448]    # vmread(0x201C) failed
[ 9148.130449]    # RFLAGS: 0x242
[ 9148.130450]  # EOI_EXIT_BITMAP_0_FULL         INVALID_VALUE
[ 9148.130452]    # vmread(0x201D) failed
[ 9148.130453]    # RFLAGS: 0x242
[ 9148.130454]  # EOI_EXIT_BITMAP_0_HIGH         INVALID_VALUE
[ 9148.130456]    # vmread(0x201E) failed
[ 9148.130457]    # RFLAGS: 0x242
[ 9148.130458]  # EOI_EXIT_BITMAP_1_FULL         INVALID_VALUE
[ 9148.130460]    # vmread(0x201F) failed
[ 9148.130461]    # RFLAGS: 0x242
[ 9148.130462]  # EOI_EXIT_BITMAP_1_HIGH         INVALID_VALUE
[ 9148.130464]    # vmread(0x2020) failed
[ 9148.130464]    # RFLAGS: 0x242
[ 9148.130465]  # EOI_EXIT_BITMAP_2_FULL         INVALID_VALUE
[ 9148.130467]    # vmread(0x2021) failed
[ 9148.130468]    # RFLAGS: 0x242
[ 9148.130469]  # EOI_EXIT_BITMAP_2_HIGH         INVALID_VALUE
[ 9148.130471]    # vmread(0x2022) failed
[ 9148.130472]    # RFLAGS: 0x242
[ 9148.130473]  # EOI_EXIT_BITMAP_3_FULL         INVALID_VALUE
[ 9148.130475]    # vmread(0x2023) failed
[ 9148.130476]    # RFLAGS: 0x242
[ 9148.130477]  # EOI_EXIT_BITMAP_3_HIGH         INVALID_VALUE
[ 9148.130479]  # EPTP_LIST_ADDRESS_FULL = 0x0
[ 9148.130481]  # EPTP_LIST_ADDRESS_HIGH = 0x0
[ 9148.130483]    # vmread(0x2026) failed
[ 9148.130484]    # RFLAGS: 0x242
[ 9148.130485]  # VMREAD_BITMAP_ADDRESS_FULL     INVALID_VALUE
[ 9148.130487]    # vmread(0x2027) failed
[ 9148.130488]    # RFLAGS: 0x242
[ 9148.130488]  # VMREAD_BITMAP_ADDRESS_HIGH     INVALID_VALUE
[ 9148.130490]    # vmread(0x2028) failed
[ 9148.130491]    # RFLAGS: 0x242
[ 9148.130492]  # VMWRITE_BITMAP_ADDRESS_FULL    INVALID_VALUE
[ 9148.130494]    # vmread(0x2029) failed
[ 9148.130495]    # RFLAGS: 0x242
[ 9148.130496]  # VMWRITE_BITMAP_ADDRESS_HIGH    INVALID_VALUE
[ 9148.130498]  # VE_INFO_ADDRESS_FULL = 0x0
[ 9148.130500]  # VE_INFO_ADDRESS_HIGH = 0x0
[ 9148.130501]  # GUEST_PHYSICAL_ADDR_FULL = 0x0
[ 9148.130503]  # GUEST_PHYSICAL_ADDR_HIGH = 0x0
[ 9148.130505]  # VMCS_LINK_PTR_FULL = 0xffffffffffffffff
[ 9148.130507]  # VMCS_LINK_PTR_HIGH = 0xffffffff
[ 9148.130509]  # GUEST_IA32_DEBUGCTL_FULL = 0x0
[ 9148.130511]  # GUEST_IA32_DEBUGCTL_HIGH = 0x0
[ 9148.130513]  # GUEST_IA32_PAT_FULL = 0x0
[ 9148.130516]  # GUEST_IA32_PAT_HIGH = 0x0
[ 9148.130518]  # GUEST_IA32_EFER_FULL = 0x0
[ 9148.130520]  # GUEST_IA32_EFER_HIGH = 0x0
[ 9148.130522]  # GUEST_IA32_PERF_CTL_FULL = 0x0
[ 9148.130524]  # GUEST_IA32_PERF_CTL_HIGH = 0x0
[ 9148.130525]  # GUEST_PDPTE0_FULL = 0x0
[ 9148.130526]  # GUEST_PDPTE0_HIGH = 0x0
[ 9148.130527]  # GUEST_PDPTE1_FULL = 0x0
[ 9148.130528]  # GUEST_PDPTE1_HIGH = 0x0
[ 9148.130529]  # GUEST_PDPTE2_FULL = 0x0
[ 9148.130530]  # GUEST_PDPTE2_HIGH = 0x0
[ 9148.130531]  # GUEST_PDPTE3_FULL = 0x0
[ 9148.130532]  # GUEST_PDPTE3_HIGH = 0x0
[ 9148.130534]  # HOST_IA32_PAT_FULL = 0x0
[ 9148.130536]  # HOST_IA32_PAT_HIGH = 0x0
[ 9148.130538]  # HOST_IA32_EFER_FULL = 0x0
[ 9148.130541]  # HOST_IA32_EFER_HIGH = 0x0
[ 9148.130543]  # HOST_IA32_PERF_CTL_FULL = 0x0
[ 9148.130545]  # HOST_IA32_PERF_CTL_HIGH = 0x0
[ 9148.130547]  # PIN_VM_EXEC_CONTROLS = 0x1f
[ 9148.130549]  # PROC_VM_EXEC_CONTROLS = 0xa501e9fa
[ 9148.130552]  # EXCEPTION_BITMAP = 0xfffffffe
[ 9148.130554]  # PAGEFAULT_ERRCODE_MASK = 0x0
[ 9148.130556]  # PAGEFAULT_ERRCODE_MATCH = 0xffffffff
[ 9148.130558]  # CR3_TARGET_COUNT = 0x0
[ 9148.130560]  # EXIT_CONTROLS = 0x36ffb
[ 9148.130562]  # EXIT_MSR_STORE_COUNT = 0x0
[ 9148.130564]  # EXIT_MSR_LOAD_COUNT = 0x5
[ 9148.130567]  # ENTRY_CONTROLS = 0x11fb
[ 9148.130569]  # ENTRY_MSR_LOAD_COUNT = 0x0
[ 9148.130571]  # ENTRY_INT_INFO_FIELD = 0x0
[ 9148.130573]  # ENTRY_EXCEPTION_EC = 0x0
[ 9148.130575]  # ENTRY_INSTR_LENGTH = 0x0
[ 9148.130577]  # TPR_THRESHOLD = 0x0
[ 9148.130579]  # PROC_VM_EXEC_CONTROLS2 = 0x82
[ 9148.130581]  # PLE_GAP = 0x0
[ 9148.130583]  # PLE_WINDOW = 0x0
[ 9148.130586]  # INSTR_ERROR = 0xc
[ 9148.130587]  # EXIT_REASON = 0x80000021
[ 9148.130588]  # EXIT_INTERRUPT_INFO = 0x0
[ 9148.130589]  # EXIT_INTERRUPT_ERRCODE = 0x0
[ 9148.130590]  # IDT_VECTORING_INFO_FIELD = 0x0
[ 9148.130591]  # IDT_VECTORING_ERRCODE = 0x0
[ 9148.130592]  # EXIT_INSTR_LEN = 0x0
[ 9148.130593]  # INSTR_INFO = 0x0
[ 9148.130594]  # GUEST_ES_LIMIT = 0xffffffff
[ 9148.130595]  # GUEST_CS_LIMIT = 0xffffffff
[ 9148.130596]  # GUEST_SS_LIMIT = 0xffffffff
[ 9148.130597]  # GUEST_DS_LIMIT = 0xffffffff
[ 9148.130598]  # GUEST_FS_LIMIT = 0xffffffff
[ 9148.130599]  # GUEST_GS_LIMIT = 0xffffffff
[ 9148.130600]  # GUEST_LDTR_LIMIT = 0xffff
[ 9148.130601]  # GUEST_TR_LIMIT = 0xffff
[ 9148.130602]  # GUEST_GDTR_LIMIT = 0x17
[ 9148.130603]  # GUEST_IDTR_LIMIT = 0xffff
[ 9148.130604]  # GUEST_ES_ATTR = 0xc093
[ 9148.130605]  # GUEST_CS_ATTR = 0xc09b
[ 9148.130606]  # GUEST_SS_ATTR = 0xc093
[ 9148.130607]  # GUEST_DS_ATTR = 0xc093
[ 9148.130608]  # GUEST_FS_ATTR = 0xc000
[ 9148.130609]  # GUEST_GS_ATTR = 0xc000
[ 9148.130610]  # GUEST_LDTR_ATTR = 0x82
[ 9148.130611]  # GUEST_TR_ATTR = 0x8b
[ 9148.130612]  # GUEST_INTERRUPTIBILITY_INFO = 0x0
[ 9148.130614]  # GUEST_ACTIVITY_STATE = 0x0
[ 9148.130616]  # GUEST_SMBASE = 0x0
[ 9148.130617]  # GUEST_IA32_SYSENTER_CS = 0x0
[ 9148.130619]    # vmread(0x482E) failed
[ 9148.130620]    # RFLAGS: 0x242
[ 9148.130621]  # GUEST_PREEMTION_TIMER          INVALID_VALUE
[ 9148.130623]  # HOST_IA32_SYSENTER_CS = 0x10
[ 9148.130625]  # CR0_MASK = 0xfffffffffffffff0
[ 9148.130628]  # CR4_MASK = 0xfffffffffffff871
[ 9148.130630]  # CR0_READ_SHADOW = 0x60000010
[ 9148.130632]  # CR4_READ_SHADOW = 0x10
[ 9148.130634]  # CR3_TARGET_0 = 0x0
[ 9148.130636]  # CR3_TARGET_1 = 0x7cf7c000
[ 9148.130638]  # CR3_TARGET_2 = 0x0
[ 9148.130640]  # CR3_TARGET_3 = 0x0
[ 9148.130641]  # EXIT_QUALIFICATION = 0x0
[ 9148.130642]  # IO_RCX = 0x0
[ 9148.130643]  # IO_RSI = 0x0
[ 9148.130644]  # IO_RDI = 0x0
[ 9148.130645]  # IO_RIP = 0x0
[ 9148.130646]  # GUEST_LINEAR_ADDR = 0x0
[ 9148.130648]  # GUEST_CR0 = 0x31
[ 9148.130649]  # GUEST_CR3 = 0x0
[ 9148.130650]  # GUEST_CR4 = 0x2050
[ 9148.130651]  # GUEST_ES_BASE = 0x0
[ 9148.130652]  # GUEST_CS_BASE = 0x0
[ 9148.130653]  # GUEST_SS_BASE = 0x0
[ 9148.130654]  # GUEST_DS_BASE = 0x0
[ 9148.130655]  # GUEST_FS_BASE = 0x0
[ 9148.130656]  # GUEST_GS_BASE = 0x0
[ 9148.130657]  # GUEST_LDTR_BASE = 0x0
[ 9148.130658]  # GUEST_TR_BASE = 0x0
[ 9148.130659]  # GUEST_GDTR_BASE = 0x7c58
[ 9148.130660]  # GUEST_IDTR_BASE = 0x0
[ 9148.130662]  # GUEST_DR7 = 0x400
[ 9148.130663]  # GUEST_RSP = 0x7bfa
[ 9148.130664]  # GUEST_RIP = 0x7c45
[ 9148.130665]  # GUEST_RFLAGS = 0x6
[ 9148.130666]  # GUEST_PENDING_DEBUG_EXCEPT = 0x0
[ 9148.130667]  # GUEST_IA32_SYSENTER_ESP = 0x0
[ 9148.130668]  # GUEST_IA32_SYSENTER_EIP = 0x0
[ 9148.130670]  # HOST_CR0 = 0x80050033
[ 9148.130673]  # HOST_CR3 = 0x7cf7c000
[ 9148.130675]  # HOST_CR4 = 0x362670
[ 9148.130677]  # HOST_FS_BASE = 0x7fd81a6e3700
[ 9148.130679]  # HOST_GS_BASE = 0xffff8800ba680000
[ 9148.130681]  # HOST_TR_BASE = 0xffff8800ba6848c0
[ 9148.130683]  # HOST_GDTR_BASE = 0xffff8800ba68c000
[ 9148.130686]  # HOST_IDTR_BASE = 0xffffffffff574000
[ 9148.130688]  # HOST_IA32_SYSENTER_ESP = 0x0
[ 9148.130690]  # HOST_IA32_SYSENTER_EIP = 0xffffffff81852720
[ 9148.130692]  # HOST_RSP = 0xffff88006b833de0
[ 9148.130694]  # HOST_RIP = 0xffffffffc05b85d5
[ 9148.130697]  # (null) = 0x0

我用ch 26.3检查了字段,但找不到任何提示。 请照亮它。

1 个答案:

答案 0 :(得分:3)

FS ATTR和GS ATTR无效。请参阅26.3.1.2中对“访问权限字段”的检查。如果位16为0,则位7:0必须为非零,通常为0x93。