[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] xen/vm_event: Add safe to disable vm_event
On 15.05.2020 18:53, Tamas K Lengyel wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -563,15 +563,41 @@ void hvm_do_resume(struct vcpu *v) > v->arch.hvm.inject_event.vector = HVM_EVENT_VECTOR_UNSET; > } > > - if ( unlikely(v->arch.vm_event) && > v->arch.monitor.next_interrupt_enabled ) > + if ( unlikely(v->arch.vm_event) ) > { > - struct x86_event info; > + struct domain *d = v->domain; const > + if ( v->arch.monitor.next_interrupt_enabled ) > + { > + struct x86_event info; > + > + if ( hvm_get_pending_event(v, &info) ) > + { > + hvm_monitor_interrupt(info.vector, info.type, > info.error_code, > + info.cr2); > + v->arch.monitor.next_interrupt_enabled = false; > + } > + } > > - if ( hvm_get_pending_event(v, &info) ) > + if ( d->arch.monitor.safe_to_disable ) > { > - hvm_monitor_interrupt(info.vector, info.type, info.error_code, > - info.cr2); > - v->arch.monitor.next_interrupt_enabled = false; > + struct vcpu *check_vcpu; const again, requiring a respective adjustment to patch 2. > + bool pending_op = false; > + > + for_each_vcpu ( d, check_vcpu ) > + { > + if ( vm_event_check_pending_op(check_vcpu) ) > + { > + pending_op = true; > + break; > + } > + } > + > + if ( !pending_op ) > + { > + hvm_monitor_safe_to_disable(); This new function returns bool without the caller caring about the return value. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |