Messages in this thread | | | From | Juergen Gross <> | Subject | Re: [PATCH 1/3] xen: check required Xen features | Date | Mon, 10 May 2021 15:21:51 +0200 |
| |
On 10.05.21 14:11, Boris Ostrovsky wrote: > > 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)
Depends on the use case.
XENFEAT_gnttab_map_avail_bits is relevant for driver domains using user space backends only. In case it is not available "interesting" things might happen.
XENFEAT_mmu_pt_update_preserve_ad not being present would result in a subsequent mmu-update function using that feature returning -ENOSYS, so this wouldn't be unrecognized.
So panic() might be a good idea in case the features are not available.
> (Also, chk_required_features() perhaps?)
Fine with me.
Juergen [unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature] | |