[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 06/22] x86/mm: introduce a local domain variable to write_ptbase()
This reduces the repeated accessing of v->domain. No functional change intended. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/mm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index ca3d116b0e05..a792a300a866 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -517,13 +517,14 @@ void make_cr3(struct vcpu *v, mfn_t mfn) void write_ptbase(struct vcpu *v) { + const struct domain *d = v->domain; struct cpu_info *cpu_info = get_cpu_info(); unsigned long new_cr4; - new_cr4 = (is_pv_vcpu(v) && !is_idle_vcpu(v)) + new_cr4 = (is_pv_domain(d) && !is_idle_domain(d)) ? pv_make_cr4(v) : mmu_cr4_features; - if ( is_pv_vcpu(v) && v->domain->arch.pv.xpti ) + if ( is_pv_domain(d) && d->arch.pv.xpti ) { cpu_info->root_pgt_changed = true; cpu_info->pv_cr3 = __pa(this_cpu(root_pgt)); -- 2.45.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |