[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RESEND v5 04/24] x86: refactor psr: implement CPU init and free flow.
On 31/01/17 02:44, Konrad Rzeszutek Wilk wrote: > On Thu, Jan 19, 2017 at 02:01:06PM +0800, Yi Sun wrote: >> This patch implements the CPU init and free flow including L3 CAT >> initialization and feature list free. >> >> Signed-off-by: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> >> --- >> v5: >> - modify commit message beacuse of code changes. >> - add 'struct cpuid_leaf_regs' to save cpu registers value to reduce >> parameters of init_feature function. >> - modify comments to make them accurate. >> - modify variables names to make them better, e.g. 'feat_tmp' to 'feat'. >> - use 'list_for_each_entry_safe' when free features. >> - do not delete 'feat_l3_cat' to make it can be reused when cpu online. >> - use 'current_cpu_data'. >> - clear 'X86_FEATURE_PQE' if cpuid_level is not right. >> - Print socket info when 'opt_cpu_info' is true. >> - remove 'cpu_prepare_work' function and move contents of it into >> 'psr_cpu_prepare'. >> --- >> xen/arch/x86/psr.c | 176 >> ++++++++++++++++++++++++++++++++++++++++++++++++++++- >> 1 file changed, 174 insertions(+), 2 deletions(-) >> >> diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c >> index f7ff3fc..e9dc07a 100644 >> --- a/xen/arch/x86/psr.c >> +++ b/xen/arch/x86/psr.c >> @@ -35,6 +35,9 @@ >> #define PSR_CAT (1<<1) >> #define PSR_CDP (1<<2) >> >> +#define CAT_CBM_LEN_MASK 0x1f >> +#define CAT_COS_MAX_MASK 0xffff >> + >> /* >> * Per SDM chapter 'Cache Allocation Technology: Cache Mask Configuration', >> * the MSRs range from 0C90H through 0D0FH (inclusive), enables support for >> @@ -127,6 +130,13 @@ struct feat_node { >> struct list_head list; >> }; >> >> +struct cpuid_leaf_regs { >> + unsigned int eax; >> + unsigned int ebx; >> + unsigned int ecx; >> + unsigned int edx; >> +}; > Could you use 'struct cpuid_leaf' in x86_emulate.h ? > > It would only require "#include <asm/x86_emulate.h>" I believe. I expect my cpuid_leaf work is newer than this series. If there are going to be external users, I would also recommend moving the cpuid_{,count}_leaf() helpers to static inlines in cpuid.h. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |