Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2013 20:21:07 +0400
From:      Sergey Kandaurov <pluknet@gmail.com>
To:        =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
Cc:        Pavel Timofeev <timp87@gmail.com>, "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: Running `sysctl -a` causes crash (Hyper-V)
Message-ID:  <CAE-mSOJ3KcXZWO-WcV1_Xwa6hzDQd6gkQRKcRAo5Xr8cDu8_sg@mail.gmail.com>
In-Reply-To: <5280FF27.1090405@citrix.com>
References:  <CAAoTqfvrdKH6BC=KrpWLgBKDjx402oTt_bp1TnV_Z3FC1if88A@mail.gmail.com> <CAE-mSOLKgk_h10mUPLuMXHgPfYJMEog_FFdyZvEoAOXMh=rbfg@mail.gmail.com> <CAAoTqfu9NFuVFYnLFo%2BLG7_kXd%2BAaxEPTm4nCKETzWvje7=fyA@mail.gmail.com> <CAE-mSOLeMHkh7gKLZPYcyu3GdJKqN4hAMBgEf5TwMUxB4nQ7zA@mail.gmail.com> <CAAoTqftAbsDNUiCv4QRnNfamf61dPhJ%2BWAzgfVVL4QMe9qHxcA@mail.gmail.com> <CAE-mSOLszJLfHBgmSTaUH5%2B5dTe23XLUFbp-nhfPpz2UVWMCJQ@mail.gmail.com> <5280FF27.1090405@citrix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11 November 2013 20:00, Roger Pau Monn=E9 <roger.pau@citrix.com> wrote:
> On 11/11/13 15:31, Sergey Kandaurov wrote:
>> On 11 November 2013 18:13, Pavel Timofeev <timp87@gmail.com> wrote:
>>> [...]
>>> (kgdb) p vm_guest
>>> $1 =3D 3
>>> Current language:  auto; currently minimal
>>> (kgdb)
>>>
>>
>> What if you try this change?
>>
>> Index: sys/kern/subr_param.c
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- 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.

Ok, I committed the fix in r257996.

>
> 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.
>

What about this change?

Index: sys/sys/systm.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/sys/systm.h    (revision 257695)
+++ sys/sys/systm.h    (working copy)
@@ -70,6 +70,7 @@
  * Detected virtual machine guest types. The intention is to expand
  * and/or add to the VM_GUEST_VM type if specific VM functionality is
  * ever implemented (e.g. vendor-specific paravirtualization features).
+ * Keep in sync with vm_guest_sysctl_names[].
  */
 enum VM_GUEST { VM_GUEST_NO =3D 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV =
};

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOJ3KcXZWO-WcV1_Xwa6hzDQd6gkQRKcRAo5Xr8cDu8_sg>