[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/hvm: Fix non-onchangeonly CR write events logic
hvm_event_crX() already returns a bool_t to tell us whether an event will be sent out or not, so the extra check that value != old is not only useless, but also prevents non-onchangeonly events from being sent. Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index c957610..707ad86 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3368,8 +3368,7 @@ int hvm_set_cr0(unsigned long value, bool_t may_defer) } if ( may_defer && unlikely(currad->monitor.write_ctrlreg_enabled & - monitor_ctrlreg_bitmask(VM_EVENT_X86_CR0)) && - value != old_value ) + monitor_ctrlreg_bitmask(VM_EVENT_X86_CR0)) ) { ASSERT(currad->event_write_data != NULL); @@ -3472,8 +3471,7 @@ int hvm_set_cr3(unsigned long value, bool_t may_defer) struct arch_domain *currad = &v->domain->arch; if ( may_defer && unlikely(currad->monitor.write_ctrlreg_enabled & - monitor_ctrlreg_bitmask(VM_EVENT_X86_CR3)) && - value != old ) + monitor_ctrlreg_bitmask(VM_EVENT_X86_CR3)) ) { ASSERT(currad->event_write_data != NULL); @@ -3546,8 +3544,7 @@ int hvm_set_cr4(unsigned long value, bool_t may_defer) } if ( may_defer && unlikely(currad->monitor.write_ctrlreg_enabled & - monitor_ctrlreg_bitmask(VM_EVENT_X86_CR4)) && - value != old_cr ) + monitor_ctrlreg_bitmask(VM_EVENT_X86_CR4)) ) { ASSERT(currad->event_write_data != NULL); -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |