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]
Date:   Wed, 23 Aug 2023 15:05:59 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     Dexuan Cui <decui@...rosoft.com>, ak@...ux.intel.com,
        arnd@...db.de, bp@...en8.de, brijesh.singh@....com,
        dan.j.williams@...el.com, dave.hansen@...el.com,
        dave.hansen@...ux.intel.com, haiyangz@...rosoft.com, hpa@...or.com,
        jane.chu@...cle.com, kirill.shutemov@...ux.intel.com,
        kys@...rosoft.com, linux-hyperv@...r.kernel.org, luto@...nel.org,
        mingo@...hat.com, peterz@...radead.org, rostedt@...dmis.org,
        sathyanarayanan.kuppuswamy@...ux.intel.com, seanjc@...gle.com,
        tglx@...utronix.de, tony.luck@...el.com, wei.liu@...nel.org,
        Jason@...c4.com, nik.borisov@...e.com, mikelley@...rosoft.com
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org, Tianyu.Lan@...rosoft.com,
        rick.p.edgecombe@...el.com, andavis@...hat.com, mheslin@...hat.com,
        vkuznets@...hat.com, xiaoyao.li@...el.com
Subject: Re: [PATCH 2/9] x86/hyperv: Support hypercalls for fully enlightened
 TDX guests

On 8/12/2023 6:18 AM, Dexuan Cui wrote:
> A fully enlightened TDX guest on Hyper-V (i.e. without the paravisor) only
> uses the GHCI call rather than hv_hypercall_pg.
> 
> In hv_do_hypercall(), Hyper-V requires that the input/output addresses
> must have the cc_mask.
> 
> Reviewed-by: Kuppuswamy Sathyanarayanan<sathyanarayanan.kuppuswamy@...ux.intel.com>
> Reviewed-by: Michael Kelley<mikelley@...rosoft.com>
> Signed-off-by: Dexuan Cui<decui@...rosoft.com>
> ---

Reviewed-by: Tianyu Lan <tiala@...rosoft.com>

>   arch/x86/hyperv/hv_init.c       |  8 ++++++++
>   arch/x86/hyperv/ivm.c           | 17 +++++++++++++++++
>   arch/x86/include/asm/mshyperv.h | 15 +++++++++++++++
>   drivers/hv/hv_common.c          | 10 ++++++++--
>   include/asm-generic/mshyperv.h  |  1 +
>   5 files changed, 49 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> index 547ebf6a03bc9..d8ea54663113c 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -481,6 +481,10 @@ void __init hyperv_init(void)
>   	/* Hyper-V requires to write guest os id via ghcb in SNP IVM. */
>   	hv_ghcb_msr_write(HV_X64_MSR_GUEST_OS_ID, guest_id);
>   
> +	/* A TDX guest uses the GHCI call rather than hv_hypercall_pg. */
> +	if (hv_isolation_type_tdx())
> +		goto skip_hypercall_pg_init;
> +

Nitpick:
	Put hypercal page initialization code into a sepearate function and 
skip the function in the tdx guest instead of adding the label.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ