Page MenuHomeFreeBSD

D61218.1793951817.diff
No OneTemporary

Authored By
Unknown
Size
745 B
Referenced Files
None
Subscribers
None

D61218.1793951817.diff

diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -2079,7 +2079,8 @@
* VMCB.
*/
load_dr7(0);
- wrmsr(MSR_DEBUGCTLMSR, 0);
+ if (gctx->host_debugctl != 0)
+ wrmsr(MSR_DEBUGCTLMSR, 0);
/* Save host debug registers. */
gctx->host_dr0 = rdr0();
@@ -2114,7 +2115,12 @@
load_dr2(gctx->host_dr2);
load_dr3(gctx->host_dr3);
load_dr6(gctx->host_dr6);
- wrmsr(MSR_DEBUGCTLMSR, gctx->host_debugctl);
+ /*
+ * LBR virtualization restores the zero DEBUGCTL value used at VMRUN.
+ * Only a nonzero original host value needs restoring here.
+ */
+ if (gctx->host_debugctl != 0)
+ wrmsr(MSR_DEBUGCTLMSR, gctx->host_debugctl);
load_dr7(gctx->host_dr7);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 6, 7:56 AM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41494550
Default Alt Text
D61218.1793951817.diff (745 B)

Event Timeline