Re: [PATCH V2 1/6] HV: enumerate capability of #AC for Splitlock Access #ac


Eddie Dong
 

+ /* support #AC for splitlock access? */
+ core_cap = msr_read(MSR_IA32_CORE_CAPABILITIES);
+ if ((core_cap & (1U<<5U)) != 0U) {
+ ac_for_splitlock = true;
No need to introduce ac_for_splitlock. Using FEAT_7_0_EDX, and
cpu_caps for #AC.
Yes, will use pcpu_has_cap (FEAT_7_0_EDX & 0x30U) to get this feature,
do not need ac_for_splitlock
Sorry, I have read the current code again, and think ac_for_splitlock has some
advantage, can we keep it? The FEAT_7_0_EDX just show if
MSR_IA32_CORE_CAPABILITIES is available, and still need to read
MSR_IA32_CORE_CAPABILITIES to see if support #AC for splitlock. If keep this
static variable , we can just detect this feature once.
Use cpu_caps, not a separate variable...

Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.