From: Roger Pau Monné Date: Tue, 15 Dec 2015 13:11:49 +0000 (+0100) Subject: x86: allow disabling all emulated devices inside of Xen X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2090 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2fa6cfe3a2dc7dcaa1c6b2afadbe92f42dd62301;p=xen.git 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é Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 2a8d5c12da..df40dc6d16 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -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",