[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC 2/6] roles: provide abstraction for the possible domain roles
On 8/8/23 11:15, Jan Beulich wrote: On 01.08.2023 22:20, Daniel P. Smith wrote:@@ -1076,7 +1076,8 @@ static always_inline bool is_hardware_domain(const struct domain *d) if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) ) return false;- return evaluate_nospec(d == hardware_domain);+ return evaluate_nospec(((d->role & ROLE_HARDWARE_DOMAIN) || + is_initial_domain(d)) && (d == hardware_domain)); }/* This check is for functionality specific to a control domain */@@ -1085,7 +1086,8 @@ static always_inline bool is_control_domain(const struct domain *d) if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) ) return false;- return evaluate_nospec(d->is_privileged);+ return evaluate_nospec((d->role & ROLE_CONTROL_DOMAIN) || + is_initial_domain(d)); }Why these complicated conditions, and not just the check of the single relevant role bit? (Also note that indentation used here doesn't really match our expectations, but there are other style issues in the patch as well, which I assume is okay for an RFC.) They go away with suggestion to move ROLE_UNBOUNDED a concatenation of all the other roles. Ack on the style. v/r, dps
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |