]> xenbits.xensource.com Git - xen.git/commit
x86/domctl: two functional fixes to XEN_DOMCTL_[gs]etvcpuextstate
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Jun 2014 15:52:57 +0000 (17:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 5 Jun 2014 15:52:57 +0000 (17:52 +0200)
commit090ca8c155b7321404ea7713a28aaedb7ac4fffd
tree13a148d2d0dc27acb45bec0cbc43f39f83c0486c
parentae3e6f8e2d98f4cc6b64dacfd6081cf831d75fa2
x86/domctl: two functional fixes to XEN_DOMCTL_[gs]etvcpuextstate

Interacting with the vcpu itself should be protected by vcpu_pause().
Buggy/naive toolstacks might encounter adverse interaction with a vcpu context
switch, or increase of xcr0_accum.  There are no much problems with current
in-tree code.

Explicitly permit a NULL guest handle as being a request for size.  It is the
prevailing Xen style, and without it, valgrind's ioctl handler is unable to
determine whether evc->buffer actually got written to.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domctl.c