[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 06/31] cpufreq: make cpufreq driver more generalizable
On Wed, 6 Dec 2017, Jan Beulich wrote: > >>> On 05.12.17 at 21:48, <sstabellini@xxxxxxxxxx> wrote: > > You are right. We need to define a new struct for internal usage, for > > example: > > > > struct xen_processor_performance_internal { > > uint32_t flags; /* flag for Px sub info type */ > > uint32_t platform_limit; /* Platform limitation on freq usage */ > > struct xen_pct_register control_register; > > struct xen_pct_register status_register; > > uint32_t state_count; /* total available performance states */ > > struct xen_processor_px states; > > struct xen_psd_package domain_info; > > uint32_t shared_type; /* coordination type of this processor */ > > }; > > > > Jan, Andrew, does this sound like a good approach to you? > > I'm afraid I don't have the time to go through this discussion (and > the original patch) in detail to figure out the full context in which > you raise the question. IOW please summarize things alongside > the proposed structure, or alternatively Oleksandr could simply > submit an updated patch to allow seeing the actual context > (albeit in any case I can't promise timely feedback, given the > number of pending patches plus all the work I still hope to be > able to get done myself eventually. > > >From a brief check, I can't really figure much of a difference to > the already existing (and internal) struct processor_performance. Fair enough. Actually you have a good eye for being able to spot your name in one of so many patch replies :-) Oleksandr would like to call set_px_pminfo from a non-hypercall context, meaning that there are no XEN_GUEST_HANDLE parameters. Today, struct xen_processor_performance contains a XEN_GUEST_HANDLE(xen_processor_px_t) states; field. Instead of "faking" the XEN_GUEST_HANDLE field from Xen, I suggested to modify set_px_pminfo to take a different struct, one without any XEN_GUEST_HANDLE field. For example: struct xen_processor_performance_internal { uint32_t flags; /* flag for Px sub info type */ uint32_t platform_limit; /* Platform limitation on freq usage */ struct xen_pct_register control_register; struct xen_pct_register status_register; uint32_t state_count; /* total available performance states */ struct xen_processor_px states; <---- this is the interesting change struct xen_psd_package domain_info; uint32_t shared_type; /* coordination type of this processor */ }; The caller, in the x86 case is xen/arch/x86/platform_hypercall.c:do_platform_op, would be resposible for issuing the copy_from_guest. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |