diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2013-12-23 19:29:07 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2013-12-23 19:29:07 +0000 |
| commit | 330baf58c6cf2ad1cecf8ac7c9a1d0f3be36d37f (patch) | |
| tree | 1bf0f6e72b82932012864d660cbc802885ec7efd /usr.sbin/bhyvectl | |
| parent | 7a1a32c4ef277b98b9164496091f7d50f203fb81 (diff) | |
Notes
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 1b68776dca2e..c697492230de 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -190,13 +190,14 @@ usage(void) " [--get-lowmem]\n" " [--get-highmem]\n" " [--get-gpa-pmap]\n" + " [--assert-lapic-lvt=<pin>]\n" " [--inject-nmi]\n", progname); exit(1); } static int get_stats, getcap, setcap, capval, get_gpa_pmap; -static int inject_nmi; +static int inject_nmi, assert_lapic_lvt; static const char *capname; static int create, destroy, get_lowmem, get_highmem; static uint64_t memsize; @@ -381,6 +382,7 @@ enum { CAPNAME, UNASSIGN_PPTDEV, GET_GPA_PMAP, + ASSERT_LAPIC_LVT, }; int @@ -433,6 +435,7 @@ main(int argc, char *argv[]) { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV }, { "setcap", REQ_ARG, 0, SET_CAP }, { "get-gpa-pmap", REQ_ARG, 0, GET_GPA_PMAP }, + { "assert-lapic-lvt", REQ_ARG, 0, ASSERT_LAPIC_LVT }, { "getcap", NO_ARG, &getcap, 1 }, { "get-stats", NO_ARG, &get_stats, 1 }, { "get-desc-ds",NO_ARG, &get_desc_ds, 1 }, @@ -564,6 +567,7 @@ main(int argc, char *argv[]) }; vcpu = 0; + assert_lapic_lvt = -1; progname = basename(argv[0]); while ((ch = getopt_long(argc, argv, "", opts, NULL)) != -1) { @@ -685,6 +689,9 @@ main(int argc, char *argv[]) if (sscanf(optarg, "%d/%d/%d", &bus, &slot, &func) != 3) usage(); break; + case ASSERT_LAPIC_LVT: + assert_lapic_lvt = atoi(optarg); + break; default: usage(); } @@ -832,6 +839,10 @@ main(int argc, char *argv[]) error = vm_inject_nmi(ctx, vcpu); } + if (!error && assert_lapic_lvt != -1) { + error = vm_lapic_local_irq(ctx, vcpu, assert_lapic_lvt); + } + if (!error && (get_lowmem || get_all)) { gpa = 0; error = vm_get_memory_seg(ctx, gpa, &len, &wired); |
