Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-27 Thread Yi Sun
On 17-04-27 03:39:02, Jan Beulich wrote: > >>> On 27.04.17 at 11:30, wrote: > > I have another solution now. We may move the psr_cos_ids[socket] restore > > action > > into 'psr_get_val' and only set the bit of 'dom_ids[]' in 'psr_set_val'. > > 1. When socket is offline, the dom_ids[] is cleared.

Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-27 Thread Jan Beulich
>>> On 27.04.17 at 11:30, wrote: > I have another solution now. We may move the psr_cos_ids[socket] restore > action > into 'psr_get_val' and only set the bit of 'dom_ids[]' in 'psr_set_val'. > 1. When socket is offline, the dom_ids[] is cleared. > 2. When socket is online, we have four places to

Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-27 Thread Yi Sun
On 17-04-27 00:48:43, Jan Beulich wrote: > >>> On 27.04.17 at 04:38, wrote: > > On 17-04-26 04:04:15, Jan Beulich wrote: > >> >>> On 20.04.17 at 07:38, wrote: > >> > @@ -221,12 +210,17 @@ static void free_socket_resources(unsigned int > >> > socket) > >> > */ > >> > for ( i = 0; i < P

Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-26 Thread Jan Beulich
>>> On 27.04.17 at 04:38, wrote: > On 17-04-26 04:04:15, Jan Beulich wrote: >> >>> On 20.04.17 at 07:38, wrote: >> > @@ -221,12 +210,17 @@ static void free_socket_resources(unsigned int >> > socket) >> > */ >> > for ( i = 0; i < PSR_SOCKET_MAX_FEAT; i++ ) >> > { >> > -if

Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-26 Thread Yi Sun
On 17-04-26 04:04:15, Jan Beulich wrote: > >>> On 20.04.17 at 07:38, wrote: > > --- a/xen/arch/x86/psr.c > > +++ b/xen/arch/x86/psr.c > > @@ -125,6 +125,8 @@ struct feat_node { > > uint32_t cos_reg_val[MAX_COS_REG_CNT]; > > }; > > > > +#define PSR_DOM_IDS_NUM ((DOMID_IDLE + 1) / sizeof(uin

Re: [Xen-devel] [PATCH] dom_ids array implementation.

2017-04-26 Thread Jan Beulich
>>> On 20.04.17 at 07:38, wrote: > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -125,6 +125,8 @@ struct feat_node { > uint32_t cos_reg_val[MAX_COS_REG_CNT]; > }; > > +#define PSR_DOM_IDS_NUM ((DOMID_IDLE + 1) / sizeof(uint32_t)) Instead of this, please use ... > @@ -134,9 +13

[Xen-devel] [PATCH] dom_ids array implementation.

2017-04-19 Thread Yi Sun
Hi, Jan, Please help to review this patch. Thank you! Signed-off-by: Yi Sun --- xen/arch/x86/psr.c | 135 ++--- 1 file changed, 55 insertions(+), 80 deletions(-) diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index a85ea99..7bc212f 100644 -