|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/mm: Introduce a local domain variable to write_ptbase()
commit 1f2153fc5846683e6142c4405c8817d387ff3eb9
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Jul 26 17:21:50 2024 +0200
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jul 30 17:36:51 2024 +0100
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>
Acked-by: Andrew Cooper <andrew.cooper3@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 38e0bfec43..e9c86208b0 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));
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |