svn commit: r267096 - projects/bhyve_svm/sys/amd64/vmm/amd
Peter Grehan
grehan at FreeBSD.org
Thu Jun 5 06:29:18 UTC 2014
Author: grehan
Date: Thu Jun 5 06:29:18 2014
New Revision: 267096
URL: http://svnweb.freebsd.org/changeset/base/267096
Log:
Allow the guest's CR2 value to be read/written.
This is required for page-fault injection.
Modified:
projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.c
Modified: projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.c
==============================================================================
--- projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.c Thu Jun 5 06:00:08 2014 (r267095)
+++ projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.c Thu Jun 5 06:29:18 2014 (r267096)
@@ -152,6 +152,10 @@ vmcb_read(struct vmcb *vmcb, int ident,
*retval = state->cr0;
break;
+ case VM_REG_GUEST_CR2:
+ *retval = state->cr2;
+ break;
+
case VM_REG_GUEST_CR3:
*retval = state->cr3;
break;
@@ -230,6 +234,10 @@ vmcb_write(struct vmcb *vmcb, int ident,
state->cr0 = val;
break;
+ case VM_REG_GUEST_CR2:
+ state->cr2 = val;
+ break;
+
case VM_REG_GUEST_CR3:
state->cr3 = val;
break;
More information about the svn-src-projects
mailing list