Re: [RFC PATCH v3 2/4] x86: Add the support of ACRN guest

From: Zhao, Yakui
Date: Thu Apr 11 2019 - 20:41:07 EST




On 2019å04æ11æ 21:49, Borislav Petkov wrote:
On Wed, Apr 10, 2019 at 05:15:48PM +0800, Zhao, Yakui wrote:
Currently the x2apic is not enabled in the first step.
Next step it needs to check the cpu info reported by ACRN hypervisor to
determine whether the x2apic should be supported.

What "cpu info"? CPUID or something ACRN-specific?

It is based on CPUID.
The low-level ACRN hypervisor can return the different output of CPUID when several linux guests executes the CPUID instruction. Then it can control whether x2apic is supported in one linux guest.

So we will leverage the X86_FEATURE_X2APIC bit from CPUID to indicate whether the x2apic is supported in linux guest when ACRN hypervisor is detected.
Is this fine to you?

Thanks