x86/cpuid: Disallow policy updates once the domain is running

On real hardware, the bulk of CPUID data is system-specific and constant.
Hold the toolstack to the same behaviour when constructing domains.

Values which are expected to change dynamically (e.g. OSXSAVE) are unaffected
and continue to function as before.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2017-02-27 10:07:53 +00:00
1 parent 1f24be6c94
commit 3d0cab7b5d
1 file changed
+2
+2
View File
@@ -941,6 +941,8 @@ long arch_do_domctl(
case XEN_DOMCTL_set_cpuid:
if ( d == currd ) /* no domain_pause() */
ret = -EINVAL;
else if ( d->creation_finished )
ret = -EEXIST; /* No changing once the domain is running. */
else
{
domain_pause(d);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.