diff options
author | jhb <jhb@FreeBSD.org> | 2014-07-21 19:08:02 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-07-21 19:08:02 +0000 |
commit | e6b48465b7c368666e10a2bd8f4f500483497b24 (patch) | |
tree | 7e529f938e1d777df1f54045191fa3003056dbda /sys/boot | |
parent | b164bf591711a4c455ca47e1f58b0bb91e5e904c (diff) | |
download | FreeBSD-src-e6b48465b7c368666e10a2bd8f4f500483497b24.zip FreeBSD-src-e6b48465b7c368666e10a2bd8f4f500483497b24.tar.gz |
MFC 264353,264509,264768,264770,264825,264846,264988,265114,265165,265365,
265941,265951,266390,266550,266910:
Various bhyve fixes:
- Don't save host's return address in 'struct vmxctx'.
- Permit non-32-bit accesses to local APIC registers.
- Factor out common ioport handler code.
- Use calloc() in favor of malloc + memset.
- Change the vlapic timer frequency to be in the ballpark of contemporary
hardware.
- Allow the guest to read the TSC via MSR 0x10.
- A VMCS is always inactive when it exits the vmx_run() loop. Remove
redundant code and the misleading comment that suggest otherwise.
- Ignore writes to microcode update MSR. This MSR is accessed by RHEL7
guest.
Add KTR tracepoints to annotate wrmsr and rdmsr VM exits.
- Provide an alias for the userboot console and name it 'comconsole'.
- Use EV_ADD to create an mevent and EV_ENABLE to enable it.
- abort(3) the process in response to a VMEXIT_ABORT.
- Don't include the guest memory segments in the bhyve(8) process core dump.
- Make the vmx asm code dtrace-fbt-friendly.
- Allow vmx_getdesc() and vmx_setdesc() to be called for a vcpu that is in
the VCPU_RUNNING state.
- Enable VMX in the IA32_FEATURE_CONTROL MSR if it not enabled and the MSR
isn't locked.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/userboot/userboot/conf.c | 2 | ||||
-rw-r--r-- | sys/boot/userboot/userboot/userboot_cons.c | 44 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sys/boot/userboot/userboot/conf.c b/sys/boot/userboot/userboot/conf.c index 5eac87da..6727a22 100644 --- a/sys/boot/userboot/userboot/conf.c +++ b/sys/boot/userboot/userboot/conf.c @@ -97,8 +97,10 @@ struct file_format *file_formats[] = { * data structures from bootstrap.h as well. */ extern struct console userboot_console; +extern struct console userboot_comconsole; struct console *consoles[] = { &userboot_console, + &userboot_comconsole, NULL }; diff --git a/sys/boot/userboot/userboot/userboot_cons.c b/sys/boot/userboot/userboot/userboot_cons.c index 5ecb7c8..6f73ad5 100644 --- a/sys/boot/userboot/userboot/userboot_cons.c +++ b/sys/boot/userboot/userboot/userboot_cons.c @@ -33,8 +33,12 @@ __FBSDID("$FreeBSD$"); int console; +static struct console *userboot_comconsp; + static void userboot_cons_probe(struct console *cp); static int userboot_cons_init(int); +static void userboot_comcons_probe(struct console *cp); +static int userboot_comcons_init(int); static void userboot_cons_putchar(int); static int userboot_cons_getchar(void); static int userboot_cons_poll(void); @@ -50,6 +54,21 @@ struct console userboot_console = { userboot_cons_poll, }; +/* + * Provide a simple alias to allow loader scripts to set the + * console to comconsole without resulting in an error + */ +struct console userboot_comconsole = { + "comconsole", + "comconsole", + 0, + userboot_comcons_probe, + userboot_comcons_init, + userboot_cons_putchar, + userboot_cons_getchar, + userboot_cons_poll, +}; + static void userboot_cons_probe(struct console *cp) { @@ -65,6 +84,31 @@ userboot_cons_init(int arg) } static void +userboot_comcons_probe(struct console *cp) +{ + + /* + * Save the console pointer so the comcons_init routine + * can set the C_PRESENT* flags. They are not set + * here to allow the existing userboot console to + * be elected the default. + */ + userboot_comconsp = cp; +} + +static int +userboot_comcons_init(int arg) +{ + + /* + * Set the C_PRESENT* flags to allow the comconsole + * to be selected as the active console + */ + userboot_comconsp->c_flags |= (C_PRESENTIN | C_PRESENTOUT); + return (0); +} + +static void userboot_cons_putchar(int c) { |