Re: [Xen-devel] [PATCH v10 10/25] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-04-12 Thread Yi Sun
On 17-04-12 03:13:12, Jan Beulich wrote: > >>> On 12.04.17 at 07:55, wrote: > > On 17-04-11 09:11:20, Jan Beulich wrote: > >> >>> On 01.04.17 at 15:53, wrote: > >> > @@ -611,7 +679,40 @@ static int insert_val_to_array(uint32_t val[], > >> > enum cbm_type type, > >>

Re: [Xen-devel] [PATCH v10 10/25] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-04-12 Thread Jan Beulich
>>> On 12.04.17 at 07:55, wrote: > On 17-04-11 09:11:20, Jan Beulich wrote: >> >>> On 01.04.17 at 15:53, wrote: >> > @@ -611,7 +679,40 @@ static int insert_val_to_array(uint32_t val[], >> > enum cbm_type type, >> > uint32_t new_val)

Re: [Xen-devel] [PATCH v10 10/25] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-04-11 Thread Yi Sun
On 17-04-11 09:11:20, Jan Beulich wrote: > >>> On 01.04.17 at 15:53, wrote: > > @@ -593,7 +616,21 @@ int psr_get_val(struct domain *d, unsigned int socket, > > /* Set value functions */ > > static unsigned int get_cos_num(const struct psr_socket_info *info) > > { > > -return 0; > > +uns

Re: [Xen-devel] [PATCH v10 10/25] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-04-11 Thread Jan Beulich
>>> On 01.04.17 at 15:53, wrote: > @@ -593,7 +616,21 @@ int psr_get_val(struct domain *d, unsigned int socket, > /* Set value functions */ > static unsigned int get_cos_num(const struct psr_socket_info *info) > { > -return 0; > +unsigned int num = 0, i; > + > +/* Get all features to

[Xen-devel] [PATCH v10 10/25] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-04-01 Thread Yi Sun
Only can one COS ID be used by one domain at one time. That means all enabled features' COS registers at this COS ID are valid for this domain at that time. When user updates a feature's value, we need make sure all other features' values are not affected. So, we firstly need gather an array which