]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
hvm/monitor: fix usage of the control register mask master github/master gitlab/master
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 16 Feb 2018 18:16:23 +0000 (18:16 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Feb 2018 20:16:23 +0000 (20:16 +0000)
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@citrix.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
xen/arch/x86/hvm/monitor.c

index 5d568a39d34a44ced54c6609ff2442522dfb463e..160c0327b9388a57f485d371472d9a1c1cab8b85 100644 (file)
@@ -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;