diff options
author | neel <neel@FreeBSD.org> | 2012-09-26 00:06:17 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2012-09-26 00:06:17 +0000 |
commit | 5dbc1ca26acaa3175dae7b9d0c45151fba0275ab (patch) | |
tree | c995abae29493221169dd97e854cf339038315e3 /usr.sbin/bhyve/spinup_ap.c | |
parent | bc269b51afe43aab28df7ea0d543c167bb7c7d2e (diff) | |
download | FreeBSD-src-5dbc1ca26acaa3175dae7b9d0c45151fba0275ab.zip FreeBSD-src-5dbc1ca26acaa3175dae7b9d0c45151fba0275ab.tar.gz |
Add an option "-a" to present the local apic in the XAPIC mode instead of the
default X2APIC mode to the guest.
Diffstat (limited to 'usr.sbin/bhyve/spinup_ap.c')
-rw-r--r-- | usr.sbin/bhyve/spinup_ap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/spinup_ap.c b/usr.sbin/bhyve/spinup_ap.c index e845515..3aa3b65 100644 --- a/usr.sbin/bhyve/spinup_ap.c +++ b/usr.sbin/bhyve/spinup_ap.c @@ -156,6 +156,12 @@ spinup_ap(struct vmctx *ctx, int vcpu, int newcpu, uint64_t rip) assert(error == 0); } + if (fbsdrun_disable_x2apic()) + error = vm_set_x2apic_state(ctx, newcpu, X2APIC_DISABLED); + else + error = vm_set_x2apic_state(ctx, newcpu, X2APIC_ENABLED); + assert(error == 0); + /* * There are 2 startup modes possible here: * - if the CPU supports 'unrestricted guest' mode, the spinup can |