: KVM: Fix cmpxchg for writeback changes
PATCH 1/1 : KVM: Fix cmpxchg for writeback changes
KVM: Fix writeback for cmpxchg instruction
The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke cmpxchg emulation. The patch below fixes that.
drivers/kvm/x86_emulate.c +1 -1
@@ -1275,7 +1275,7 @@ twobyte_insn: src.val = _regs[VCPU_REGS_RAX ];emulate_2op_SrcV ("cmp" , src, dst, _eflags);/* Always write back. The question is: where to? */ - d |= Mov; + no_wb =0 ;if (_eflags &EFLG_ZF ) {/* Success: write back to memory. */ dst.val = src.orig_val;
Signature · 10 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Aurelien Jarno
KVM: Fix writeback for cmpxchg instruction
The writeback fixes (
02c03a326a5df825cc01de426f72e160db2b9538) broke cmpxchg emulation. The patch below fixes that.Signed-off-by Aurelien Jarno <[email protected]>drivers/kvm/x86_emulate.c +0
-0
drivers/kvm/x86_emulate.c twobyte_insn: · line 1281
Quoted 8 lines
drivers/kvm/x86_emulate.c +1
-1@@ -1275,7 +1275,7 @@ twobyte_insn: src.val = _regs[VCPU_REGS_RAX ];emulate_2op_SrcV ("cmp" , src, dst, _eflags);/* Always write back. The question is: where to? */ - d |= Mov; + no_wb =0 ;if (_eflags &EFLG_ZF ) {/* Success: write back to memory. */ dst.val = src.orig_val;
But no_wb defaults to zero?
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
A message that is not in the archive (sent off-list or not yet received): 46A7190A.3080500-atKUWr5tajBWk0Htik3J/[email protected]
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Aurelien Jarno
KVM: Fix writeback for cmpxchg instruction
The writeback fixes (
02c03a326a5df825cc01de426f72e160db2b9538) broke cmpxchg emulation. The patch below fixes that.Signed-off-by Aurelien Jarno <[email protected]>
[snip]
Quoted 1 line
But
no_wbdefaults to zero?
Oops right. So please find a new patch below.
KVM: Remove dead code in the cmpxchg instruction emulation
The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) let some dead code in the cmpxchg instruction emulation. Remove it.
drivers/kvm/x86_emulate.c +0 -2
@@ -1274,8 +1274,6 @@ twobyte_insn: src.orig_val = src.val; src.val = _regs[VCPU_REGS_RAX ];emulate_2op_SrcV ("cmp" , src, dst, _eflags); -/* Always write back. The question is: where to? */ - d |= Mov;if (_eflags &EFLG_ZF ) {/* Success: write back to memory. */ dst.val = src.orig_val;
Signature · 10 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Avi Kivity
AppliedQuoted 8 lines · Aurelien Jarno
KVM: Remove dead code in the cmpxchg instruction emulation
The writeback fixes (
02c03a326a5df825cc01de426f72e160db2b9538) let some dead code in the cmpxchg instruction emulation. Remove it.Signed-off-by Aurelien Jarno <[email protected]>
Applied, thanks.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/