Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177200143
D61218.1793951817.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
745 B
Referenced Files
None
Subscribers
None
D61218.1793951817.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D61218: vmm: Avoid redundant AMD DEBUGCTL writes
Attached
Detach File
Event Timeline