[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-next v2 09/10] x86/domain: move PV specific code to pv/domain.c
On Wed, Apr 26, 2017 at 07:26:29AM -0600, Jan Beulich wrote: > >>> On 26.04.17 at 14:46, <andrew.cooper3@xxxxxxxxxx> wrote: > > On 26/04/17 13:39, Jan Beulich wrote: > >>>>> On 25.04.17 at 16:52, <andrew.cooper3@xxxxxxxxxx> wrote: > >>> On 25/04/17 14:52, Wei Liu wrote: > >>>> - fail: > >>>> - pv_domain_destroy(d); > >>>> - > >>>> - return rc; > >>>> -} > >>>> - > >>>> +void paravirt_ctxt_switch_from(struct vcpu *v); > >>>> +void paravirt_ctxt_switch_to(struct vcpu *v); > >>>> int arch_domain_create(struct domain *d, unsigned int domcr_flags, > >>>> struct xen_arch_domainconfig *config) > >>>> { > >>>> @@ -1919,7 +1717,8 @@ static void save_segments(struct vcpu *v) > >>>> > >>>> #define switch_kernel_stack(v) ((void)0) > >>>> > >>>> -static void paravirt_ctxt_switch_from(struct vcpu *v) > >>>> +/* Needed by PV guests */ > >>>> +void paravirt_ctxt_switch_from(struct vcpu *v) > >>>> { > >>> Could these be moved up to avoid the forward declarations above? > >> Moved up? I don't see why they're not simply being moved to > >> pv/domain.c and kept static there (suitably placed so that the > >> forward declarations don't need to be retained). As their names > >> say, they're very PV-specific... > > > > They are also used by idle_csw, whose setup remains in this file. > > Oh, right. But then their declarations should move into a header, > instead of being done in two(!) source files. That'll then also > eliminate any ordering constraints. > That was how it was done in v1. But I opted to not do that in v2 because I had a long term plan to split out idle domain routines. It is rather easy to accumulate kludge in header files like that. But in the end I don't care to argue for this. If that's how you want it to be done, then I'm fine with it too. Wei. > Jan > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |