[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/vm-event: minor ASSERT fix, add 'unlikely'
commit e564c57d4baf244ad4694ee45ed20f87eab8220c Author: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> AuthorDate: Fri Jul 8 09:48:52 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jul 8 09:48:52 2016 +0200 x86/vm-event: minor ASSERT fix, add 'unlikely' Minor fixes: * vm_event_register_write_resume: ASSERT on non-NULL v->arch.vm_event instead of &v->arch.vm_event->write_data. * add 'unlikely' in if Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/vm_event.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index c89ab6e..f7e09d2 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -477,7 +477,7 @@ void hvm_do_resume(struct vcpu *v) { struct monitor_write_data *w = &v->arch.vm_event->write_data; - if ( v->arch.vm_event->emulate_flags ) + if ( unlikely(v->arch.vm_event->emulate_flags) ) { enum emul_kind kind = EMUL_KIND_NORMAL; diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c index 80f84d6..a5ef750 100644 --- a/xen/arch/x86/vm_event.c +++ b/xen/arch/x86/vm_event.c @@ -73,14 +73,16 @@ void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp) { if ( rsp->flags & VM_EVENT_FLAG_DENY ) { - struct monitor_write_data *w = &v->arch.vm_event->write_data; + struct monitor_write_data *w; - ASSERT(w); + ASSERT(v->arch.vm_event); /* deny flag requires the vCPU to be paused */ if ( !atomic_read(&v->vm_event_pause_count) ) return; + w = &v->arch.vm_event->write_data; + switch ( rsp->reason ) { case VM_EVENT_REASON_MOV_TO_MSR: -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |