[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] hvm/monitor: fix usage of the control register mask



commit 24470b99c1671dca531c2cf5747eda2f8892ecbc
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Feb 16 18:16:23 2018 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Feb 16 20:16:23 2018 +0000

    hvm/monitor: fix usage of the control register mask
    
    Previous usage is not correct and would prevent certain updates from
    being notified to the monitor client.
    
    For example if (value ^ old) == (PGE | PSE) and mask == PGE this
    update would not be notified.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c
index 5d568a3..160c032 100644
--- a/xen/arch/x86/hvm/monitor.c
+++ b/xen/arch/x86/hvm/monitor.c
@@ -39,7 +39,7 @@ bool hvm_monitor_cr(unsigned int index, unsigned long value, 
unsigned long old)
     if ( (ad->monitor.write_ctrlreg_enabled & ctrlreg_bitmask) &&
          (!(ad->monitor.write_ctrlreg_onchangeonly & ctrlreg_bitmask) ||
           value != old) &&
-         (!((value ^ old) & ad->monitor.write_ctrlreg_mask[index])) )
+         ((value ^ old) & ~ad->monitor.write_ctrlreg_mask[index]) )
     {
         bool sync = ad->monitor.write_ctrlreg_sync & ctrlreg_bitmask;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.