|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 01/12] xen/vmx: let opt_ept_ad always reflect the current setting
On 02.04.2020 17:46, Juergen Gross wrote:
> In case opt_ept_ad has not been set explicitly by the user via command
> line or runtime parameter, it is treated as "no" on Avoton cpus.
>
> Change that handling by setting opt_ept_ad to 0 for this cpu type
> explicitly if no user value has been set.
>
> By putting this into the (renamed) boot time initialization of vmcs.c
> _vmx_cpu_up() can be made static.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit preferably with ...
> @@ -2108,9 +2104,21 @@ static void vmcs_dump(unsigned char ch)
> printk("**************************************\n");
> }
>
> -void __init setup_vmcs_dump(void)
> +int __init vmx_vmcs_init(void)
> {
> - register_keyhandler('v', vmcs_dump, "dump VT-x VMCSs", 1);
> + int ret;
> +
> + if ( opt_ept_ad < 0 )
> + /* Work around Erratum AVR41 on Avoton processors. */
> + opt_ept_ad = (boot_cpu_data.x86 == 6 &&
> + boot_cpu_data.x86_model == 0x4d) ? 0 : 1;
... no use of the conditional operator here - the result of the
&& (or its logical inversion to be precise) would be quite fine
to use directly here.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |