[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXGTwppQ8syUyJ72@zn.tnic>
Date: Thu, 21 Oct 2021 18:22:26 +0200
From: Borislav Petkov <bp@...en8.de>
To: Tianyu Lan <ltykernel@...il.com>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, decui@...rosoft.com, tglx@...utronix.de,
mingo@...hat.com, x86@...nel.org, hpa@...or.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
davem@...emloft.net, kuba@...nel.org, gregkh@...uxfoundation.org,
arnd@...db.de, brijesh.singh@....com, jroedel@...e.de,
Tianyu.Lan@...rosoft.com, thomas.lendacky@....com,
rientjes@...gle.com, pgonda@...gle.com, akpm@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, rppt@...nel.org,
saravanand@...com, aneesh.kumar@...ux.ibm.com, hannes@...xchg.org,
tj@...nel.org, michael.h.kelley@...rosoft.com,
linux-arch@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
vkuznets@...hat.com, konrad.wilk@...cle.com, hch@....de,
robin.murphy@....com, joro@...tes.org, parri.andrea@...il.com,
dave.hansen@...el.com
Subject: Re: [PATCH V8 5/9] x86/sev-es: Expose sev_es_ghcb_hv_call() to call
ghcb hv call out of sev code
On Thu, Oct 21, 2021 at 11:41:05AM -0400, Tianyu Lan wrote:
> diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c
> index ea9abd69237e..368ed36971e3 100644
> --- a/arch/x86/kernel/sev-shared.c
> +++ b/arch/x86/kernel/sev-shared.c
> @@ -124,10 +124,9 @@ static enum es_result verify_exception_info(struct ghcb *ghcb, struct es_em_ctxt
> return ES_VMM_ERROR;
> }
>
> -static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb,
> - struct es_em_ctxt *ctxt,
> - u64 exit_code, u64 exit_info_1,
> - u64 exit_info_2)
> +enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, bool set_ghcb_msr,
> + struct es_em_ctxt *ctxt, u64 exit_code,
> + u64 exit_info_1, u64 exit_info_2)
> {
> /* Fill in protocol and format specifiers */
> ghcb->protocol_version = GHCB_PROTOCOL_MAX;
> @@ -137,7 +136,15 @@ static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb,
> ghcb_set_sw_exit_info_1(ghcb, exit_info_1);
> ghcb_set_sw_exit_info_2(ghcb, exit_info_2);
>
> - sev_es_wr_ghcb_msr(__pa(ghcb));
> + /*
> + * Hyper-V unenlightened guests use a paravisor for communicating and
> + * GHCB pages are being allocated and set up by that paravisor. Linux
> + * should not change ghcb page pa in such case and so add set_ghcb_msr
"... not change the GHCB page's physical address."
Remove the "so add... " rest.
Otherwise, LGTM.
Do you want me to take it through the tip tree?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists