x86: allow disabling all emulated devices inside of Xen

Only allow enabling or disabling all the emulated devices inside of Xen,
right now Xen doesn't support enabling specific emulated devices only.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2015-12-15 14:11:49 +01:00
1 parent fee4100a9e
commit 2fa6cfe3a2
1 file changed
+2 -2
+2 -2
View File
@@ -532,8 +532,8 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags,
d->domain_id, config->emulation_flags);
return -EINVAL;
}
if ( is_hvm_domain(d) ? (config->emulation_flags != XEN_X86_EMU_ALL)
: (config->emulation_flags != 0) )
if ( config->emulation_flags != 0 &&
(!is_hvm_domain(d) || config->emulation_flags != XEN_X86_EMU_ALL) )
{
printk(XENLOG_G_ERR "d%d: Xen does not allow %s domain creation "
"with the current selection of emulators: %#x\n",
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.