diff options
author | neel <neel@FreeBSD.org> | 2015-05-21 18:29:11 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2015-05-21 18:29:11 +0000 |
commit | 0e3d3564e5e18b0b5c89d6750aabe15453cedfcd (patch) | |
tree | 3337981d0913e678c39004506bd011b4c5a991b2 /usr.sbin/bhyvectl | |
parent | a0ca6168e622d5b6e410d5a2a57399c1339864bd (diff) | |
download | FreeBSD-src-0e3d3564e5e18b0b5c89d6750aabe15453cedfcd.zip FreeBSD-src-0e3d3564e5e18b0b5c89d6750aabe15453cedfcd.tar.gz |
Add an option "--get-vmcs-exit-inst-length" to display the instruction length
of the instruction that caused the VM-exit.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/bhyvectl')
-rw-r--r-- | usr.sbin/bhyvectl/bhyvectl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 223ee25..7d3017f 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -293,6 +293,7 @@ static int get_guest_pat, get_host_pat; static int get_guest_sysenter, get_vmcs_link; static int get_exit_reason, get_vmcs_exit_qualification; static int get_vmcs_exit_interruption_info, get_vmcs_exit_interruption_error; +static int get_vmcs_exit_inst_length; static uint64_t desc_base; static uint32_t desc_limit, desc_access; @@ -1145,7 +1146,15 @@ get_misc_vmcs(struct vmctx *ctx, int vcpu) vcpu, u64); } } - + + if (!error && (get_vmcs_exit_inst_length || get_all)) { + error = vm_get_vmcs_field(ctx, vcpu, + VMCS_EXIT_INSTRUCTION_LENGTH, &u64); + if (error == 0) + printf("vmcs_exit_inst_length[%d]\t0x%08x\n", vcpu, + (uint32_t)u64); + } + if (!error && (get_vmcs_exit_qualification || get_all)) { error = vm_get_vmcs_field(ctx, vcpu, VMCS_EXIT_QUALIFICATION, &u64); @@ -1405,6 +1414,8 @@ setup_options(bool cpu_intel) REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "get-vmcs-exit-qualification", NO_ARG, &get_vmcs_exit_qualification, 1 }, + { "get-vmcs-exit-inst-length", + NO_ARG, &get_vmcs_exit_inst_length, 1 }, { "get-vmcs-interruptibility", NO_ARG, &get_vmcs_interruptibility, 1 }, { "get-vmcs-exit-interruption-error", |