Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-03 Thread Pu Wen
On 2019/4/3 18:22, Jan Beulich wrote: On 03.04.19 at 12:05, wrote: I'm a little confused about which style to follow? In v3 series I followed the style of the derived code. But in other patch you told me to follow the Xen coding style, so in v4 series I changed the style to match the bracing

Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-03 Thread Jan Beulich
>>> On 03.04.19 at 12:05, wrote: > On 2019/4/3 16:43, Jan Beulich wrote: >> On 30.03.19 at 11:42, wrote: >>> +static void init_hygon(struct cpuinfo_x86 *c) >>> +{ >>> + unsigned long long value; >>> + >>> + /* Attempt to set LFENCE to be Dispatch Serialising. */ >>> + if

Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-03 Thread Pu Wen
On 2019/4/3 16:43, Jan Beulich wrote: On 30.03.19 at 11:42, wrote: +static void init_hygon(struct cpuinfo_x86 *c) +{ + unsigned long long value; + + /* Attempt to set LFENCE to be Dispatch Serialising. */ + if (rdmsr_safe(MSR_AMD64_DE_CFG, value)) + /* Unable to

Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-03 Thread Jan Beulich
>>> On 30.03.19 at 11:42, wrote: > +static void init_hygon(struct cpuinfo_x86 *c) > +{ > + unsigned long long value; > + > + /* Attempt to set LFENCE to be Dispatch Serialising. */ > + if (rdmsr_safe(MSR_AMD64_DE_CFG, value)) > + /* Unable to read. Assume the safer

Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-02 Thread Pu Wen
On 2019/4/2 20:16, Andrew Cooper wrote: > On 30/03/2019 10:42, Pu Wen wrote: >> +static const struct cpu_dev hygon_cpu_dev = { >> +.c_vendor = "Hygon", >> +.c_ident= { "HygonGenuine" }, >> +.c_early_init = early_init_amd, >> +.c_init = init_hygon, >> +}; >>

Re: [Xen-devel] [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file

2019-04-02 Thread Andrew Cooper
On 30/03/2019 10:42, Pu Wen wrote: > +static const struct cpu_dev hygon_cpu_dev = { > + .c_vendor = "Hygon", > + .c_ident= { "HygonGenuine" }, > + .c_early_init = early_init_amd, > + .c_init = init_hygon, > +}; > + > +int __init hygon_init_cpu(void) > +{ > +