[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 03/17] x86/acrn: Introduce an API to check if a VM is privileged
On Tue, Nov 03, 2020 at 02:27:18PM +0800, Shuo A Liu wrote:
> The code just followed KVM style (see kvm_arch_para_features()).

Do you see Documentation/virt/kvm/cpuid.rst?

Now where is yours explaining what your hypervisor is doing?

> I can change to use
> cpuid_eax(acrn_cpuid_base() + 1)...
> If you prefer to.

Yes please.

> hypervisor_cpuid_base() implies the base is variable, no? We use
> this function to detect the base.

Yes, but you need to document all that and make it clear and
understandable. If Linux is supposed to run as an acrn guest, that
interface better be documented just like KVM does.

Also, if there's a bug in the KVM guest/host interface, we might be able
to fix it modulo ABI. Is that possible with acrn?

I'm guessing the answer to that is yes if I'm looking at


> OK. Then i will define acrn_cpuid_base() as a static inline function
> in asm/acrn.h for callers.

Yah, that function is simple enough.



 \ /
  Last update: 2020-11-03 11:26    [W:0.127 / U:1.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site