x86: refactor psr: L3 CAT: set value: assemble features value array.
authorYi Sun <yi.y.sun@linux.intel.com>
Tue, 1 Aug 2017 09:04:00 +0000 (11:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 3 Aug 2017 10:34:12 +0000 (12:34 +0200)
commit81811cffec3cc090c5d63b5cc09eb7e8512bc3db
treeb9caced6b2c2377f8d052ad498b2e732c0ea3d10
parent38309768652ef8db2a2f4b546e36bdcf154be9c5
x86: refactor psr: L3 CAT: set value: assemble features value array.

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 contains
all features current values and replace the setting feature's value in array
to new value.

Then, we can try to find if there is a COS ID on which all features' COS
registers values are same as the array. If we can find, we just use this COS
ID. If fail to find, we need pick a new COS ID.

This patch implements value array assembling flow.

Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/psr.c