From aee862ac3fd36264249b7160eaecaeacab119ac3 Mon Sep 17 00:00:00 2001 From: neel Date: Mon, 29 Oct 2012 23:58:15 +0000 Subject: Convert VMCS_ENTRY_INTR_INFO field into a vmcs identifier before passing it to vmcs_getreg(). Without this conversion vmcs_getreg() will return EINVAL. In particular this prevented injection of the breakpoint exception into the guest via the "-B" option to /usr/sbin/bhyve which is hugely useful when debugging guest hangs. This was broken in r241921. Pointy hat: me Obtained from: NetApp --- sys/amd64/vmm/intel/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index ace2683..7a9cfb8 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -1685,7 +1685,7 @@ vmx_inject(void *arg, int vcpu, int type, int vector, uint32_t code, * If there is already an exception pending to be delivered to the * vcpu then just return. */ - error = vmcs_getreg(vmcs, VMCS_ENTRY_INTR_INFO, &info); + error = vmcs_getreg(vmcs, VMCS_IDENT(VMCS_ENTRY_INTR_INFO), &info); if (error) return (error); -- cgit v1.1