Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/bhyverun.c
| Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | bhyve_numa_parse(const char *opt) | ||||
| free(tofree); | free(tofree); | ||||
| return (0); | return (0); | ||||
| out: | out: | ||||
| free(tofree); | free(tofree); | ||||
| return (-1); | return (-1); | ||||
| } | } | ||||
| void | |||||
| bhyve_cfg_warn(const char *old, const char *new, const char *msg) | |||||
| { | |||||
| if (get_config_value(old) != NULL && | |||||
| get_config_value(new) == NULL) { | |||||
| warnx("'%s' is deprecated, use '%s' instead", old, msg); | |||||
jhb: I think you can actually get rid of `msg` as a separate argument and instead just use `new`. I… | |||||
| set_config_value(new, get_config_value(old)); | |||||
| } | |||||
| } | |||||
| static void | static void | ||||
| calc_mem_affinity(size_t vm_memsize) | calc_mem_affinity(size_t vm_memsize) | ||||
| { | { | ||||
| int i; | int i; | ||||
| nvlist_t *nvl; | nvlist_t *nvl; | ||||
| bool need_recalc; | bool need_recalc; | ||||
| const char *value; | const char *value; | ||||
| struct vm_mem_domain *dom; | struct vm_mem_domain *dom; | ||||
| ▲ Show 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| return (vm_rev_map_gpa(ctx, addr)); | return (vm_rev_map_gpa(ctx, addr)); | ||||
| } | } | ||||
| #endif | #endif | ||||
| int | int | ||||
| fbsdrun_virtio_msix(void) | fbsdrun_virtio_msix(void) | ||||
| { | { | ||||
| return (get_config_bool_default("virtio.msix", true)); | |||||
| return (get_config_bool_default("virtio_msix", true)); | |||||
| } | } | ||||
| struct vcpu * | struct vcpu * | ||||
| fbsdrun_vcpu(int vcpuid) | fbsdrun_vcpu(int vcpuid) | ||||
| { | { | ||||
| return (vcpu_info[vcpuid].vcpu); | return (vcpu_info[vcpuid].vcpu); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 540 Lines • Show Last 20 Lines | |||||
I think you can actually get rid of msg as a separate argument and instead just use new. I would also split this into two commits: one to add bhyve_cfg_warn() and to use it in place of the existing checks, and a second to just do virtio.msix.