x86/MSR: use latched "current"
PATCH 1/1 x86/MSR: use latched "current"
There's no need to recalculate / refetch the value from the stack (pointer).
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/msr.c +2 -2
@@ -417,7 +417,7 @@ int guest_rdmsr(struct vcpu *v, uint32_t* out of hardware. */ #ifdef CONFIG_HVM -if ( v == current &&is_hvm_domain (d) && v->arch.hvm.flag_dr_dirty ) +if ( v == curr &&is_hvm_domain (d) && v->arch.hvm.flag_dr_dirty )rdmsrl (msr, *val); else#endif
@@ -639,7 +639,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t {uint64_t xcr0 =get_xcr0 (); -if ( v != current || +if ( v != curr ||handle_xsetbv (XCR_XFEATURE_ENABLED_MASK , xcr0 |X86_XCR0_BNDREGS |X86_XCR0_BNDCSR ) ) goto gp_fault;
Quoted 4 lines · Jan Beulich
There's no need to recalculate / refetch the value from the stack (pointer).
Signed-off-by Jan Beulich <[email protected]>
Acked-by Andrew Cooper <[email protected]>