On 22/07/2025 1:05 pm, Jason Andryuk wrote: > On 2025-07-22 14:07, Teddy Astie wrote: >> do_sched_op(SCHEDOP_yield) just calls vcpu_yield(). Remove the >> indirection >> through the hypercall handler and use the function directly. >> >> Perform the same for SCHEDOP_block. >> >> Not a functional change. >> >> Signed-off-by: Teddy Astie <[email protected]> >> --- >> xen/arch/x86/hvm/hvm.c | 3 ++- >> xen/arch/x86/hvm/svm/svm.c | 2 +- >> xen/arch/x86/hvm/viridian/viridian.c | 2 +- >> xen/arch/x86/hvm/vmx/vmx.c | 2 +- >> 4 files changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c >> index 4cb2e13046..5c3e9ad72e 100644 >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -1736,7 +1736,8 @@ void hvm_hlt(unsigned int eflags) >> if ( unlikely(!(eflags & X86_EFLAGS_IF)) ) >> return hvm_vcpu_down(curr); >> - do_sched_op(SCHEDOP_block, guest_handle_from_ptr(NULL, void)); >> + local_event_delivery_enable(); >> + vcpu_block(); > > I think it would be better to export and call > vcpu_block_enable_events(). This ensures they stay in-sync. > > The vcpu_vield() conversion looks good to me.
Agreed on both points. ~Andrew
