lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201104035027.GA17702@shuo-intel.sh.intel.com>
Date:   Wed, 4 Nov 2020 11:50:27 +0800
From:   Shuo A Liu <shuo.a.liu@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Yu Wang <yu1.wang@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Yin Fengwei <fengwei.yin@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>
Subject: Re: [PATCH v5 03/17] x86/acrn: Introduce an API to check if a VM is
 privileged

On Tue  3.Nov'20 at 11:25:38 +0100, Borislav Petkov wrote:
>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?

OK. It documents the leaf number.

>
>Now where is yours explaining what your hypervisor is doing?

Currently, it is in arch/x86/include/asm/acrn.h.

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

Sure.

If the leaf numbers be documented explicitly (like kvm), i think i can
use them as eax of cpuid_eax() directly (back to your first comment).
	cpuid_eax(ACRN_CPUID_FEATURES)...

If you looking at implementation of acrn-hypervisor, you will found the
leaf number is hardcoded in the hypervisor. So, they also can be
documented explicitly.

>
>> 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.

OK. I can add a similar cpuid.rst for acrn.

>
>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
>
>https://github.com/projectacrn/acrn-hypervisor
>
>?

Yes. Fix patches are always welcome.

>
>> 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.


Thanks
shuo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ