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); > + } > }