[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/shadow: restrict OOS allocation to when it's really needed
commit 1d3668664df7d584b28460b42a83d193c470c03e Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri May 26 09:16:44 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri May 26 09:16:44 2023 +0200 x86/shadow: restrict OOS allocation to when it's really needed PV domains won't use it, and even HVM ones won't when OOS is turned off for them. There's therefore no point in putting extra pressure on the (limited) pool of memory. While there also zap the sh_type_to_size[] entry when OOS is disabled altogether. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index e522267325..a0ae6adb4f 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -61,7 +61,9 @@ const uint8_t sh_type_to_size[] = { [SH_type_l4_64_shadow] = 1, [SH_type_p2m_table] = 1, [SH_type_monitor_table] = 1, +#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC) [SH_type_oos_snapshot] = 1, +#endif }; #endif /* CONFIG_HVM */ @@ -2341,7 +2343,8 @@ static void sh_update_paging_modes(struct vcpu *v) #endif /* (SHADOW_OPTIMIZATIONS & SHOPT_VIRTUAL_TLB) */ #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC) - if ( mfn_eq(v->arch.paging.shadow.oos_snapshot[0], INVALID_MFN) ) + if ( !(d->options & XEN_DOMCTL_CDF_oos_off) && + mfn_eq(v->arch.paging.shadow.oos_snapshot[0], INVALID_MFN) ) { int i; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |