lkml.org 
[lkml]   [2021]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] xen: check required Xen features
Date
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]
\
 
 \ /
  Last update: 2021-05-10 15:30    [W:0.084 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site