Re: [Xen-devel] [PATCH v9.1 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-30 Thread Yi Sun
TL_psr_alloc > > 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc > > 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM > > 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_get_l3_info > > > > Signed-off-by: Yi Sun > > Reviewed-by: Wei Liu >

[Xen-devel] [PATCH v9.1 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-24 Thread Yi Sun
ove 'CAT_' from some macros. E.g.: 1. psr_cat_op -> psr_alloc 2. XEN_DOMCTL_psr_cat_op -> XEN_DOMCTL_psr_alloc 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_ge

[Xen-devel] Is that possible to merge MBA into Xen 4.10?

2017-10-23 Thread Yi Sun
Hi, all, As you may know, MBA patch set has got enough Reviewed-by/Acked-by in last week. It is ready to be merged. This is a feature for Skylake, Intel has launched Skylake and KVM already supported MBA, so including it in Xen 4.10 will quickly fill this gap. MBA missed the 4.10 feature freeze

[Xen-devel] [PATCH v9 10/16] tools: implement the new libxc get hw info interface

2017-10-20 Thread Yi Sun
This patch implements a new libxc get hw info interface and corresponding data structures. It also changes libxl_psr.c to call this new interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v6

[Xen-devel] [PATCH v9 07/16] x86: implement get value interface for MBA

2017-10-20 Thread Yi Sun
This patch implements get value domctl interface for MBA. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use newly defined macro to get MBA thrtl. (suggested by

[Xen-devel] [PATCH v9 06/16] x86: implement get hw info flow for MBA

2017-10-20 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v7: - change

[Xen-devel] [PATCH v9 15/16] tools: implement new generic set value interface and MBA set value command

2017-10-20 Thread Yi Sun
This patch implements new generic set value interfaces in libxc and libxl. These interfaces are suitable for all allocation features. It also adds a new MBA set value command in xl. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger

[Xen-devel] [PATCH v9 13/16] tools: rename 'xc_psr_cat_type' to 'xc_psr_type'

2017-10-20 Thread Yi Sun
This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v9 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-10-20 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: W

[Xen-devel] [PATCH v9 03/16] x86: rename 'cbm_type' to 'psr_type' to make it general

2017-10-20 Thread Yi Sun
This patch renames 'cbm_type' to 'psr_type' to generalize it. Then, we can reuse this for all psr allocation features. Signed-off-by: Yi Sun Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC:

[Xen-devel] [PATCH v9 14/16] tools: implement new generic get value interface and MBA get value command

2017-10-20 Thread Yi Sun
This patch implements generic get value interfaces in libxc and libxl. It also refactors the get value flow in xl to make it be suitable for all allocation features. Based on that, a new MBA get value command is added in xl. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné

[Xen-devel] [PATCH v9 05/16] x86: implement data structure and CPU init flow for MBA

2017-10-20 Thread Yi Sun
register of MBA stores a throttle value for one or more domains. The throttle value means the delay applied to traffic between L2 cache and next cache level. This patch also implements init flow for MBA and register stub callback functions. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Reviewed

[Xen-devel] [PATCH v9 04/16] x86: a few optimizations to psr codes

2017-10-20 Thread Yi Sun
7; to reduce calling of 'cpuid_count_leaf()'. 4. Change 'PSR_INFO_IDX_CAT_FLAG' to 'PSR_INFO_IDX_CAT_FLAGS'. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné C

[Xen-devel] [PATCH v9 16/16] docs: add MBA description in docs

2017-10-20 Thread Yi Sun
This patch adds MBA description in related documents. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - remove 'closed-loop' in 'xl-psr.markdown' (suggested by

[Xen-devel] [PATCH v9 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-20 Thread Yi Sun
ove 'CAT_' from some macros. E.g.: 1. psr_cat_op -> psr_alloc 2. XEN_DOMCTL_psr_cat_op -> XEN_DOMCTL_psr_alloc 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_ge

[Xen-devel] [PATCH v9 11/16] tools: implement the new libxl get hw info interface

2017-10-20 Thread Yi Sun
x27;libxl_psr_get_hw_info' to avoid redundant code in libxl_psr.c. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v5: - change 'if (rc < 0)' to 'if (rc)'. (sugges

[Xen-devel] [PATCH v9 12/16] tools: implement the new xl get hw info interface

2017-10-20 Thread Yi Sun
This patch implements a new xl get HW info interface. A new argument is added for psr-hwinfo command to get and show MBA HW info. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v3: - change the

[Xen-devel] [PATCH v9 09/16] tools: create general interfaces to support psr allocation features

2017-10-20 Thread Yi Sun
This patch creates general interfaces in libxl to support all psr allocation features. Add 'LIBXL_HAVE_PSR_GENERIC' to indicate interface change. Please note, the functionality cannot work until later patches are applied. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-b

[Xen-devel] [PATCH v9 08/16] x86: implement set value flow for MBA

2017-10-20 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v9: - adjust codes in 'mba_sanitize_

[Xen-devel] [PATCH v9 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-20 Thread Yi Sun
ocs: add MBA description in docs --- V9 change list: Patch 8: - adjust codes in 'mba_sanitize_thrtl'. (suggested by Jan Beulich) Yi Sun (16): docs: create Memory Bandwidth Allocation (MBA) feature document Rename PSR sysctl/domctl interfaces and xsm policy to make them be

Re: [Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-19 Thread Yi Sun
On 17-10-20 09:20:00, Yi Sun wrote: > On 17-10-19 16:08:09, Konrad Rzeszutek Wilk wrote: > > On Mon, Oct 16, 2017 at 11:04:05AM +0800, Yi Sun wrote: > > > a - Acked-by > > > r - Reviewed-by > > > > > > r patch 1 - docs: create Memory Bandw

Re: [Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-19 Thread Yi Sun
On 17-10-19 16:08:09, Konrad Rzeszutek Wilk wrote: > On Mon, Oct 16, 2017 at 11:04:05AM +0800, Yi Sun wrote: > > Hi, all, > > > > We plan to bring a new PSR (Platform Shared Resource) feature called > > Intel Memory Bandwidth Allocation (MBA) to Xen. > > > &

Re: [Xen-devel] [PATCH v9 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-19 Thread Yi Sun
On 17-10-19 05:36:37, Jan Beulich wrote: > >>> On 19.10.17 at 03:22, wrote: > > v9: > > - bump domctl/sysctl version number as this patch missed 4.10. > > And add info in commit message. > > (suggested by Jan Beulich) > > I don't understand this - I've specifically given reason wh

[Xen-devel] [PATCH v9 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-18 Thread Yi Sun
et_l3_info Bump domctl/sysctl version number. Signed-off-by: Yi Sun Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich Acked-by: Daniel De Graaf --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Ian Jackson CC: Daniel De Graaf CC: Roger Pau Monné CC: Chao Peng

Re: [Xen-devel] [PATCH v9 08/16] x86: implement set value flow for MBA

2017-10-16 Thread Yi Sun
I forgot to add 'Reviewed-by' provided by Jan. So please ignore this but refer v9.1. Thanks! On 17-10-17 09:04:18, Yi Sun wrote: > This patch implements set value flow for MBA including its callback > function and domctl interface. > >

[Xen-devel] [PATCH v9.1 08/16] x86: implement set value flow for MBA

2017-10-16 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v9: - adjust codes in 'mba_sanitize_

[Xen-devel] [PATCH v9 08/16] x86: implement set value flow for MBA

2017-10-16 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v9: - adjust codes in 'mba_sanitize_thrtl'. (suggested by Jan B

Re: [Xen-devel] [PATCH v8 08/16] x86: implement set value flow for MBA

2017-10-16 Thread Yi Sun
On 17-10-16 06:49:49, Jan Beulich wrote: > >>> On 16.10.17 at 05:04, wrote: > > This patch implements set value flow for MBA including its callback > > function and domctl interface. > > > > Signed-off-by: Yi Sun > > Reviewed-by: Jan Beulich >

[Xen-devel] [PATCH v8 11/16] tools: implement the new libxl get hw info interface

2017-10-15 Thread Yi Sun
x27;libxl_psr_get_hw_info' to avoid redundant code in libxl_psr.c. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v5: - change 'if (rc < 0)' to 'if (rc)'. (sugges

[Xen-devel] [PATCH v8 07/16] x86: implement get value interface for MBA

2017-10-15 Thread Yi Sun
This patch implements get value domctl interface for MBA. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use newly defined macro to get MBA thrtl. (suggested by

[Xen-devel] [PATCH v8 16/16] docs: add MBA description in docs

2017-10-15 Thread Yi Sun
This patch adds MBA description in related documents. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - remove 'closed-loop' in 'xl-psr.markdown' (suggested by

[Xen-devel] [PATCH v8 08/16] x86: implement set value flow for MBA

2017-10-15 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v8: - restore some unnecessary changes in 'cat_check_cbm'. (su

[Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-15 Thread Yi Sun
ary changes in 'cat_check_cbm'. (suggested by Jan Beulich) - use 'fls()' but not 'flsl()'. (suggested by Jan Beulich) - use plain '=' to assign value for thrtl in 'mba_sanitize_thrtl'. (suggested by Jan Beulich) Yi Sun (16)

[Xen-devel] [PATCH v8 15/16] tools: implement new generic set value interface and MBA set value command

2017-10-15 Thread Yi Sun
This patch implements new generic set value interfaces in libxc and libxl. These interfaces are suitable for all allocation features. It also adds a new MBA set value command in xl. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger

[Xen-devel] [PATCH v8 10/16] tools: implement the new libxc get hw info interface

2017-10-15 Thread Yi Sun
This patch implements a new libxc get hw info interface and corresponding data structures. It also changes libxl_psr.c to call this new interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v6

[Xen-devel] [PATCH v8 09/16] tools: create general interfaces to support psr allocation features

2017-10-15 Thread Yi Sun
This patch creates general interfaces in libxl to support all psr allocation features. Add 'LIBXL_HAVE_PSR_GENERIC' to indicate interface change. Please note, the functionality cannot work until later patches are applied. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-b

[Xen-devel] [PATCH v8 12/16] tools: implement the new xl get hw info interface

2017-10-15 Thread Yi Sun
This patch implements a new xl get HW info interface. A new argument is added for psr-hwinfo command to get and show MBA HW info. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v3: - change the

[Xen-devel] [PATCH v8 14/16] tools: implement new generic get value interface and MBA get value command

2017-10-15 Thread Yi Sun
This patch implements generic get value interfaces in libxc and libxl. It also refactors the get value flow in xl to make it be suitable for all allocation features. Based on that, a new MBA get value command is added in xl. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné

[Xen-devel] [PATCH v8 13/16] tools: rename 'xc_psr_cat_type' to 'xc_psr_type'

2017-10-15 Thread Yi Sun
This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v8 06/16] x86: implement get hw info flow for MBA

2017-10-15 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v7: - change

[Xen-devel] [PATCH v8 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-10-15 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: W

[Xen-devel] [PATCH v8 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-15 Thread Yi Sun
ove 'CAT_' from some macros. E.g.: 1. psr_cat_op -> psr_alloc 2. XEN_DOMCTL_psr_cat_op -> XEN_DOMCTL_psr_alloc 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_ge

[Xen-devel] [PATCH v8 04/16] x86: a few optimizations to psr codes

2017-10-15 Thread Yi Sun
7; to reduce calling of 'cpuid_count_leaf()'. 4. Change 'PSR_INFO_IDX_CAT_FLAG' to 'PSR_INFO_IDX_CAT_FLAGS'. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné C

[Xen-devel] [PATCH v8 05/16] x86: implement data structure and CPU init flow for MBA

2017-10-15 Thread Yi Sun
register of MBA stores a throttle value for one or more domains. The throttle value means the delay applied to traffic between L2 cache and next cache level. This patch also implements init flow for MBA and register stub callback functions. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Reviewed

[Xen-devel] [PATCH v8 03/16] x86: rename 'cbm_type' to 'psr_type' to make it general

2017-10-15 Thread Yi Sun
This patch renames 'cbm_type' to 'psr_type' to generalize it. Then, we can reuse this for all psr allocation features. Signed-off-by: Yi Sun Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC:

Re: [Xen-devel] [PATCH v7 08/16] x86: implement set value flow for MBA

2017-10-15 Thread Yi Sun
On 17-10-13 09:56:14, Jan Beulich wrote: > >>> On 13.10.17 at 10:41, wrote: > > @@ -274,16 +280,18 @@ static enum psr_feat_type psr_type_to_feat_type(enum > > psr_type type) > > return feat_type; > > } > > > > -static bool psr_check_cbm(unsigned int cbm_len, unsigned long cbm) > > +/* Imp

[Xen-devel] [PATCH v7 16/16] docs: add MBA description in docs

2017-10-13 Thread Yi Sun
This patch adds MBA description in related documents. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - remove 'closed-loop' in 'xl-psr.markdown' (suggested by

[Xen-devel] [PATCH v7 06/16] x86: implement get hw info flow for MBA

2017-10-13 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v7: - change

[Xen-devel] [PATCH v7 07/16] x86: implement get value interface for MBA

2017-10-13 Thread Yi Sun
This patch implements get value domctl interface for MBA. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use newly defined macro to get MBA thrtl. (suggested by

[Xen-devel] [PATCH v7 08/16] x86: implement set value flow for MBA

2017-10-13 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v7: - change name of 'check_val' to 'sanitize'. (sugg

[Xen-devel] [PATCH v7 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-10-13 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: W

[Xen-devel] [PATCH v7 13/16] tools: rename 'xc_psr_cat_type' to 'xc_psr_type'

2017-10-13 Thread Yi Sun
This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v7 15/16] tools: implement new generic set value interface and MBA set value command

2017-10-13 Thread Yi Sun
This patch implements new generic set value interfaces in libxc and libxl. These interfaces are suitable for all allocation features. It also adds a new MBA set value command in xl. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger

[Xen-devel] [PATCH v7 14/16] tools: implement new generic get value interface and MBA get value command

2017-10-13 Thread Yi Sun
This patch implements generic get value interfaces in libxc and libxl. It also refactors the get value flow in xl to make it be suitable for all allocation features. Based on that, a new MBA get value command is added in xl. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné

[Xen-devel] [PATCH v7 09/16] tools: create general interfaces to support psr allocation features

2017-10-13 Thread Yi Sun
This patch creates general interfaces in libxl to support all psr allocation features. Add 'LIBXL_HAVE_PSR_GENERIC' to indicate interface change. Please note, the functionality cannot work until later patches are applied. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-b

[Xen-devel] [PATCH v7 10/16] tools: implement the new libxc get hw info interface

2017-10-13 Thread Yi Sun
This patch implements a new libxc get hw info interface and corresponding data structures. It also changes libxl_psr.c to call this new interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v6

[Xen-devel] [PATCH v7 04/16] x86: a few optimizations to psr codes

2017-10-13 Thread Yi Sun
7; to reduce calling of 'cpuid_count_leaf()'. 4. Change 'PSR_INFO_IDX_CAT_FLAG' to 'PSR_INFO_IDX_CAT_FLAGS'. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné C

[Xen-devel] [PATCH v7 11/16] tools: implement the new libxl get hw info interface

2017-10-13 Thread Yi Sun
x27;libxl_psr_get_hw_info' to avoid redundant code in libxl_psr.c. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v5: - change 'if (rc < 0)' to 'if (rc)'. (sugges

[Xen-devel] [PATCH v7 05/16] x86: implement data structure and CPU init flow for MBA

2017-10-13 Thread Yi Sun
register of MBA stores a throttle value for one or more domains. The throttle value means the delay applied to traffic between L2 cache and next cache level. This patch also implements init flow for MBA and register stub callback functions. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC

[Xen-devel] [PATCH v7 12/16] tools: implement the new xl get hw info interface

2017-10-13 Thread Yi Sun
This patch implements a new xl get HW info interface. A new argument is added for psr-hwinfo command to get and show MBA HW info. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v3: - change the

[Xen-devel] [PATCH v7 03/16] x86: rename 'cbm_type' to 'psr_type' to make it general

2017-10-13 Thread Yi Sun
This patch renames 'cbm_type' to 'psr_type' to generalize it. Then, we can reuse this for all psr allocation features. Signed-off-by: Yi Sun Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC:

[Xen-devel] [PATCH v7 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-13 Thread Yi Sun
ignement sentence to use '&='. (suggested by Jan Beulich) - change type of last parameter of 'sanitize' to 'uint32_t' and apply same change to 'cat_check_cbm'. (suggested by Jan Beulich) Yi Sun (16): docs: create Memory Bandw

[Xen-devel] [PATCH v7 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-13 Thread Yi Sun
ove 'CAT_' from some macros. E.g.: 1. psr_cat_op -> psr_alloc 2. XEN_DOMCTL_psr_cat_op -> XEN_DOMCTL_psr_alloc 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_ge

Re: [Xen-devel] [PATCH v6 08/16] x86: implement set value flow for MBA

2017-10-12 Thread Yi Sun
On 17-10-12 03:43:26, Jan Beulich wrote: > >>> On 12.10.17 at 06:33, wrote: > > On 17-10-11 07:38:52, Jan Beulich wrote: > >> >>> On 08.10.17 at 09:23, wrote: > >> > --- a/xen/arch/x86/psr.c > >> > +++ b/xen/arch/x86/psr.c > >> > @@ -138,6 +138,12 @@ static const struct feat_props { > >> > > >>

Re: [Xen-devel] [PATCH v6 08/16] x86: implement set value flow for MBA

2017-10-11 Thread Yi Sun
On 17-10-11 07:38:52, Jan Beulich wrote: > >>> On 08.10.17 at 09:23, wrote: > > --- a/xen/arch/x86/psr.c > > +++ b/xen/arch/x86/psr.c > > @@ -138,6 +138,12 @@ static const struct feat_props { > > > > /* write_msr is used to write out feature MSR register. */ > > void (*write_msr)(unsig

Re: [Xen-devel] [PATCH v5] x86: psr: support co-exist features' values setting

2017-10-11 Thread Yi Sun
Many thanks for the changes! The changes look good to me and pass the test. On 17-10-11 06:06:49, Jan Beulich wrote: > >>> On 11.10.17 at 09:20, wrote: > > --- a/xen/arch/x86/psr.c > > +++ b/xen/arch/x86/psr.c > > @@ -,25 +,43 @@ static unsigned int get_socket_cpu(unsigned int > > socket

[Xen-devel] [PATCH v5] x86: psr: support co-exist features' values setting

2017-10-11 Thread Yi Sun
d be below. - | COS 3 | - L3 CAT | 0x1ff | - L2 CAT | 0xf | - Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Julien Grall v5: - remove 'result'

Re: [Xen-devel] [PATCH v4] x86: psr: support co-exist features' values setting

2017-10-11 Thread Yi Sun
On 17-10-11 14:59:23, Chao Peng wrote: > On Wed, 2017-10-11 at 09:55 +0800, Yi Sun wrote: > >  static void do_write_psr_msrs(void *data) > >  { > > -const struct cos_write_info *info = data; > > -struct feat_node *feat = info->feature; > > -const st

[Xen-devel] [PATCH v4] x86: psr: support co-exist features' values setting

2017-10-10 Thread Yi Sun
d be below. - | COS 3 | - L3 CAT | 0x1ff | - L2 CAT | 0xf | - Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Julien Grall v4: - remove init of 'result

[Xen-devel] [PATCH v3] x86: psr: support co-exist features' values setting

2017-10-10 Thread Yi Sun
is set. So, the values on COS ID 3 should be below. - | COS 3 | - L3 CAT | 0x1ff | - L2 CAT | 0xf | - Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Ju

Re: [Xen-devel] [PATCH v2] x86: psr: support co-exist features' values setting

2017-10-09 Thread Yi Sun
On 17-10-09 15:03:25, Roger Pau Monn� wrote: > On Sun, Oct 08, 2017 at 04:22:00AM +0000, Yi Sun wrote: [...] > > static void do_write_psr_msrs(void *data) > > Should this be "static int do_write_psr_msrs"... > This function is a parameter of 'on_selected_cpus

[Xen-devel] [PATCH v6 15/16] tools: implement new generic set value interface and MBA set value command

2017-10-08 Thread Yi Sun
This patch implements new generic set value interfaces in libxc and libxl. These interfaces are suitable for all allocation features. It also adds a new MBA set value command in xl. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger

[Xen-devel] [PATCH v6 07/16] x86: implement get value interface for MBA

2017-10-08 Thread Yi Sun
This patch implements get value domctl interface for MBA. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Andrew Cooper CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use newly defined macro to get MBA thrtl. (suggested by

[Xen-devel] [PATCH v6 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-08 Thread Yi Sun
#x27;check_value'. (suggested by Jan Beulich) Patch 10: - remove unnecessary spaces in brackets. (suggested by Wei Liu) - use assert to check input lvl. (suggested by Roger Pau Monné) Patch 14: - fix one coding style issue. (suggested by Roger Pau Monné) Pat

[Xen-devel] [PATCH v6 13/16] tools: rename 'xc_psr_cat_type' to 'xc_psr_type'

2017-10-08 Thread Yi Sun
This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné

[Xen-devel] [PATCH v6 06/16] x86: implement get hw info flow for MBA

2017-10-08 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use ASSERT in 'mba_get_feat

[Xen-devel] [PATCH v6 11/16] tools: implement the new libxl get hw info interface

2017-10-08 Thread Yi Sun
x27;libxl_psr_get_hw_info' to avoid redundant code in libxl_psr.c. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v5: - change 'if (rc < 0)' to 'if (rc)'. (sugges

[Xen-devel] [PATCH v6 09/16] tools: create general interfaces to support psr allocation features

2017-10-08 Thread Yi Sun
This patch creates general interfaces in libxl to support all psr allocation features. Add 'LIBXL_HAVE_PSR_GENERIC' to indicate interface change. Please note, the functionality cannot work until later patches are applied. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-b

[Xen-devel] [PATCH v6 16/16] docs: add MBA description in docs

2017-10-08 Thread Yi Sun
This patch adds MBA description in related documents. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - remove 'closed-loop' in 'xl-psr.markdown' (suggested by

[Xen-devel] [PATCH v6 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-08 Thread Yi Sun
ove 'CAT_' from some macros. E.g.: 1. psr_cat_op -> psr_alloc 2. XEN_DOMCTL_psr_cat_op -> XEN_DOMCTL_psr_alloc 3. XEN_SYSCTL_psr_cat_op -> XEN_SYSCTL_psr_alloc 4. XEN_DOMCTL_PSR_CAT_SET_L3_CBM -> XEN_DOMCTL_PSR_SET_L3_CBM 5. XEN_SYSCTL_PSR_CAT_get_l3_info -> XEN_SYSCTL_PSR_ge

[Xen-devel] [PATCH v6 04/16] x86: a few optimizations to psr codes

2017-10-08 Thread Yi Sun
it' to reduce calling of 'cpuid_count_leaf()'. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v6: - restore 'write_msr()' type to 'void'. (suggested by Jan

[Xen-devel] [PATCH v6 10/16] tools: implement the new libxc get hw info interface

2017-10-08 Thread Yi Sun
This patch implements a new libxc get hw info interface and corresponding data structures. It also changes libxl_psr.c to call this new interface. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v6

[Xen-devel] [PATCH v6 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-10-08 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC: Andrew Cooper CC: W

[Xen-devel] [PATCH v6 05/16] x86: implement data structure and CPU init flow for MBA

2017-10-08 Thread Yi Sun
register of MBA stores a throttle value for one or more domains. The throttle value means the delay between L2 cache and next cache level. This patch also implements init flow for MBA and register stub callback functions. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Jan Beulich CC

[Xen-devel] [PATCH v6 03/16] x86: rename 'cbm_type' to 'psr_type' to make it general

2017-10-08 Thread Yi Sun
This patch renames 'cbm_type' to 'psr_type' to generalize it. Then, we can reuse this for all psr allocation features. Signed-off-by: Yi Sun Reviewed-by: Wei Liu Reviewed-by: Roger Pau Monné Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC:

[Xen-devel] [PATCH v6 12/16] tools: implement the new xl get hw info interface

2017-10-08 Thread Yi Sun
This patch implements a new xl get HW info interface. A new argument is added for psr-hwinfo command to get and show MBA HW info. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné Acked-by: Wei Liu --- CC: Wei Liu CC: Ian Jackson CC: Roger Pau Monné CC: Chao Peng v3: - change the

[Xen-devel] [PATCH v6 08/16] x86: implement set value flow for MBA

2017-10-08 Thread Yi Sun
This patch implements set value flow for MBA including its callback function and domctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v6: - split co-exist features' values setting flow to a new

[Xen-devel] [PATCH v6 14/16] tools: implement new generic get value interface and MBA get value command

2017-10-08 Thread Yi Sun
This patch implements generic get value interfaces in libxc and libxl. It also refactors the get value flow in xl to make it be suitable for all allocation features. Based on that, a new MBA get value command is added in xl. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Roger Pau Monné

[Xen-devel] [PATCH v2] x86: psr: support co-exist features' values setting

2017-10-07 Thread Yi Sun
is set. So, the values on COS ID 3 should be below. - | COS 3 | - L3 CAT | 0x1ff | - L2 CAT | 0xf | - Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Ju

Re: [Xen-devel] [PATCH v1] x86: psr: support co-exist features' values setting

2017-10-07 Thread Yi Sun
On 17-10-06 15:38:35, Roger Pau Monn� wrote: > On Fri, Oct 06, 2017 at 09:13:00AM +0000, Yi Sun wrote: > > It changes the memebers in 'cos_write_info' to transfer the feature array, > > feature properties array and value array. Then, we can write all features > >

[Xen-devel] [PATCH v1] x86: psr: support co-exist features' values setting

2017-10-06 Thread Yi Sun
ties array and value array are input. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Julien Grall --- xen/arch/x86/psr.c | 51 +++ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/xe

Re: [Xen-devel] [PATCH v4 07/15] x86: implement set value flow for MBA

2017-10-05 Thread Yi Sun
On 17-10-05 02:55:17, Jan Beulich wrote: > >>> On 05.10.17 at 06:48, wrote: > > On 17-10-03 23:59:46, Jan Beulich wrote: > >> >>> Yi Sun 09/29/17 4:58 AM >>> > >> >On 17-09-28 05:36:11, Jan Beulich wrote: > >> >> >>&

Re: [Xen-devel] [PATCH v4 07/15] x86: implement set value flow for MBA

2017-10-05 Thread Yi Sun
On 17-10-05 03:39:06, Jan Beulich wrote: > >>> On 05.10.17 at 10:39, wrote: > > On Thu, Oct 05, 2017 at 04:48:12AM +, Yi Sun wrote: > >> On 17-10-03 23:59:46, Jan Beulich wrote: > >> > >>> Yi Sun 09/29/17 4:58 AM >>> > >> >

Re: [Xen-devel] [PATCH v4 04/15] x86: implement data structure and CPU init flow for MBA

2017-10-05 Thread Yi Sun
On 17-10-05 02:49:59, Jan Beulich wrote: > >>> On 05.10.17 at 06:42, wrote: > > On 17-10-03 23:52:09, Jan Beulich wrote: > >> >>> Yi Sun 09/29/17 3:55 AM >>> > >> >On 17-09-28 05:00:09, Jan Beulich wrote: > >> >> >&

Re: [Xen-devel] [PATCH v4 07/15] x86: implement set value flow for MBA

2017-10-04 Thread Yi Sun
On 17-10-03 23:59:46, Jan Beulich wrote: > >>> Yi Sun 09/29/17 4:58 AM >>> > >On 17-09-28 05:36:11, Jan Beulich wrote: > >> >>> On 23.09.17 at 11:48, wrote: > >> > This patch implements set value flow for MBA including its callback >

Re: [Xen-devel] [PATCH v4 04/15] x86: implement data structure and CPU init flow for MBA

2017-10-04 Thread Yi Sun
On 17-10-03 23:52:09, Jan Beulich wrote: > >>> Yi Sun 09/29/17 3:55 AM >>> > >On 17-09-28 05:00:09, Jan Beulich wrote: > >> >>> On 23.09.17 at 11:48, wrote: > >> > One thrtl register of MBA stores a throttle value for one or more >

[Xen-devel] [PATCH v5 01/16] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-09-29 Thread Yi Sun
This patch creates MBA feature document in doc/features/. It describes key points to implement MBA which is described in details in Intel SDM "Introduction to Memory Bandwidth Allocation". Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Ian Jackson CC:

[Xen-devel] [PATCH v5 11/16] tools: implement the new libxl get hw info interface

2017-09-29 Thread Yi Sun
x27;libxl_psr_get_hw_info' to avoid redundant code in libxl_psr.c. Signed-off-by: Yi Sun Reviewed-by: Roger Pau Monné --- CC: Wei Liu CC: Ian Jackson CC: Chao Peng v5: - change 'if (rc < 0)' to 'if (rc)'. (suggested by Roger Pau Monné) v4: - remove 'x

[Xen-devel] [PATCH v5 08/16] x86: implement set value flow for MBA

2017-09-29 Thread Yi Sun
-- So, we should write all features values into their MSRs. That requires the feature array, feature properties array and value array are input. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - adjust position of 'cat_check

[Xen-devel] [PATCH v5 06/16] x86: implement get hw info flow for MBA

2017-09-29 Thread Yi Sun
This patch implements get HW info flow for MBA including its callback function and sysctl interface. Signed-off-by: Yi Sun --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: Roger Pau Monné CC: Chao Peng v5: - use ASSERT in 'mba_get_feat_info'. (suggested by Roger

  1   2   3   4   5   6   7   8   9   >