[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 22/31] xen/x86: allow disabling all emulated devices inside of Xen
On 07/08/15 11:17, Roger Pau Monne wrote: > 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@xxxxxxxxxx> > Cc: Jan Beulich <jbeulich@xxxxxxxx> > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > xen/arch/x86/domain.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c > index c508074..432fe43 100644 > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -563,7 +563,8 @@ int arch_domain_create(struct domain *d, unsigned int > domcr_flags, > XEN_X86_EMU_IOAPIC | XEN_X86_EMU_PIC | > XEN_X86_EMU_PMU | XEN_X86_EMU_VGA | > XEN_X86_EMU_IOMMU); > - if ( (config->emulation_flags & emulation_mask) != emulation_mask ) > + if ( (config->emulation_flags & emulation_mask) != emulation_mask && > + (config->emulation_flags & emulation_mask) != 0 ) > { > printk(XENLOG_G_ERR "d%d: Xen does not allow HVM creation with > the " > "current selection of emulators: %#x.\n", d->domain_id, Thinking about it, it might be better to have a first check against ~emulation_mask (returning -EINVAL for an unknown emulator selection), and a second check for == mask || == 0 (returning -EOPNOTSUP for an unsupported combination of valid emulators). This will have a knockon effect effect on patch 12. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |