Commit 699e1b2e authored by David Edmondson's avatar David Edmondson Committed by Paolo Bonzini

KVM: x86: dump_vmcs should not conflate EFER and PAT presence in VMCS

Show EFER and PAT based on their individual entry/exit controls.
Signed-off-by: default avatarDavid Edmondson <david.edmondson@oracle.com>
Message-Id: <20210318120841.133123-3-david.edmondson@oracle.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d9e46d34
...@@ -5771,11 +5771,12 @@ void dump_vmcs(void) ...@@ -5771,11 +5771,12 @@ void dump_vmcs(void)
vmx_dump_sel("LDTR:", GUEST_LDTR_SELECTOR); vmx_dump_sel("LDTR:", GUEST_LDTR_SELECTOR);
vmx_dump_dtsel("IDTR:", GUEST_IDTR_LIMIT); vmx_dump_dtsel("IDTR:", GUEST_IDTR_LIMIT);
vmx_dump_sel("TR: ", GUEST_TR_SELECTOR); vmx_dump_sel("TR: ", GUEST_TR_SELECTOR);
if ((vmexit_ctl & (VM_EXIT_SAVE_IA32_PAT | VM_EXIT_SAVE_IA32_EFER)) || if ((vmexit_ctl & VM_EXIT_SAVE_IA32_EFER) ||
(vmentry_ctl & (VM_ENTRY_LOAD_IA32_PAT | VM_ENTRY_LOAD_IA32_EFER))) (vmentry_ctl & VM_ENTRY_LOAD_IA32_EFER))
pr_err("EFER = 0x%016llx PAT = 0x%016llx\n", pr_err("EFER= 0x%016llx\n", vmcs_read64(GUEST_IA32_EFER));
vmcs_read64(GUEST_IA32_EFER), if ((vmexit_ctl & VM_EXIT_SAVE_IA32_PAT) ||
vmcs_read64(GUEST_IA32_PAT)); (vmentry_ctl & VM_ENTRY_LOAD_IA32_PAT))
pr_err("PAT = 0x%016llx\n", vmcs_read64(GUEST_IA32_PAT));
pr_err("DebugCtl = 0x%016llx DebugExceptions = 0x%016lx\n", pr_err("DebugCtl = 0x%016llx DebugExceptions = 0x%016lx\n",
vmcs_read64(GUEST_IA32_DEBUGCTL), vmcs_read64(GUEST_IA32_DEBUGCTL),
vmcs_readl(GUEST_PENDING_DBG_EXCEPTIONS)); vmcs_readl(GUEST_PENDING_DBG_EXCEPTIONS));
...@@ -5812,10 +5813,10 @@ void dump_vmcs(void) ...@@ -5812,10 +5813,10 @@ void dump_vmcs(void)
vmcs_readl(HOST_IA32_SYSENTER_ESP), vmcs_readl(HOST_IA32_SYSENTER_ESP),
vmcs_read32(HOST_IA32_SYSENTER_CS), vmcs_read32(HOST_IA32_SYSENTER_CS),
vmcs_readl(HOST_IA32_SYSENTER_EIP)); vmcs_readl(HOST_IA32_SYSENTER_EIP));
if (vmexit_ctl & (VM_EXIT_LOAD_IA32_PAT | VM_EXIT_LOAD_IA32_EFER)) if (vmexit_ctl & VM_EXIT_LOAD_IA32_EFER)
pr_err("EFER = 0x%016llx PAT = 0x%016llx\n", pr_err("EFER= 0x%016llx\n", vmcs_read64(HOST_IA32_EFER));
vmcs_read64(HOST_IA32_EFER), if (vmexit_ctl & VM_EXIT_LOAD_IA32_PAT)
vmcs_read64(HOST_IA32_PAT)); pr_err("PAT = 0x%016llx\n", vmcs_read64(HOST_IA32_PAT));
if (cpu_has_load_perf_global_ctrl() && if (cpu_has_load_perf_global_ctrl() &&
vmexit_ctl & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL) vmexit_ctl & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL)
pr_err("PerfGlobCtl = 0x%016llx\n", pr_err("PerfGlobCtl = 0x%016llx\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment