lkml.org 
[lkml]   [2021]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] xen: check required Xen features
From
Date

On 4/22/21 11:10 AM, Juergen Gross wrote:
>
> +/*
> + * Linux kernel expects at least Xen 4.0.
> + *
> + * Assume some features to be available for that reason (depending on guest
> + * mode, of course).
> + */
> +#define chk_feature(f) { \
> + if (!xen_feature(f)) \
> + pr_err("Xen: feature %s not available!\n", #f); \
> + }


With your changes in the subsequent patches, are we still going to function properly without those features? (i.e. maybe we should just panic)


(Also, chk_required_features() perhaps?)


-boris


> +
> u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
> EXPORT_SYMBOL_GPL(xen_features);
>
> @@ -31,4 +44,9 @@ void xen_setup_features(void)
> for (j = 0; j < 32; j++)
> xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
> }
> +
> + if (xen_pv_domain()) {
> + chk_feature(XENFEAT_mmu_pt_update_preserve_ad);
> + chk_feature(XENFEAT_gnttab_map_avail_bits);
> + }
> }

\
 
 \ /
  Last update: 2021-05-10 14:58    [W:0.393 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site