From 13ec93719a1ae9222eda487dae1972ba22cdaf42 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Fri, 12 Oct 2012 23:12:19 +0000 Subject: [PATCH] Add the guest physical address and r/w/x bits to the paging exit in preparation for a rework of bhyve MMIO handling. Reviewed by: neel Obtained from: NetApp --- sys/amd64/include/vmm.h | 2 ++ sys/amd64/vmm/intel/vmx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index 4dfdd04cf5c4..d0dfb0498353 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -266,6 +266,8 @@ struct vm_exit { } inout; struct { uint64_t cr3; + uint64_t gpa; + int rwx; } paging; /* * VMX specific payload. Used when there is no "better" diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 6a1dbed1c716..81969eab1769 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -1289,6 +1289,8 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) if (!handled) { vmexit->exitcode = VM_EXITCODE_PAGING; vmexit->u.paging.cr3 = cr3; + vmexit->u.paging.gpa = gpa; + vmexit->u.paging.rwx = qual & 0x7; } break; default: