[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 4/6] x86/PV: allow PV guests to have an emulated PIT
On Fri, 2016-01-22 at 03:48 -0700, Jan Beulich wrote: > > > > On 21.01.16 at 17:51, <roger.pau@xxxxxxxxxx> wrote: > > This fixes the fallout from the HVMlite series, that removed the > > emulated > > PIT from PV(H) guests. Also, this patch forces the hardware domain to > > always have an emulated PIT, regardless of whether the toolstack > > specified > > one or not. > > > > Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> > > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > albeit ... > > > --- a/xen/arch/x86/domain.c > > +++ b/xen/arch/x86/domain.c > > @@ -542,8 +542,11 @@ int arch_domain_create(struct domain *d, unsigned > > int > > domcr_flags, > > ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂd->domain_id, config->emulation_flags); > > ÂÂÂÂÂÂÂÂÂÂÂÂÂreturn -EINVAL; > > ÂÂÂÂÂÂÂÂÂ} > > +ÂÂÂÂÂÂÂÂif ( is_hardware_domain(d) ) > > +ÂÂÂÂÂÂÂÂÂÂÂÂconfig->emulation_flags |= XEN_X86_EMU_PIT; > > ÂÂÂÂÂÂÂÂÂif ( config->emulation_flags != 0 && > > -ÂÂÂÂÂÂÂÂÂÂÂÂÂ(!is_hvm_domain(d) || config->emulation_flags != > > XEN_X86_EMU_ALL) ) > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ(is_hvm_domain(d) ? (config->emulation_flags != > > XEN_X86_EMU_ALL) : > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(config->emulation_flags != > > XEN_X86_EMU_PIT)) ) > > ÂÂÂÂÂÂÂÂÂ{ > > ... you having chosen the != route instead of the suggested & > one, I guess I'll take the liberty to further simplify this while > committing (as the ?: is now only needed on the right side of the > != and I'm generally of the opinion that redundancy like this is > hampering readability). Readability would be even greater IMHO with the use of a "required_emulation_flags" variable suitably initialised and then checked, compared with the use of bitops etc. > > Jan > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |