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>
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",