On Tue, Aug 07, 2018 at 04:44:13AM -0600, Jan Beulich wrote: > >>> On 07.08.18 at 12:00, <wei.l...@citrix.com> wrote: > > --- a/xen/arch/x86/x86_64/traps.c > > +++ b/xen/arch/x86/x86_64/traps.c > > @@ -352,12 +352,19 @@ void subarch_percpu_traps_init(void) > > void hypercall_page_initialise(struct domain *d, void *hypercall_page) > > { > > memset(hypercall_page, 0xCC, PAGE_SIZE); > > +#if CONFIG_HVM > > if ( is_hvm_domain(d) ) > > hvm_hypercall_page_initialise(d, hypercall_page); > > - else if ( !is_pv_32bit_domain(d) ) > > - hypercall_page_initialise_ring3_kernel(hypercall_page); > > - else > > - hypercall_page_initialise_ring1_kernel(hypercall_page); > > +#endif > > +#if CONFIG_PV > > + if ( is_pv_domain(d) ) > > + { > > + if ( !is_pv_32bit_domain(d) ) > > + hypercall_page_initialise_ring3_kernel(hypercall_page); > > + else > > + hypercall_page_initialise_ring1_kernel(hypercall_page); > > + } > > +#endif > > } > > I'm not convinced: This is uglier to read, and things like is_hvm_domain() > should evaluate to constant false anyway without the respective > CONFIG_* setting enabled.
I take it you are against adding CONFIG_* here? The addition of is_pv_domain branch is still needed because both sets might get compiled out. Wei. > > Jan > > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel