[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/hvm: fix non-onchangeonly CR write events logic
commit 421850a06d54dbe48f8e5979d3453428071db4fd Author: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> AuthorDate: Thu Aug 13 14:46:25 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Aug 13 14:46:25 2015 +0200 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> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 9 +++------ 1 files 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); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |