]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
x86: allow disabling all emulated devices inside of Xen
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 15 Dec 2015 13:11:49 +0000 (14:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Dec 2015 13:11:49 +0000 (14:11 +0100)
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>
xen/arch/x86/domain.c

index 2a8d5c12dabbb385f90762df6be787d4faf2e016..df40dc6d16c03920542887cbee8c667113e29858 100644 (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",