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: <70ac7c29-6d04-b08a-f057-0461da19c307@gmail.com>
Date:   Wed, 8 Dec 2021 23:12:37 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     "bp@...en8.de" <bp@...en8.de>
Cc:     linux-kernel@...r.kernel.org, vkuznets@...hat.com,
        brijesh.singh@....com, konrad.wilk@...cle.com, hch@....de,
        wei.liu@...nel.org, robin.murphy@....com, joro@...tes.org,
        parri.andrea@...il.com, dave.hansen@...el.com,
        linux-hyperv@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com, thomas.lendacky@....com, Tianyu.Lan@...rosoft.com,
        michael.h.kelley@...rosoft.com, kys@...rosoft.com
Subject: Re: [PATCH V6.1] x86/hyper-v: Add hyperv Isolation VM check in the
 cc_platform_has()

On 12/8/2021 10:52 PM, Tianyu Lan wrote:
> From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
> 
> Hyper-V provides Isolation VM which encrypt guest memory. In
> isolation VM, swiotlb bounce buffer size needs to adjust
> according to memory size in the sev_setup_arch(). Add GUEST_MEM_
> ENCRYPT check in the Isolation VM.
> 
> Signed-off-by: Tianyu Lan <Tianyu.Lan@...rosoft.com>

Hi Boris:
	Could you check whether this version is ok with you?

Thanks.

> ---
> Change since v6:
> 	* Change the order in the cc_platform_has() and check sev first.
> 
> Change since v3:
> 	* Change code style of checking GUEST_MEM attribute in the
> 	  hyperv_cc_platform_has().
> ---
>   arch/x86/kernel/cc_platform.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/arch/x86/kernel/cc_platform.c b/arch/x86/kernel/cc_platform.c
> index 03bb2f343ddb..6cb3a675e686 100644
> --- a/arch/x86/kernel/cc_platform.c
> +++ b/arch/x86/kernel/cc_platform.c
> @@ -11,6 +11,7 @@
>   #include <linux/cc_platform.h>
>   #include <linux/mem_encrypt.h>
>   
> +#include <asm/mshyperv.h>
>   #include <asm/processor.h>
>   
>   static bool __maybe_unused intel_cc_platform_has(enum cc_attr attr)
> @@ -58,12 +59,19 @@ static bool amd_cc_platform_has(enum cc_attr attr)
>   #endif
>   }
>   
> +static bool hyperv_cc_platform_has(enum cc_attr attr)
> +{
> +	return attr == CC_ATTR_GUEST_MEM_ENCRYPT;
> +}
>   
>   bool cc_platform_has(enum cc_attr attr)
>   {
>   	if (sme_me_mask)
>   		return amd_cc_platform_has(attr);
>   
> +	if (hv_is_isolation_supported())
> +		return hyperv_cc_platform_has(attr);
> +
>   	return false;
>   }
>   EXPORT_SYMBOL_GPL(cc_platform_has);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ