Running `sysctl -a` causes crash (Hyper-V)

Roger Pau Monné roger.pau at citrix.com
Mon Nov 11 16:00:49 UTC 2013


On 11/11/13 15:31, Sergey Kandaurov wrote:
> On 11 November 2013 18:13, Pavel Timofeev <timp87 at gmail.com> wrote:
>> [...]
>> (kgdb) p vm_guest
>> $1 = 3
>> Current language:  auto; currently minimal
>> (kgdb)
>>
> 
> What if you try this change?
> 
> Index: sys/kern/subr_param.c
> ===================================================================
> --- sys/kern/subr_param.c    (revision 257695)
> +++ sys/kern/subr_param.c    (working copy)
> @@ -153,6 +153,7 @@
>      "none",
>      "generic",
>      "xen",
> +    "hv",
>      NULL
>  };

This is my fault, I've added VM_GUEST_HV to the guest type enum without
knowing there was another array in a completely different file that
contained a description for those values.

If you (or someone else) are going to commit this change, I would
recommend adding a BIG comment in sys/systm.h above the declaration of
VM_GUEST explaining that if you add a new guest type there you also need
to add a description in subr_param.c, this will probably prevent
something like this happening again.



More information about the freebsd-virtualization mailing list