Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
xen.8389
5b150ef9-x86-fix-error-handling-of-pv-dr7-shado...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5b150ef9-x86-fix-error-handling-of-pv-dr7-shadow.patch of Package xen.8389
# Commit 237c31b5a1d5aa88cdb59b8c31b1b62eb13e82d1 # Date 2018-06-04 11:05:45 +0100 # Author Andrew Cooper <andrew.cooper3@citrix.com> # Committer Andrew Cooper <andrew.cooper3@citrix.com> x86/traps: Fix error handling of the pv %dr7 shadow state c/s "x86/pv: Introduce and use x86emul_write_dr()" fixed a bug with IO shadow handling, in that it remained stale and visible until %dr7.L/G got set again. However, it neglected the -EPERM return inbetween these two hunks, introducing a different bug in which a write to %dr7 which tries to set IO breakpoints without %cr4.DE being set clobbers the IO state, rather than leaves it alone. Instead, move the zeroing slightly later, which guarentees that the shadow gets written exactly once, on a successful update to %dr7. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -2120,9 +2120,6 @@ long set_debugreg(struct vcpu *v, unsign if ( value & DR_GENERAL_DETECT ) return -EPERM; - /* Zero the IO shadow before recalculating the real %dr7 */ - v->arch.debugreg[5] = 0; - /* DR7.{G,L}E = 0 => debugging disabled for this domain. */ if ( value & DR7_ACTIVE_MASK ) { @@ -2151,6 +2148,10 @@ long set_debugreg(struct vcpu *v, unsign !(v->arch.debugreg[7] & DR7_ACTIVE_MASK) ) activate_debugregs(v); } + else + /* Zero the emulated controls if %dr7 isn't active. */ + v->arch.debugreg[5] = 0; + if ( v == curr ) write_debugreg(7, value); break;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor