x86/HVM: send mapcache invalidation request to qemu regardless of preemption
PATCH 1/1 x86/HVM: send mapcache invalidation request to qemu regardless of preemption
Even if only part of a hypercall completed before getting preempted, invalidation ought to occur. Therefore fold the two return statements.
Signed-off-by Jan Beulich <[email protected]>
---
Split off from "x86/HVM: refine when to send mapcache invalidation request to qemu".
xen/arch/x86/hvm/hypercall.c +1 -4
@@ -326,14 +326,11 @@ int hvm_hypercall(struct cpu_user_regs *HVM_DBG_LOG (DBG_LEVEL_HCALL ,"hcall%lu -> %lx" , eax, regs->rax); -if ( curr->hcall_preempted ) -return HVM_HCALL_preempted; -if (unlikely (currd->arch.hvm.qemu_mapcache_invalidate) &&test_and_clear_bool (currd->arch.hvm.qemu_mapcache_invalidate) )send_invalidate_req (); -return HVM_HCALL_completed; +return curr->hcall_preempted ? HVM_HCALL_preempted : HVM_HCALL_completed; }/*
Quoted 4 lines · Jan Beulich
Even if only part of a hypercall completed before getting preempted, invalidation ought to occur. Therefore fold the two return statements.
Signed-off-by Jan Beulich <[email protected]>
Acked-by Andrew Cooper <[email protected]>