The current logic gates issuing flush TLB requests with the FLUSH_ROOT_PGTBL
flag to XPTI being enabled.
In preparation for FLUSH_ROOT_PGTBL also being needed when not using XPTI,
untie it from the xpti domain boolean and instead introduce a new flush_root_pt
field.
No functional change intended, as flush_root_pt == xpti.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
bool pcid;
/* Mitigate L1TF with shadow/crashing? */
bool check_l1tf;
+ /* Issue FLUSH_ROOT_PGTBL for root page-table changes. */
+ bool flush_root_pt;
/* map_domain_page() mapping cache. */
struct mapcache_domain mapcache;
#define flush_root_pgtbl_domain(d) \
{ \
- if ( is_pv_domain(d) && (d)->arch.pv.xpti ) \
+ if ( is_pv_domain(d) && (d)->arch.pv.flush_root_pt ) \
flush_mask((d)->dirty_cpumask, FLUSH_ROOT_PGTBL); \
}
cmd == MMU_PT_UPDATE_PRESERVE_AD, v);
if ( !rc )
flush_linear_pt = true;
- if ( !rc && pt_owner->arch.pv.xpti )
+ if ( !rc && pt_owner->arch.pv.flush_root_pt )
{
bool local_in_use = false;
d->arch.ctxt_switch = &pv_csw;
d->arch.pv.xpti = is_hardware_domain(d) ? opt_xpti_hwdom : opt_xpti_domu;
+ d->arch.pv.flush_root_pt = d->arch.pv.xpti;
if ( !is_pv_32bit_domain(d) && use_invpcid && cpu_has_pcid )
switch ( ACCESS_ONCE(opt_pcid) )